Fix IDT limit.

svn path=/trunk/; revision=42566
This commit is contained in:
Dmitry Gorbachev 2009-08-09 14:40:05 +00:00
parent 46ad3be153
commit 5f73e1c2bc
2 changed files with 20 additions and 20 deletions

View file

@ -220,5 +220,5 @@ EXTERN(i386idt)
/* IDT table pointer */ /* IDT table pointer */
EXTERN(i386idtptr) EXTERN(i386idtptr)
.word (i386idtptr-i386idt) /* Limit */ .word (i386idtptr - i386idt - 1) /* Limit */
.long i386idt /* Base Address */ .long i386idt /* Base Address */

View file

@ -912,7 +912,7 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss)
// //
// Copy the old IDT // Copy the old IDT
RtlCopyMemory(pIdt, (PVOID)OldIdt.Base, OldIdt.Limit); RtlCopyMemory(pIdt, (PVOID)OldIdt.Base, OldIdt.Limit + 1);
// Mask interrupts // Mask interrupts
//asm("cli\n"); // they are already masked before enabling paged mode //asm("cli\n"); // they are already masked before enabling paged mode