- Commit the whole mapped BIOS/device registers block, not only the first 2 pages (why so, David?).

- Use Zw instead of Nt.

svn path=/trunk/; revision=36587
This commit is contained in:
Aleksey Bragin 2008-09-29 09:11:55 +00:00
parent 2973483318
commit c3ed3870b5

View file

@ -46,11 +46,11 @@ InitializeVideoAddressSpace(VOID)
Offset.QuadPart = 0xa0000; Offset.QuadPart = 0xa0000;
ViewSize = 0x100000 - 0xa0000; ViewSize = 0x100000 - 0xa0000;
BaseAddress = (PVOID)0xa0000; BaseAddress = (PVOID)0xa0000;
Status = NtMapViewOfSection(PhysMemHandle, Status = ZwMapViewOfSection(PhysMemHandle,
NtCurrentProcess(), NtCurrentProcess(),
&BaseAddress, &BaseAddress,
0, 0,
8192, ViewSize,
&Offset, &Offset,
&ViewSize, &ViewSize,
ViewUnmap, ViewUnmap,
@ -59,12 +59,12 @@ InitializeVideoAddressSpace(VOID)
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("Couldn't map physical memory (%x)\n", Status); DPRINT1("Couldn't map physical memory (%x)\n", Status);
NtClose(PhysMemHandle); ZwClose(PhysMemHandle);
return 0; return 0;
} }
/* Close physical memory section handle */ /* Close physical memory section handle */
NtClose(PhysMemHandle); ZwClose(PhysMemHandle);
if (BaseAddress != (PVOID)0xa0000) if (BaseAddress != (PVOID)0xa0000)
{ {
@ -73,8 +73,8 @@ InitializeVideoAddressSpace(VOID)
return 0; return 0;
} }
/* Map some memory to use for the non-BIOS parts of /* Allocate some low memory to use for the non-BIOS
* the v86 mode address space * parts of the v86 mode address space
*/ */
BaseAddress = (PVOID)0x1; BaseAddress = (PVOID)0x1;
ViewSize = 0xa0000 - 0x1000; ViewSize = 0xa0000 - 0x1000;