#
✕ nick:arnd
#asahi · 2021-02-09 10:13
arndsparc, power, parisc, alpha and many others are in the wider risc family but not as close to the mips64/arm64/riscv64 set
#asahi · 2021-02-09 10:12
arndriscv64 is in the same closely related family as mips64 and arm64, all based on the same lessons learned
#asahi · 2021-02-09 10:11
arndit's much closer to that than to arm32 (unlike mips32 vs mips64, which are very similar)
#asahi · 2021-02-09 10:10
arndarm64 is basically an improved version of mips64
#asahi · 2021-02-07 20:52
arnd25 years since Windows NT for PowerPC used an Open Firmware device tree ;-)
#asahi · 2021-02-07 19:19
arndah, so they do have a higher privilege level than EL2 but just didn't want to be compatible with Trustzone/EL3? I can't say I blame them ;-)
#asahi · 2021-02-07 19:16
arndI don't remember what that does
#asahi · 2021-02-07 19:15
arndWhat I could see though would be an EL2 wrapper that runs tianocore and provides a SBSA/SBBR style environment for booting unmodified operating systems, with an emulated GIC, pl011, PCI mmconfig, and (if you want to go wild) virtio-net and shadow page tables for 64kb pages
#asahi · 2021-02-07 19:12
arndnot going to happen anyway: windows and RHEL rely on ACPI, and for normal Linux we want a sane abstraction
#asahi · 2021-02-07 19:11
arndFor other OSs certainly: if you want to run Windows, that would be helpful. For Linux I prefer doing it right
#asahi · 2021-02-07 19:10
arndI remember doing PCI config space over RTAS on powerpc, and I always wondered why the arm server folks that use ACPI haven't done it yet, but as the M1 only has one device behind it, there is really point
#asahi · 2021-02-07 19:08
arndI also thought about what it would take to route PCI config space through that for the NVMe drive. It would probably work, but I'd rather have a simple platform driver in the kernel for this one than to hack up a PCI host in firmware for the sake of making an unmodified Linux driver work
#asahi · 2021-02-07 19:07
arndmy first suggestion was to do something more like RTAS in powerpc open firmware, which has a different way of calling into firmware code based on DT properties, but I do prefer ardb's solution since it uses a callback interface that is already established on arm firmware, just not yet for psci
#asahi · 2021-02-07 19:05
arndit's a bit of a hack, but probably enough to get things running until everyone has moved to u-boot for their boot flow
#asahi · 2021-02-07 19:04
arndThe approach that ardb came up with for psci over the uefi runtime interface would definitely be intended to run in u-boot, and not rely on having tianocore or something along those lines. As far as I understand it could actually be implemented in m1n1 as well, without doing any other parts of UEFI
#asahi · 2021-02-07 08:38
arndnever_released: indeed, most of the setup code looks like it should just go into the bootloader, there is no reason for Linux to care about that. For a lot of SoCs, we end up with that stuff in the driver so we can support devices that ship with an unknown bootloader, but if we can just modify the loader here there is no need for that
#asahi · 2021-02-06 22:52
arndbut it does mean that it would ideally be part of the aic DT binding from the start
#asahi · 2021-02-06 22:51
arndhandling it in the aic driver directly should be much simpler
#asahi · 2021-02-06 22:50
arndnever_released, marcan: from another look at https://github.com/corellium/linux-m1/blob/master/drivers/pci/controller/pcie-apple-m1.c and the adt dump, it appears that the MSI irqchip is not physically a part of PCIe host bridge, but rather part of the AIC itself. The irqchip code in the host driver does not actually interact with any hardware registers but fakes one MSI interrupt for each AIC interrupt.
#asahi · 2021-02-06 17:07
arndthe only chance I can see something going wrong in practice would be if there is a portable application that can run in both Linux and MacOS and that tries to make sense of the dt
#asahi · 2021-02-06 17:06
arndjix: the risk of something actually conflicting would be extremely low, agreed
#asahi · 2021-02-06 17:05
arndI would personally use "pasemi,", ;-)
#asahi · 2021-02-06 17:04
arndthe whole purpose of the prefix is to make a namespace that will never conflict with whatever someone else does in their machines, so using "apple," would be less likely to conflict
#asahi · 2021-02-06 17:01
arndthe more important question is whether we want to go along with what apple use themselves, or better use something intentionally different to not have conflicting bindings, since anything they have is almost certainly incompatible
#asahi · 2021-02-06 16:59
arndI wonder what the original DNARD/Shark was using
#asahi · 2021-02-06 16:59
arndah right, so it was probably started by someone else contributing dts files, not intel
#asahi · 2021-02-06 16:58
arndah, keembay and agilex
#asahi · 2021-02-06 16:57
arndnever_released: which ones?
#asahi · 2021-02-06 16:57
arndI don't know why Intel started using "intel," for the x86 and mips SoCs but "altr," for the arm ones (post acquisition)
#asahi · 2021-02-06 16:53
arndI'm fine with either symbol (aapl, AAPL or apple) when merging the patches, there is just no good answer in this case
#asahi · 2021-02-06 16:52
arndwhile amlogic is publicly traded, "688099" does not make a good identifier through, so they went with the name of the company
#asahi · 2021-02-06 16:51
arndnever_released: I think we tend to use the stock ticker symbols in lowercase when their is one
#asahi · 2021-02-06 16:50
arndkettenis: and I wonder if the MSI delivery is racy, as is often the case with custom PCIe host bridges that come with their own MSI controller: a device might send some DMA transfer and a message to tell the CPU that the DMA is done, but that DMA might still be in progress when the MSI is forwarded to AIC and gets handled in the driver
#asahi · 2021-02-06 16:49
arndit's probably fine as long as there is only one device connected to each port then, but it won't help when having multiple high-speed devices on thunderbolt
#asahi · 2021-02-06 16:48
arndkettenis: right: it seems I misread, and there is only a single doorbell on for all MSIs, and a very limited number of messages
#asahi · 2021-02-06 16:42
arndah, so there is one MSI address per CPU in the PCIe host bridge, and presumably you could have multiple devices target each one of them
#asahi · 2021-02-06 16:33
arndmarcan: regarding https://github.com/AsahiLinux/docs/wiki/HW:AIC, does that mean there is no MSI support in the AIC at all? Does it just emulate it in the pci host bridge with a shared irq line for all MSIs?
#asahi · 2021-02-06 14:52
arndI just keep one objdir per machine I want to run on
#asahi · 2021-02-06 14:51
arndthis is just if you use O=objdir with an empty or nonexisting directly
#asahi · 2021-02-06 14:51
arndShiz: yes, of course. If you have a .config, it will use it
#asahi · 2021-02-06 14:46
arndthat way, the instructions can just include 'make defconfig', which would be a larger kernel because it supports a few dozen other platforms, but at least it would work
#asahi · 2021-02-06 14:45
arndmarcan: I don't see a patch to arch/arm64/configs/defconfig in your patch series. Can you add a patch that turns ons the minimum set of options that are needed to get a booting kernel?
#asahi · 2021-02-06 14:43
arndmarcan, dhewg: 'make oldconfig' in an empty object tree takes the defaults from /boot/config-`uname -r` rather than from the Kconfig defaults or the architecture defconfig, so cross-compiling without a .config results in a very odd configuration.
#asahi · 2021-02-01 16:58
arndthe testing was done with a locally patched numpy
#asahi · 2021-02-01 16:28
arndwith some hope of getting even more out of it using hand-written code specific to the application.
#asahi · 2021-02-01 16:27
arndthey got a 3x improvement just by changing from blis to Apple's blas replacement
#asahi · 2021-02-01 16:25
arndyes, pretty much, though ${coworker} uses it for running neural nets, as they are dealing with relatively small matrices
#asahi · 2021-02-01 15:58
arndright
#asahi · 2021-02-01 15:55
arndthe context switch is definitely part of it, saving >4KB of state is expensive
#asahi · 2021-02-01 15:54
arnd${coworker} who has used AMX in the past says they only run single-threaded applications

plus ›