#asahi · 2021-06-03 14:38
marcansure, but ARM has no such thing#asahi · 2021-06-03 14:37
marcanI mean in ARMv8 terms#asahi · 2021-06-03 14:37
marcanbalrog: I don't see why it wouldn't work, but I don't know what an "nmi" is here#asahi · 2021-06-03 14:37
marcanjannau: right now they are ignored, the host needs to manage that like it manages the timers#asahi · 2021-06-03 14:36
marcaner balrog #asahi · 2021-06-03 14:36
marcanbloom: like the xnu feature?#asahi · 2021-06-03 12:57
marcanjannau: well, then PMC IRQs don't work but I guess that doesn't matter much :)#asahi · 2021-06-03 09:32
marcanwhich is what I was already doing but not shadowing it; the guest asserted because it saw IRQs disabled when it was trying to enable them#asahi · 2021-06-03 09:32
marcanyou can disable IRQ generation in the control register until the guest clears the status bit#asahi · 2021-06-03 09:31
marcanjannau: there is an interrupt status bit in the control register#asahi · 2021-06-03 09:22
marcan*real one on FIQ#asahi · 2021-06-03 09:22
marcanbasically just keep a shadow flag for FIQ enable, disable the real one FIQ, re-enable once the guest clears the flag#asahi · 2021-06-03 09:20
marcanI think you only need to wrap the control reg, right?#asahi · 2021-06-03 09:20
marcanjannau: thanks, had that on my TODO#asahi · 2021-06-02 05:39
marcan:p#asahi · 2021-06-02 05:39
marcangood luck emulating that#asahi · 2021-06-02 05:39
marcanyeah...#asahi · 2021-06-02 05:38
marcanwhich is the hard part :p#asahi · 2021-06-02 05:38
marcanbut then you still get to port all the drivers to windows#asahi · 2021-06-02 05:38
marcanand I mean I already wrote a shim hypervisor so if someone is masochistic enough to want to go that way and emulate a GIC inside that and PSCI or something then sure, it'll probably work#asahi · 2021-06-02 05:37
marcanyes, that's what the pongoos guys wanted to do#asahi · 2021-06-02 05:37
marcanMS only ever did that for one platform (rpi)#asahi · 2021-06-02 05:37
marcanin particular all the IRQ mess#asahi · 2021-06-02 05:37
marcanwindows needs core kernel changes; like linux, there's enough different about the M1 that you can't just do it all in drivers#asahi · 2021-06-02 05:37
marcanrunning windows bare metal on M1 is impossible without MS help#asahi · 2021-06-02 05:36
marcanwhether people want to use UEFI or just u-boot straight to arm64-boot-protocol linux is up to them#asahi · 2021-06-02 05:36
marcanwe have no plans to port "full" UEFI a la tiano or any of that#asahi · 2021-06-02 05:36
marcanemilazy: u-boot provides enough UEFI services to load GRUB or a UEFI-wrapped linux, but it can also load kernels directly#asahi · 2021-06-02 05:35
marcanthe question is whether we can keep `linux.py <kernel>` working without a u-boot intermediate stage, or whether there are good enough arguments to do some of the init in u-boot and just say we expect linux.py to always load it first#asahi · 2021-06-02 05:34
marcanI do not expect anyone to do direct linux loads as a m1n1 payload in production for normal boot; the end-user setup we ship will definitely be m1n1+u-boot#asahi · 2021-06-02 05:33
marcanif we go that route, then USB loading will have the u-boot wrapper requirement (which we already have a hack for)#asahi · 2021-06-02 05:33
marcanjannau: I'm talking about for development/testing only; the question is whether we eventually want to have linux drivers rely in initialization that only u-boot performs or not#asahi · 2021-06-02 02:37
marcanheh#asahi · 2021-06-02 02:33
marcanGRUB is optional, I expect distros to use it, but you can use u-boot directly#asahi · 2021-06-02 02:32
marcan(need to check about the hypervisor exception vectors, might need some directives)#asahi · 2021-06-02 02:32
marcanin fact I bet just taking out the proxy stuff from main() will optimize out most of that code, because -ffunction-sections and such#asahi · 2021-06-02 02:32
marcanand yes eventually there will be some compile time option for that#asahi · 2021-06-02 02:32
marcanexactly#asahi · 2021-06-02 02:31
marcanthey get concatenated together and deployed as one blob anyway#asahi · 2021-06-02 02:31
marcanthe code has to exist somewhere, it's really just about two repos vs one#asahi · 2021-06-02 02:31
marcanI mean it's not like u-boot doesn't run multiple stages on lots of hardware#asahi · 2021-06-02 02:31
marcanbloom: I mean, what's your concern with having m1n1/u-boot as two things?#asahi · 2021-06-02 02:27
marcanthough I do wonder how much slowness is caused by my bad timer handling (can't be fixed due to ARM limitations); might be worth trying a few hacks for that#asahi · 2021-06-02 02:26
marcanif it's slow it's because it runs on one e-core only and, when you have mmiotrace, because that slows things down obviously.#asahi · 2021-06-02 02:25
marcanI don't think there is much to optimize; ARM virtualization doesn't really trigger many traps#asahi · 2021-06-02 02:17
marcankettenis: fwiw m1n1 currently provides enough entropy (forwarded from iBoot) to linux to init its entropy pool, iff it's built with the config option to trust bootloader-provided entropy#asahi · 2021-06-02 02:14
marcanbut I don't see much point in moving all of m1n1 into u-boot; there isn't really anything to be gained there, it'd just be moving code from point A to point B, including all of the ADT handling and whatnot#asahi · 2021-06-02 02:13
marcancurrently I like being able to not require u-boot to boot linux from m1n1 but sven has a hack to chainload via u-boot anyway and I will accept that as a requirement if it makes sense :p#asahi · 2021-06-02 02:13
marcanhow much other hardware init is in m1n1 vs u-boot is subject to discussion; right now we're doing things like taking care of some fuse-based pokes and such in m1n1 so downstream users don't have to#asahi · 2021-06-02 02:12
marcanbloom: m1n1's primary purpose is to do low level CPU init and take care of ADT->FDT adaptation