VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

Does CR2 always contain the linear address for which a pde/pte caused a fault? Does the OS need to figure out if a PDE isn't present, or is that indicated by CR2 and error code? So if a PDE is marked non-present, what does CR2 contain? The full PDE-PTE-4KBoffset address?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 3, by Stenzek

User metadata
Rank Newbie
Rank
Newbie

The full linear address which caused the exception, regardless of PDE/PDT. The present bit in the error code is for both as well, as far as I'm aware. The Intel manuals are pretty clear here.

Reply 2 of 3, by superfury

User metadata
Rank l33t++
Rank
l33t++

Well, the Windows 95 crashing page fault is a bit odd: it's on referencing a PDE being 0x5000? Apparently the kernel doesn't like it and crashes VPICD.VXD?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 3 of 3, by Stenzek

User metadata
Rank Newbie
Rank
Newbie

If the value being written into the page directory is invalid, it might be worth setting a memory breakpoint on the physical address of the PDE, and examining the CPU state. If you find the instruction which is setting it, I can compare to my emulator.