#
✕ nick:kettenis
#asahi · 2021-06-02 20:47
kettenisand hi should be set to 0
#asahi · 2021-06-02 20:47
kettenismsg->address_lo = 0xfffff000;
#asahi · 2021-06-02 20:47
kettenisthat should be
#asahi · 2021-06-02 20:47
kettenismsg->address_hi = 0xfffff000;
#asahi · 2021-06-02 20:46
kettenisoh, wait
#asahi · 2021-06-02 20:41
kettenissven: I don't immediately see what's going wrong with the MSIs
#asahi · 2021-06-02 11:44
kettenishttps://github.com/AsahiLinux/docs/wiki/Glossary#1
#asahi · 2021-06-01 22:54
kettenisapple_m1_defconfig in that tree
#asahi · 2021-06-01 21:12
kettenisas the OpenBSD bootloader understands the FFS filesystem that we use
#asahi · 2021-06-01 21:11
kettenisIt also means that you can install a kernel by just copying it to /
#asahi · 2021-06-01 21:11
kettenisOpenBSD has its own EFI bootloader that has some neat tricks up its sleeve to start the kernel with its entropy pool already initialized
#asahi · 2021-06-01 21:09
kettenisit just happens that many distros use grub
#asahi · 2021-06-01 21:09
kettenisdistros i mean
#asahi · 2021-06-01 21:08
kettenisthe whole arm embedded approach of having separate images for each individual board makes no sense for the mainsream dostros
#asahi · 2021-06-01 21:08
kettenisand after that you can just boot a standard OS install image and install as if you're on PC or an ARM server machine
#asahi · 2021-06-01 21:07
kettenisthe whole idea is that if you're interested in just using an OS on the M1 you install m1n1 with a U-Boot payload from 1TR
#asahi · 2021-06-01 21:05
kettenism1n1 kinda takes the place of SPL
#asahi · 2021-06-01 21:05
kettenison many platforms u-boot has multiple stages anyway: TPL, SPL and U-Boot proper
#asahi · 2021-06-01 20:08
kettenisit works on the M1 macbook as well, although it'll probably throw some errors about missing PCIe devices
#asahi · 2021-06-01 20:07
kettenism1n1 as in "to be used as a payload for m1n1"
#asahi · 2021-06-01 19:01
kettenisupstreaming the u-boot code is going to take some time
#asahi · 2021-06-01 18:57
kettenissome churn to be expected as we align DT bindings though
#asahi · 2021-06-01 18:56
kettenisbasically ethernet, usb type-A, usb type-C, NVMe, serial console and framebuffer console (at iBoot resolution) work now
#asahi · 2021-06-01 18:53
kettenisj_ey: yes, but the process is a lot quicker
#asahi · 2021-06-01 18:52
kettenisand there is an annoying bug with the SMP kernel
#asahi · 2021-06-01 18:51
kettenisI still need to iron out a few issues in the installer to deal with the apple partitions
#asahi · 2021-06-01 18:46
kettenisshould be possible to do the same with linux once there is a distro with support
#asahi · 2021-06-01 18:45
kettenisyup, this means I can boot OpenBSD from the internal disk now
#asahi · 2021-06-01 17:39
kettenisnow has working NVMe support
#asahi · 2021-06-01 17:39
kettenishttps://github.com/kettenis/u-boot/tree/apple-m1-m1n1-nvme
#asahi · 2021-05-31 16:19
kettenisOpenBSD's bus_dma API has an API that just says "map this range of physmem and return the device address you mapped it at"
#asahi · 2021-05-31 16:11
kettenisno, not bothered with thunderbolt
#asahi · 2021-05-31 16:11
kettenisit is diffucult to use that in Linux's iommu code?
#asahi · 2021-05-31 16:09
kettenisah, something to look at before I consider enabling pcie passthrough on the thunderbolt ports in OpenBSD
#asahi · 2021-05-31 16:02
kettenisso I just pushed a changes that renames the "ecam" reg-names name to "config" as requested by robh
#asahi · 2021-05-31 16:01
kettenissven: just realized that I didn't push all my pcie-related u-boot changes last night
#asahi · 2021-05-31 16:00
kettenisit is still better than exposing everything though
#asahi · 2021-05-31 16:00
kettenisbloom: the problem with 16k iommu pages with 4k cpu pages is that you end up exposing more bits of memory to the devices than you really want
#asahi · 2021-05-31 12:40
kettenissven: at least it seems you have the iommu stuff sorted
#asahi · 2021-05-31 12:36
kettenisyou should defenitely see MSIs firing for xhci
#asahi · 2021-05-31 12:36
kettenismaybe the network interface works without interrupts on Linux
#asahi · 2021-05-31 12:31
kettenis(for OpenBSD)
#asahi · 2021-05-31 12:30
kettenisI didn't bother since all the built-in devices support MSIs
#asahi · 2021-05-31 12:30
kettenissven: implementing legacy (INTx) interrupts will require a bit more work
#asahi · 2021-05-31 10:08
kettenisit seems that if there is no RID to SID mapping set up for a device, stream ID 0 gets used
#asahi · 2021-05-31 10:07
kettenisor as a hack you can change the DT to use stream ID 0
#asahi · 2021-05-31 10:07
kettenissven: another thing is that you need to set up the requestor ID to stream ID mapping in the host bridge
#asahi · 2021-05-31 09:50
kettenisI haven't committed the switchover to "msi-ranges" there yet, but it shows you how to program the MSI-related registers
#asahi · 2021-05-31 09:49
kettenishttps://cvsweb.openbsd.org/src/sys/arch/arm64/dev/aplpcie.c?rev=1.2&content-type=text/x-cvsweb-markup
#asahi · 2021-05-31 09:49
kettenisfor reference, the openbsd driver is here:

plus ›