Fix Ke386SaveFlags and Ke386RestoreFlags. Rename KIDT_INIT's 3rd member to IstIndex and use it in KeInitExceptions.

svn path=/branches/ros-amd64-bringup/; revision=35548
This commit is contained in:
Timo Kreuzer
2008-08-23 01:31:51 +00:00
parent 8082ce88e5
commit 5190b92232
3 changed files with 6 additions and 5 deletions
@@ -48,8 +48,8 @@
: /* no outputs */ \
: "m" (X));
#define Ke386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
#define Ke386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
#define Ke386SaveFlags(x) __asm__ __volatile__("pushfq ; popq %0":"=g" (x): /* no input */)
#define Ke386RestoreFlags(x) __asm__ __volatile__("pushq %0 ; popfq": /* no output */ :"g" (x):"memory")
#define _Ke386GetSeg(N) ({ \
unsigned int __d; \
+1 -1
View File
@@ -54,7 +54,7 @@ typedef struct _KIDT_INIT
{
UCHAR InterruptId;
UCHAR Dpl;
UCHAR Type;
UCHAR IstIndex;
PVOID ServiceRoutine;
} KIDT_INIT, *PKIDT_INIT;
+3 -2
View File
@@ -42,7 +42,7 @@ KIDT_INIT KiInterruptInitTable[] =
{0x2D, 0x03, 0x00, KiDebugServiceTrap},
{0x2F, 0x00, 0x00, KiDpcInterrupt},
{0xE1, 0x00, 0x00, KiIpiInterrupt},
{0, 0}
{0, 0, 0, 0}
};
KIDTENTRY64 KiIdt[256];
@@ -68,17 +68,18 @@ KeInitExceptions(VOID)
{
Offset = (ULONG64)KiInterruptInitTable[j].ServiceRoutine;
KiIdt[i].Dpl = KiInterruptInitTable[j].Dpl;
KiIdt[i].IstIndex = KiInterruptInitTable[j].IstIndex;
j++;
}
else
{
Offset = (ULONG64)KiUnexpectedInterrupt;
KiIdt[i].Dpl = 0;
KiIdt[i].IstIndex = 0;
}
KiIdt[i].OffsetLow = Offset & 0xffff;
KiIdt[i].Selector = KGDT_64_R0_CODE;
KiIdt[i].Type = 0x0e;
KiIdt[i].IstIndex = 0;
KiIdt[i].Reserved0 = 0;
KiIdt[i].Present = 1;
KiIdt[i].OffsetMiddle = (Offset >> 16) & 0xffff;