// === IMPORTS ===
extern Uint32 gaInitPageDir[1024];
extern Uint32 gaInitPageTable[1024];
+extern void Threads_SegFault(Uint Addr);
// === PROTOTYPES ===
void MM_PreinitVirtual();
return;
}
+ // If it was a user, tell the thread handler
+ if(ErrorCode & 4) {
+ Threads_SegFault(Addr);
+ return ;
+ }
+
// -- Check Error Code --
if(ErrorCode & 8)
Warning("Reserved Bits Trashed!");
}
MM_DerefPhys( gaPageDir[i] & ~0xFFF );
+ gaPageDir[i] = 0;
+ INVLPG( &gaPageTable[i*1024] );
}
+ INVLPG( gaPageDir );
-
- return *gTmpCR3;
+ return *gaPageCR3;
}
/**