#
✕ nick:kettenis
#asahi · 2021-06-08 20:25
kettenisI wrote that after studying the corellium driver
#asahi · 2021-06-08 20:25
kettenisthat's the u-boot driver
#asahi · 2021-06-08 20:24
kettenishttps://github.com/kettenis/u-boot/blob/apple-m1-m1n1-nvme/drivers/mailbox/apple-mbox.c
#asahi · 2021-06-08 11:49
kettenishard to imagine needing that much memory for anything else
#asahi · 2021-06-08 11:37
kettenisdamn now im mixing up arnd with ardb
#asahi · 2021-06-08 11:37
kettenisarndb: likely; they can just have the firmware set it up
#asahi · 2021-06-08 11:36
ketteniswhich is part of the upper block of reserved memory
#asahi · 2021-06-08 11:35
kettenismaps a block of 0x18c6c 4K pages at physical address 0x9e6e84000
#asahi · 2021-06-08 11:35
kettenisthat is probably a mapping for some sort of DRAM cache
#asahi · 2021-06-08 11:34
kettenisSART 0x009e6e84/0xff018c6c
#asahi · 2021-06-08 11:34
kettenisit has a few mappings that allow access to main memory regions
#asahi · 2021-06-08 11:34
kettenisthe SART is a very simple IOMMU which gives the side-processor that handles NVMe access to the SOCs address space
#asahi · 2021-06-08 11:28
kettenisdumping the SART registers in m1n1 might provide a clue
#asahi · 2021-06-08 10:40
kettenispipcet[m]: I pushed a change that should fix the mailbox dependency issue
#asahi · 2021-06-08 09:46
kettenisnot gotten around to fixing that
#asahi · 2021-06-08 09:46
kettenisit shouldn't matter in which order the mailboxes are initialized, but currently it does
#asahi · 2021-06-08 09:45
kettenisthere is a bug in the memory reservation code for the mailbox driver
#asahi · 2021-06-08 09:40
kettenispipcet[m]: it must be possible to reset the thing, since iBoot uses the NVMe storage but in U-Boot I had to start it up again
#asahi · 2021-06-08 09:35
kettenisI haven't seen it write to the memory yet
#asahi · 2021-06-08 09:34
kettenisbut I'm not sure it does the right thing if you load linux kernels the non-EFI way
#asahi · 2021-06-08 09:33
kettenisthe current u-boot code reserves the memory in the EFI memory map
#asahi · 2021-06-08 09:33
kettenisnot much, just a few pages
#asahi · 2021-06-08 09:32
kettenisso u-boot allocates some memory and reserves that memory in the memory map
#asahi · 2021-06-08 09:32
kettenisthey need some memory for logging
#asahi · 2021-06-08 09:31
kettenisthe mailboxes are "interesting"
#asahi · 2021-06-07 18:57
kettenisyes, the bindings are going in via the pinctrl tree
#asahi · 2021-06-07 18:16
kettenissven: did you write down your findings about subpage protection somewhere?
#asahi · 2021-06-07 09:43
kettenisworked for me when i tried it
#asahi · 2021-06-07 08:35
kettenisand inserted loads of strong memory barriers in the kernel that didn't seem to make a significant difference
#asahi · 2021-06-07 08:35
kettenisreviewed whether the kernel adheres to the "break-before-make" rules
#asahi · 2021-06-07 08:34
kettenisnot yet pinned down whether it is TLB, cache or memory ordering related
#asahi · 2021-06-07 08:33
ketteniscore dumps typically early on when running C++ constructors before main()
#asahi · 2021-06-07 08:28
kettenisbut if an upstream kernel with sven's patches works fine, this must be an OpenBSD problem
#asahi · 2021-06-07 08:27
ketteniswas wondering if there are some chicken bits that m1n1 doesn't set
#asahi · 2021-06-07 08:26
kettenisI'm seeing core dumps from (mostly) clang and ld.lld
#asahi · 2021-06-07 08:24
kettenisdoing parallel builds of things natively
#asahi · 2021-06-07 08:23
kettenisdon't think anyone has used Linux in anger yet that way
#asahi · 2021-06-07 08:22
kettenisI am curious though if the SMP issues will also show up on Linux when booted via m1n1
#asahi · 2021-06-07 07:57
kettenissome incompatible device tree binding changes coming up though, which is why I'm not advertising M1 support in OpenBSD much yet
#asahi · 2021-06-07 07:56
kettenisall works although the ethernet gets the default address programmed in the controller which I suspect is the same for all M1 machines
#asahi · 2021-06-07 07:43
kettenissome more OpenBSD developers are getting involved, so I have been working on the installer for folks to be able to install on NVMe without bricking their machines ;)
#asahi · 2021-06-07 07:40
kettenisno, SMP is still subtly broken, and there are some issues with NVMe as well still
#asahi · 2021-06-06 18:18
kettenisand I suspect wifi can wake up the system as well
#asahi · 2021-06-06 18:18
kettenisthere is an SMC "gpio" involved in powering the thing up
#asahi · 2021-06-06 18:17
kettenisthe wifi controller definitely works with using a normal MSI
#asahi · 2021-06-03 16:37
kettenishttp://patchwork.ozlabs.org/project/devicetree-bindings/patch/20210530224404.95917-2-mark.kettenis@xs4all.nl/
#asahi · 2021-06-03 16:36
kettenismaz: if you have a few spare cycles to look at the way MSIs are done in the binding that would be great
#asahi · 2021-06-03 16:35
kettenisthe example uses SID 1, but we may use 0 in our actual device trees for a bit
#asahi · 2021-06-03 16:34
kettenisthen I think there is no real reason to change the pcie DT bindings schema
#asahi · 2021-06-03 16:29
kettenisyes, the idea is that the driver should program the RID to SID mapping registers to something that matches the iommu-map property

plus ›