[FAST486]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Wed, 5 Nov 2014 00:27:43 +0000 (00:27 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Wed, 5 Nov 2014 00:27:43 +0000 (00:27 +0000)
Fix the paging exception code.

svn path=/trunk/; revision=65261

reactos/lib/fast486/common.inl

index 06dafe8..8bc4cf8 100644 (file)
@@ -175,7 +175,7 @@ Fast486ReadLinearMemory(PFAST486_STATE State,
                 /* Exception */
                 Fast486ExceptionWithErrorCode(State,
                                               FAST486_EXCEPTION_PF,
-                                              TableEntry.Value & 0x07);
+                                              TableEntry.Present | (State->Cpl ? 0x04 : 0));
                 return FALSE;
             }
 
@@ -244,7 +244,7 @@ Fast486WriteLinearMemory(PFAST486_STATE State,
                 /* Exception */
                 Fast486ExceptionWithErrorCode(State,
                                               FAST486_EXCEPTION_PF,
-                                              TableEntry.Value & 0x07);
+                                              TableEntry.Present | 0x02 | (State->Cpl ? 0x04 : 0));
                 return FALSE;
             }