mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:KE] Explicitly use IOPM_SIZE for initializing the IO map, that is indeed also equal to PAGE_SIZE * 2 but is self-documented.
This commit is contained in:
parent
b2ca7d3ed9
commit
03a9ccce65
3 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue