CR3 is PHYSICAL not VIRTUAL
authorJohn Hodge <[email protected]>
Fri, 25 Sep 2009 02:46:01 +0000 (10:46 +0800)
committerJohn Hodge <[email protected]>
Fri, 25 Sep 2009 02:46:01 +0000 (10:46 +0800)
Kernel/arch/x86/proc.c

index bdce0ca..bb93bfc 100644 (file)
@@ -136,7 +136,7 @@ void ArchThreads_Init()
        gThreadZero.MemState.PDP[1] = 0;
        gThreadZero.MemState.PDP[2] = 0;
        #else
-       gThreadZero.MemState.CR3 = (Uint)gaInitPageDir;
+       gThreadZero.MemState.CR3 = (Uint)gaInitPageDir - KERNEL_BASE;
        #endif
        
        // Set timer frequency

UCC git Repository :: git.ucc.asn.au