#asahi-dev · 2021-01-27 11:06
marcanah, so it just passes spintable info from the devicetree it gets?#asahi-dev · 2021-01-27 11:05
marcanI haven't looked into any of this in u-boot yet#asahi-dev · 2021-01-27 11:05
marcanalso depends on the spintable thing, whether u-boot can chain from that to the next stage or whether it reimplements it and thus needs its own CPU init code#asahi-dev · 2021-01-27 11:04
marcanwell right now u-boot can't talk to the disk anyway, so not sure how much benefit that would be other than for fun :)#asahi-dev · 2021-01-27 11:03
marcanbut to a first approximation we could leave all of m1n1 in reserved RAM, it's not like it's big anyway#asahi-dev · 2021-01-27 11:03
marcanthough obviously that does not include the FS code#asahi-dev · 2021-01-27 11:03
marcanhas to do with CPU init chicken bits and the resume vector being locked down#asahi-dev · 2021-01-27 11:03
marcanand actually I think at least a portion of m1n1 needs to stay in RAM after OS boot anyway, to handle resume from sleep scenarios, though that part isn't clear yet#asahi-dev · 2021-01-27 11:02
marcanm1n1 is relocatable and basically standalone, so I don't see why you couldn't just call into its disk I/O as long as you have some sort of sane stack going on#asahi-dev · 2021-01-27 11:02
marcanonce I have the disk I/O code in here we can revisit, but basically if there is a way I can load your bootloader and give you hooks to get disk I/O - be it via UEFI or some bespoke mechanism - without it being too much useless overhead, that works perfectly fine for me#asahi-dev · 2021-01-27 11:01
marcansure#asahi-dev · 2021-01-27 11:00
marcanno problem then#asahi-dev · 2021-01-27 11:00
marcanin there you can do whatever you want#asahi-dev · 2021-01-27 10:59
marcanso if you want disklabels, they'll have to be inside a GPT partition#asahi-dev · 2021-01-27 10:59
marcanapple requires GPT and APFS volumes to boot from#asahi-dev · 2021-01-27 10:59
marcanobviously that's not going to fly on M1#asahi-dev · 2021-01-27 10:58
marcanthe only reason I like FAT32 is that elm-chan fatfs is just so damn easy to use and works everywhere#asahi-dev · 2021-01-27 10:58
marcanas long as the licensing is not a problem#asahi-dev · 2021-01-27 10:57
marcanI'm not opposed to adding FS support as long as it's not NTFS levels of junk#asahi-dev · 2021-01-27 10:57
marcanalso, if there is a simple enough read-only UFS2/etc implementation I can drop into m1n1 that's fine too#asahi-dev · 2021-01-27 10:57
marcanfair#asahi-dev · 2021-01-27 10:56
marcanjust UEFI?#asahi-dev · 2021-01-27 10:56
marcanhow does openbsd get loaded in the u-boot path?#asahi-dev · 2021-01-27 10:56
marcaneither by making m1n1 do enough of UEFI for you guys, if it's really a minimal part; or by chaining u-boot and teaching it about disk I/O#asahi-dev · 2021-01-27 10:56
marcanand then for production, decide on how you want to hook up the support for loading kernels the normal way#asahi-dev · 2021-01-27 10:56
marcanin that case it looks like for testing you could and probably should get away with loading openbsd kernels into m1n1, even via serial like I do for linux for development#asahi-dev · 2021-01-27 10:55
marcanyeah, no offense but I'm not touching that thing#asahi-dev · 2021-01-27 10:55
marcan:)#asahi-dev · 2021-01-27 10:55
marcan(I'm going to write support for that in the next day or two)#asahi-dev · 2021-01-27 10:54
marcanand what we will use a priori#asahi-dev · 2021-01-27 10:54
marcanthat's the other option Linux has#asahi-dev · 2021-01-27 10:54
marcancan you do the same spintable thing Linux supports?#asahi-dev · 2021-01-27 10:53
marcanwhich is also not something I want to lose#asahi-dev · 2021-01-27 10:53
marcanin that case it could be done, but then you lose virtualization support#asahi-dev · 2021-01-27 10:53
marcanheh, didn't know hvc was an option#asahi-dev · 2021-01-27 10:53
marcanaren't PSCI calls monitor calls?#asahi-dev · 2021-01-27 10:52
marcanthere is no EL3#asahi-dev · 2021-01-27 10:52
marcanso good luck with that#asahi-dev · 2021-01-27 10:52
marcanPSCI needs trustzone, which does not exist on M1#asahi-dev · 2021-01-27 10:52
marcan:)#asahi-dev · 2021-01-27 10:52
marcanso we're already diverging there by necessity#asahi-dev · 2021-01-27 10:52
marcanyeah, ARM also keeps pushing PSCI and there will never be PSCI on M1#asahi-dev · 2021-01-27 10:51
marcanbut I certainly don't want to go down the path of deep hardware info stuff, ACPI, etc#asahi-dev · 2021-01-27 10:51
marcanhow much of the UEFI API does it need? e.g. if all I need are protocol stubs for disk I/O (read/write sector) and console write (for text output to the framebuffer) then that could conceivably be added to m1n1#asahi-dev · 2021-01-27 10:50
marcan(I've never used UEFI on ARM)#asahi-dev · 2021-01-27 10:50
marcanah, heh#asahi-dev · 2021-01-27 10:50
marcanhow does that fit in with UEFI - one or the other?#asahi-dev · 2021-01-27 10:50
marcandoes openbsd support devicetrees?#asahi-dev · 2021-01-27 10:49
marcan(I use it on a few machines)#asahi-dev · 2021-01-27 10:49
marcanthere isn't a terribly good reason to use a fancy filesystem for the boot partition, e.g. this setup is one fairly common option on PCs (making /boot the ESP)