returning real mode from pmode
returning real mode from pmode
what precautions must be taken in order to return real mode from pmode. I mean are there some parts of memory not to be touched to return real mode later in pmode (like interrupt vector table area)??
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:returning real mode from pmode
well, anything that contains real mode stuff (e.g. IVT, BDA, EBDA) shouldn't be touched. If you're returning to DOS, then you should additionnally make sure you didn't touch anything that wasn't allocated through DOS functions (including XMS based functions for HMA).
Otherwise, you should make sure the PIC is restored to its initial value, that segment limits are reset to 64K (or you're actually returning to _unreal_ mode), and that TS bit is cleared (or you might experience system hangup on FPU operations).
I think it's all. my SOS does all this (located in kernel/src/init directory of clicker)
Otherwise, you should make sure the PIC is restored to its initial value, that segment limits are reset to 64K (or you're actually returning to _unreal_ mode), and that TS bit is cleared (or you might experience system hangup on FPU operations).
I think it's all. my SOS does all this (located in kernel/src/init directory of clicker)