At 05:28 PM 7/7/99 -0700, you wrote:
- Go into protected mode for initial configuration, then exit it to load
the boot code (note that the BIOS service routines would have to run in real mode in this case).
This is how other BIOSs today do it. That is also how you have to do if you strive for IBM-PC BIOS compability.
And this continues the necessity for either a keyboard or a keyboard simulator, does it not? My recollection is that the only way out of protected mode (back in 286 days) was through a keyboard reset sequence.
That was only on the '286, which required a processor reset to get back into real mode and was assisted by the keyboard controller, one of the Great PC Hacks. It is not as traumatic with '386 and beyond.
Cheers!
Phil King pking@netschools.net
- To Unsubscribe: send mail to majordomo@freiburg.linux.de with "unsubscribe openbios" in the body of the message
simulator, does it not? My recollection is that the only way out of protected mode (back in 286 days) was through a keyboard reset sequence.
That was only on the '286, which required a processor reset to get back into real mode and was assisted by the keyboard controller, one of the Great PC Hacks. It is not as traumatic with '386 and beyond.
Actually that was the kludge to fix it. The *really* savvy way to do it was a triple fault. Something along the lines (going from memory here) like trashing the stack and executing an illegal instruction. The processor would take exception to the illegal instruction (fault 1), go to push CS,IP,F to the stack, which wasn't there (fault 2), cause exception to that and go to push them again (fault 3) so it would reset. Thousands of times faster than playing with the keyboard controller to hit reset.
That's all from memory so it may be a little incorrect, but the theory is sound. It may have been only a double fault, but either way that method was MUCH faster than resetting through the keyboard controller.
Andrew - To Unsubscribe: send mail to majordomo@freiburg.linux.de with "unsubscribe openbios" in the body of the message
That was only on the '286, which required a processor reset to get back into real mode and was assisted by the keyboard controller, one of the Great PC Hacks. It is not as traumatic with '386 and beyond.
I also wanted to add that all this nonsense was necessary because int he design of the 80286 there was a method of ENTERing protected mode, but no clean way to get back. I'm curious to know whether the double/triple fault was used as a way back because that's how Intel had *designed* it, or if the lack of method to come back to Real mode was an oversight.
Looking at pages like x86.org, I tend to think the latter.
Andrew - To Unsubscribe: send mail to majordomo@freiburg.linux.de with "unsubscribe openbios" in the body of the message
I also wanted to add that all this nonsense was necessary because int he design of the 80286 there was a method of ENTERing protected mode, but no clean way to get back. I'm curious to know whether the double/triple fault was used as a way back because that's how Intel had *designed* it, or if the lack of method to come back to Real mode was an oversight.
I'd say it was by mistake. Resetting upon tripple fault is about the only intelligent thing you can do, giving your system the chance to reboot. That I'll given them.
But it took some hacking to get the rest of this to work. Even the BIOS has to be aware of this aweful technique. There's a boot flag in CMOS (reg 0xf) letting the BIOS know what the cause of the shutdown was. That way an intentional switch back to real mode could be detected, and the init routines are bypassed. It jumps to a prescribed address stored in 0x467.
Looks like Intel screwed up, and didn't give the 286 enough power to virtualize real mode stuff. Can you hear that Intel commercial tune playing in your head? Bum bump bum bummmmmmmmmmmm
Also IMHO, by far their greatest mistake in history was when they went to a new protected mode environment in the 286, they carried forward the segmentation architecture. If you think about it, they could have had a strict v8086 environment in the 286 which would virtualize the 8086 completely giving compatability there, then go to a whole new instruction set and architecture in protected mode.
-Kevin - To Unsubscribe: send mail to majordomo@freiburg.linux.de with "unsubscribe openbios" in the body of the message