#asahi · 2023-11-07 13:29
ChaosPrincessi have a nv card in my x86 box, can't kexec that sanely either#asahi · 2023-11-07 13:29
marcanno way kexec works with that#asahi · 2023-11-07 13:29
marcanI have to load an out of tree module to get vfio passthrough to work more than once#asahi · 2023-11-07 13:28
marcanlike I have an AMD machine with a Radeon and it absolutely doesn't know how to reset that upstream#asahi · 2023-11-07 13:28
ChaosPrincessnot really#asahi · 2023-11-07 13:28
marcandoes it even work properly for full consumer hw use cases anyway?#asahi · 2023-11-07 13:28
ChaosPrincessthe whole thing is incompatible with secure boot, and x86 oems are pushing that#asahi · 2023-11-07 13:28
ChaosPrincessisnt kexec on it's way out on consumer hw anyway?#asahi · 2023-11-07 13:27
marcan(and kernel configs etc, like fedora uses selinux on by default)#asahi · 2023-11-07 13:27
arright#asahi · 2023-11-07 13:27
marcanand then you have a problem with modules#asahi · 2023-11-07 13:27
aranother, more realistic probably, approach would be to load a generic kernel+initrd, but instead of kexec-ing, it would pivot_root + init reexec (which is a common thing initrds do already). but that limits you to only netbooting different linux distros#asahi · 2023-11-07 13:27
marcanapple style ;)#asahi · 2023-11-07 13:26
marcanyou could implement kexec by setting some environment/file flags and putting the new kernel/initramfs somewhere in the ESP and rebooting with a flag that tells u-boot to load that instead#asahi · 2023-11-07 13:26
marcanthis is why apple reboots after the boot picker, they *can't* do it any other way#asahi · 2023-11-07 13:23
aryeah, doesn't sound like something that could be handled with kexec in a reasonable way#asahi · 2023-11-07 13:23
marcanhanding that off is insanity#asahi · 2023-11-07 13:23
marcanar: "being configured" = sharing memory with the kernel#asahi · 2023-11-07 13:23
rkr11marcan: thank you, that does save me lots of time digging into it. Gonna test the dongle way for now and see if it works for my use case. Thanks again!#asahi · 2023-11-07 13:22
marcanGPU is a lost cause#asahi · 2023-11-07 13:22
marcanwe already do a hideous handoff hack for the keyboard in u-boot and I'm not particularly keen on also implementing that for kexec#asahi · 2023-11-07 13:22
marcanI mean you might be able to once we have PSCI, just forget about GPU, video encoder, touchpad/keyboard (on M2+), and a few other things if the first kernel loaded any of those drivers#asahi · 2023-11-07 13:22
armarcan: and adding a code path (triggered by a cmdline arg?) "expect these things to be already configured" would be too fragile, right?#asahi · 2023-11-07 13:20
PaulFertserNot able to kexec feels considerably more special than I could expect, yes :)#asahi · 2023-11-07 13:20
marcanthere is no way to fully reset any of the coprocessors to its boot state, because its boot state is loaded by iBoot#asahi · 2023-11-07 13:20
marcanar: before m1n1#asahi · 2023-11-07 13:20
marcanrkr11: as far as I can tell u-boot does not currently have drivers for any of the ethernet chipsets apple uses, no#asahi · 2023-11-07 13:20
armarcan: "reinitialize firmware", as in the things that happen before m1n1, or in/after?#asahi · 2023-11-07 13:18
marcanit took you this long to figure that out? :p#asahi · 2023-11-07 13:18
PaulFertserOK, that makes this platform special.#asahi · 2023-11-07 13:17
marcanthis is a platform limitation#asahi · 2023-11-07 13:17
marcanthere is no way to reinitialize firmware#asahi · 2023-11-07 13:17
marcanPaulFertser: no, kexec is not supported and never will be#asahi · 2023-11-07 13:17
rkr11have yet to try if it will detect usb ethernet dongle tomorrow#asahi · 2023-11-07 13:17
PaulFertserSome other practical way might be to boot Linux+initramfs as first payload, and kexec from that.#asahi · 2023-11-07 13:16
rkr11m1 mac mini, my problem is wired ethernet is not detected currently in grub, no cards are visible basically#asahi · 2023-11-07 13:16
marcanwhat device?#asahi · 2023-11-07 13:15
rkr11yep, totally my bad, sorry! need lan#asahi · 2023-11-07 13:15
marcanwlan = wireless lan#asahi · 2023-11-07 13:14
marcanoh but you said wlan?#asahi · 2023-11-07 13:14
rkr11marcan: yep, I wanna use wired ethernet (internal)#asahi · 2023-11-07 13:14
marcan(mostly for our own sanity)#asahi · 2023-11-07 13:14
marcanwe are using u-boot and not edk2 for a reason#asahi · 2023-11-07 13:14
marcanyes, I was about to say, down that path lies edk2#asahi · 2023-11-07 13:13
arthere's wlan stack in edk2, but that's a bit cursed#asahi · 2023-11-07 13:13
marcanand dare I say there should never be#asahi · 2023-11-07 13:13
marcanthere is no wlan stack in u-boot at all as far as I know#asahi · 2023-11-07 13:12
marcanif you want to netboot the only practical options that could be supported are wired ethernet (internal or usb)#asahi · 2023-11-07 13:12
marcanwe also aren't going to provision wifi firmware for u-boot like we do for aspeed