Attempting to fix an intermittent TSS bug
authorJohn Hodge <tpg@prelude.(none)>
Mon, 28 Dec 2009 15:28:08 +0000 (23:28 +0800)
committerJohn Hodge <tpg@prelude.(none)>
Mon, 28 Dec 2009 15:28:08 +0000 (23:28 +0800)
Kernel/Makefile.BuildNum
Kernel/arch/x86/desctab.asm
Kernel/arch/x86/proc.c

index 969752c..aad49c5 100644 (file)
@@ -21,8 +21,8 @@ gGDT:
        dd 0x0000FFFF, 0x00CF9200       ; 10 PL0 Data
        dd 0x0000FFFF, 0x00CFFA00       ; 18 PL3 Code
        dd 0x0000FFFF, 0x00CFF200       ; 20 PL3 Data
-       dd 0, 0 ; Double Fault TSS
-       times MAX_CPUS  dd 0, 0
+       dd 26*4-1, 0x00408900   ; Double Fault TSS
+       times MAX_CPUS  dd 26*4-1, 0x00408900
 gGDTptr:
        dw      GDT_SIZE-1
        dd      gGDT
index 2d68d65..9841c22 100644 (file)
@@ -116,10 +116,12 @@ void ArchThreads_Init()
        #endif
        
        // Initialise Double Fault TSS
+       /*
        gGDT[5].LimitLow = sizeof(tTSS);
        gGDT[5].LimitHi = 0;
        gGDT[5].Access = 0x89;  // Type
        gGDT[5].Flags = 0x4;
+       */
        gGDT[5].BaseLow = (Uint)&gDoubleFault_TSS & 0xFFFF;
        gGDT[5].BaseMid = (Uint)&gDoubleFault_TSS >> 16;
        gGDT[5].BaseHi = (Uint)&gDoubleFault_TSS >> 24;
@@ -136,10 +138,12 @@ void ArchThreads_Init()
                gGDT[6+pos].BaseLow = ((Uint)(&gTSSs[pos])) & 0xFFFF;
                gGDT[6+pos].BaseMid = ((Uint)(&gTSSs[pos])) >> 16;
                gGDT[6+pos].BaseHi = ((Uint)(&gTSSs[pos])) >> 24;
+               /*
                gGDT[6+pos].LimitLow = sizeof(tTSS);
                gGDT[6+pos].LimitHi = 0;
                gGDT[6+pos].Access = 0x89;      // Type
                gGDT[6+pos].Flags = 0x4;
+               */
        #if USE_MP
        }
        for(pos=0;pos<giNumCPUs;pos++) {

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