diff --git a/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c index adeac8fdf5a..74623c1a2ca 100644 --- a/ntoskrnl/ke/amd64/kiinit.c +++ b/ntoskrnl/ke/amd64/kiinit.c @@ -75,12 +75,12 @@ KiInitMachineDependent(VOID) // /* Allocate the IOPM save area */ // Ki386IopmSaveArea = ExAllocatePoolWithTag(PagedPool, -// PAGE_SIZE * 2, -// TAG('K', 'e', ' ', ' ')); +// IOPM_SIZE, +// ' eK'); // if (!Ki386IopmSaveArea) // { // /* Bugcheck. We need this for V86/VDM support. */ -// KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0); +// KeBugCheckEx(NO_PAGES_AVAILABLE, 2, IOPM_SIZE, 0, 0); // } } diff --git a/ntoskrnl/ke/i386/kiinit.c b/ntoskrnl/ke/i386/kiinit.c index 230ee5235fb..7fc38067730 100644 --- a/ntoskrnl/ke/i386/kiinit.c +++ b/ntoskrnl/ke/i386/kiinit.c @@ -590,12 +590,12 @@ KiInitializeKernel(IN PKPROCESS InitProcess, /* Allocate the IOPM save area */ Ki386IopmSaveArea = ExAllocatePoolWithTag(PagedPool, - PAGE_SIZE * 2, + IOPM_SIZE, ' eK'); if (!Ki386IopmSaveArea) { /* Bugcheck. We need this for V86/VDM support. */ - KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0); + KeBugCheckEx(NO_PAGES_AVAILABLE, 2, IOPM_SIZE, 0, 0); } } diff --git a/ntoskrnl/ke/i386/v86vdm.c b/ntoskrnl/ke/i386/v86vdm.c index d1c030acc0c..e629f8bb44e 100644 --- a/ntoskrnl/ke/i386/v86vdm.c +++ b/ntoskrnl/ke/i386/v86vdm.c @@ -668,8 +668,8 @@ Ke386CallBios(IN ULONG Int, /* Make sure there's space for two IOPMs, then copy & clear the current */ ASSERT(((PKIPCR)KeGetPcr())->GDT[KGDT_TSS / 8].LimitLow >= (0x2000 + IOPM_OFFSET - 1)); - RtlCopyMemory(Ki386IopmSaveArea, &Tss->IoMaps[0].IoMap, PAGE_SIZE * 2); - RtlZeroMemory(&Tss->IoMaps[0].IoMap, PAGE_SIZE * 2); + RtlCopyMemory(Ki386IopmSaveArea, &Tss->IoMaps[0].IoMap, IOPM_SIZE); + RtlZeroMemory(&Tss->IoMaps[0].IoMap, IOPM_SIZE); /* Save the old offset and base, and set the new ones */ OldOffset = Process->IopmOffset; @@ -681,7 +681,7 @@ Ke386CallBios(IN ULONG Int, Ki386SetupAndExitToV86Mode(VdmTeb); /* Restore IOPM */ - RtlCopyMemory(&Tss->IoMaps[0].IoMap, Ki386IopmSaveArea, PAGE_SIZE * 2); + RtlCopyMemory(&Tss->IoMaps[0].IoMap, Ki386IopmSaveArea, IOPM_SIZE); Process->IopmOffset = OldOffset; Tss->IoMapBase = OldBase;