Author: dgorbachev Date: Sun Aug 2 23:27:01 2009 New Revision: 42351
URL: http://svn.reactos.org/svn/reactos?rev=42351&view=rev Log: Add a new hack.
Modified: trunk/reactos/ntoskrnl/ke/freeldr.c
Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=4... ============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Sun Aug 2 23:27:01 2009 @@ -66,6 +66,9 @@ ULONG NumberDescriptors = 0; MEMORY_DESCRIPTOR MDArray[60] = { { 0, 0, 0 }, };
+/* Old boot style IDT */ +KIDTENTRY KiHackIdt[256]; + /* FUNCTIONS *****************************************************************/
PMEMORY_ALLOCATION_DESCRIPTOR @@ -1266,10 +1269,16 @@ #if defined(_M_IX86) PKTSS Tss; PKGDTENTRY TssEntry; + KDESCRIPTOR IdtDescriptor = { 0, 0, 0 }; + + Ke386GetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit); + RtlCopyMemory(KiHackIdt, (PVOID)IdtDescriptor.Base, IdtDescriptor.Limit + 1); + IdtDescriptor.Base = (ULONG)&KiHackIdt; + IdtDescriptor.Limit = sizeof(KiHackIdt) - 1;
/* Load the GDT and IDT */ Ke386SetGlobalDescriptorTable(*(PKDESCRIPTOR)&KiGdtDescriptor.Limit); - Ke386SetInterruptDescriptorTable(*(PKDESCRIPTOR)&KiIdtDescriptor.Limit); + Ke386SetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit);
/* Initialize the boot TSS */ Tss = &KiBootTss;