Author: dgorbachev Date: Sun Aug 9 16:40:05 2009 New Revision: 42566
URL: http://svn.reactos.org/svn/reactos?rev=42566&view=rev Log: Fix IDT limit.
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386idt.S trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386idt.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386idt.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386idt.S [iso-8859-1] Sun Aug 9 16:40:05 2009 @@ -27,91 +27,91 @@ .p2align 2 /* force 4-byte alignment */ EXTERN(i386idt) /* Exception 0 - Divide By Zero */ - .word i386DivideByZero /* Offset 0 - 15 */ + .word i386DivideByZero /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Flags, Zero Byte */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 1 - Debug Exception */ - .word i386DebugException /* Offset 0 - 15 */ + .word i386DebugException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 2 - NMI */ - .word i386NMIException /* Offset 0 - 15 */ + .word i386NMIException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 3 - Breakpoint (INT 3) */ - .word i386Breakpoint /* Offset 0 - 15 */ + .word i386Breakpoint /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 4 - Overflow (INTO with EFLAGS[OF] set) */ - .word i386Overflow /* Offset 0 - 15 */ + .word i386Overflow /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 5 - Bound Exception */ - .word i386BoundException /* Offset 0 - 15 */ + .word i386BoundException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 6 - Invalid Opcode */ - .word i386InvalidOpcode /* Offset 0 - 15 */ + .word i386InvalidOpcode /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 7 - FPU Not Available */ - .word i386FPUNotAvailable /* Offset 0 - 15 */ + .word i386FPUNotAvailable /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 8 - Double Fault */ - .word i386DoubleFault /* Offset 0 - 15 */ + .word i386DoubleFault /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 9 - Coprocessor Segment Overrun */ - .word i386CoprocessorSegment /* Offset 0 - 15 */ + .word i386CoprocessorSegment /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 10 (0x0A) - Invalid TSS */ - .word i386InvalidTSS /* Offset 0 - 15 */ + .word i386InvalidTSS /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 11 (0x0B) - Segment Not Present */ - .word i386SegmentNotPresent /* Offset 0 - 15 */ + .word i386SegmentNotPresent /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 12 (0x0C) - Stack Exception */ - .word i386StackException /* Offset 0 - 15 */ + .word i386StackException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 13 (0x0D) - General Protection Fault */ - .word i386GeneralProtectionFault /* Offset 0 - 15 */ + .word i386GeneralProtectionFault /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 14 (0x0E) - Page Fault */ - .word i386PageFault /* Offset 0 - 15 */ + .word i386PageFault /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ @@ -123,19 +123,19 @@ .word 0x0000 /* Offset 16 - 31 */
/* Exception 16 (0x10) - Coprocessor Error */ - .word i386CoprocessorError /* Offset 0 - 15 */ + .word i386CoprocessorError /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 17 (0x11) - Alignment Check */ - .word i386AlignmentCheck /* Offset 0 - 15 */ + .word i386AlignmentCheck /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */
/* Exception 18 (0x12) - Machine Check */ - .word i386MachineCheck /* Offset 0 - 15 */ + .word i386MachineCheck /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ @@ -220,5 +220,5 @@
/* IDT table pointer */ EXTERN(i386idtptr) - .word (i386idtptr-i386idt) /* Limit */ + .word (i386idtptr - i386idt - 1) /* Limit */ .long i386idt /* Base Address */
Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] Sun Aug 9 16:40:05 2009 @@ -912,7 +912,7 @@ //
// Copy the old IDT - RtlCopyMemory(pIdt, (PVOID)OldIdt.Base, OldIdt.Limit); + RtlCopyMemory(pIdt, (PVOID)OldIdt.Base, OldIdt.Limit + 1);
// Mask interrupts //asm("cli\n"); // they are already masked before enabling paged mode