-/* $Id: video.c,v 1.5 2002/09/07 15:13:07 chorns Exp $
+/* $Id$
*
* ReactOS Project
*/
-#define NTOS_USER_MODE
-#include <ntos.h>
+#include <csrss.h>
+
+#define NDEBUG
+#include <debug.h>
ULONG
InitializeVideoAddressSpace(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING PhysMemName;
+ UNICODE_STRING PhysMemName = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory");
NTSTATUS Status;
HANDLE PhysMemHandle;
PVOID BaseAddress;
+ PVOID NullAddress;
LARGE_INTEGER Offset;
ULONG ViewSize;
- PUCHAR TextMap;
CHAR IVT[1024];
CHAR BDA[256];
/*
* Open the physical memory section
*/
- RtlInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory");
InitializeObjectAttributes(&ObjectAttributes,
&PhysMemName,
0,
NULL,
NULL);
- Status = NtOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS,
+ Status = ZwOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
{
DbgPrint("NtVdmControl failed (status %x)\n", Status);
return(0);
}
-
+
/*
* Copy the real mode IVT into the right place
*/
- memcpy((PVOID)0x0, IVT, 1024);
-
+ NullAddress = (PVOID)0x0; /* Workaround for GCC 3.4 */
+ memcpy(NullAddress, IVT, 1024);
+
/*
* Get the BDA from the kernel
*/
DbgPrint("NtVdmControl failed (status %x)\n", Status);
return(0);
}
-
+
/*
* Copy the BDA into the right place
*/