diff --git a/reactos/ntoskrnl/include/internal/amd64/intrin_i.h b/reactos/ntoskrnl/include/internal/amd64/intrin_i.h index a09c4acdc31..908d2eea9a7 100644 --- a/reactos/ntoskrnl/include/internal/amd64/intrin_i.h +++ b/reactos/ntoskrnl/include/internal/amd64/intrin_i.h @@ -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; \ diff --git a/reactos/ntoskrnl/include/internal/amd64/ke.h b/reactos/ntoskrnl/include/internal/amd64/ke.h index 39cbbfc21ef..42a5a353ae5 100644 --- a/reactos/ntoskrnl/include/internal/amd64/ke.h +++ b/reactos/ntoskrnl/include/internal/amd64/ke.h @@ -54,7 +54,7 @@ typedef struct _KIDT_INIT { UCHAR InterruptId; UCHAR Dpl; - UCHAR Type; + UCHAR IstIndex; PVOID ServiceRoutine; } KIDT_INIT, *PKIDT_INIT; diff --git a/reactos/ntoskrnl/ke/amd64/except.c b/reactos/ntoskrnl/ke/amd64/except.c index 1de3a70a6b6..c21905471be 100644 --- a/reactos/ntoskrnl/ke/amd64/except.c +++ b/reactos/ntoskrnl/ke/amd64/except.c @@ -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;