First post, by superfury
I notice that when I change the interrupt handler's Present bit of 0 to trigger an #NP exception instead of a #GP exception, EMM386 starts hanging during boot? So it requires non-present descriptors to cause a #GP for some odd reason, instead of the documented #NP?
Anyone knows what's happening or going wrong?
See CPU_ProtectedModeInterrupt() in https://bitbucket.org/superfury/unipcemu/src/ … ion.c?at=master
Edit: Just modified the interrupt handling to act like Bochs: first plain #GP(IDTsel+2+EXT) faulting on the privilege level mismatch(on INT) and invalid descriptor type(type part of the field), then after that checking for the present bit(why is that done after the first two?) which #NP(IDTsel+2+EXT) faults if errored out?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io