4 ms·
I agree that is was good the designers of the 386 got rid of some cruft in designing 386 protected mode. It's unfortunate they didn't lean harder into BIOS cal
by KMag 5y ago
I agree that is was good the designers of the 386 got rid of some cruft in designing 386 protected mode. It's unfortunate they didn't lean harder into BIOS calls to hide implementation details (such as allowing only the BIOS to manipulate page tables, and enforcing this by having the BIOS be the only ring0 component), effectively making the BIOS a hypervisor that only supported one guest kernel at a time. This is what the DEC Alpha did with its PALCode, and would have given a smaller interface that needed to be maintained in the future.
It would have made writing a BIOS more complicated, but would have made future kernel and hardware work more simple. It would also have meant all 32-bit and 64-bit kernels would have been paravirtualized from day 1, greatly reducing the need for hardware emulation in multi-guest hypervisors.
Of course, hindsight is 20/20, and it a business risk to depend so much on BIOS implementors unless you provide them a robust liberally licensed reference implementation to tailor to their hardware.
- bpye 5y agoWould the perf cost of such an abstraction have been acceptable on early 386 hardware? I lean towards no but that is just a feeling without data…
- anyfoo 5y agoYeah, it sounds like KMag essentially wanted the BIOS to be a sort of microkernel, with other kernels being implemented under it. Beyond performance concerns, given the PC's history I'm also not sure whether e.g. Linux developers (which initially was, well, Linus) would have been happy with whatever microkernel and API had been given there.
- anyfoo 5y agoOh, I actually meant that long mode, i.e. 64bit x86, got rid of a lot of 386 (and 286) cruft.