Paging: Difference between revisions

[unchecked revision][unchecked revision]
m (This article is pretty much inaccurate)
Line 156:
 
=== Handling ===
The CPU pushes an error code on the stack before firing a page fault exception. The error code must be analyzed by the exception handler to determine how to handle the exception. The bottom 3following bits of the exception code are the only ones used, bitsall 3-31others are reserved.
Bit 0 (P) is the Present flag.
Bit 1 (R/W) is the Read/Write flag.
Bit 2 (U/S) is the User/Supervisor flag.
Bit 3 (RSVD) indicates whether a reserved bit was set in some page-structure entry
Bit 4 (I/D) is the Instruction/Data flag (1=instruction fetch, 0=data access)
Bit 5 (PK) indicates a protection-key violation
Bit 6 (SS) indicates a shadow-stack access fault
Bit 15 (SGX) indicates an [https://en.wikipedia.org/wiki/Software_Guard_Extensions SGX violaton]
 
The combination of these flags specify the details of the page fault and indicate what action to take:
US RW P - Description
Anonymous user