3 ms·
True, the portion of your OS that actually uses EFI services must work in both 32-bit and 64-bit mode, so you'll have to write it portably. That's somewhat eas
by JoshTriplett 12y ago
True, the portion of your OS that actually uses EFI services must work in both 32-bit and 64-bit mode, so you'll have to write it portably. That's somewhat easier since you don't need to write any assembly; you can write in any high-level language with an FFI to C. However, you can run a 64-bit OS with 32-bit EFI or vice versa; you just have to switch modes yourself. And you can defer that until later in the development of your OS.
- pgeorgi 12y agoOnce you switch modes, you better stick to Runtime Services, so networking etc is out. But yes, for the beginning all that might not matter too much and you can get by running your "OS" as BDS application and incrementally migrate away from that.
- JoshTriplett 12y agoOnce you switch modes, you shouldn't touch EFI at all, and if you do, you'll have to switch back to do so.
- pgeorgi 12y agoEven switching back and forth at the right times seems somewhat risky to me before ExitBootServices(), while Runtime Services are restricted to a subset that's much more resilient to external state changes (and doesn't run background stuff). NetBSD rump kernels may provide a better base for OS experiments where you can use working code until you have replacements ready - based on a real OS, not some API that accidentally became one.