[VIDEOPRT]
[reactos.git] / reactos / win32ss / drivers / videoprt / int10.c
index b6a5eb9..0893db7 100644 (file)
@@ -58,7 +58,7 @@ IntInitializeVideoAddressSpace(VOID)
     /* Open the physical memory section */
     InitializeObjectAttributes(&ObjectAttributes,
                                &PhysMemName,
-                               0,
+                               OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
                                NULL,
                                NULL);
     Status = ZwOpenSection(&PhysMemHandle,
@@ -135,6 +135,15 @@ IntInitializeVideoAddressSpace(VOID)
     /* Return success */
     return STATUS_SUCCESS;
 }
+#else
+NTSTATUS
+NTAPI
+IntInitializeVideoAddressSpace(VOID)
+{
+    UNIMPLEMENTED;
+    NT_ASSERT(FALSE);
+    return STATUS_NOT_IMPLEMENTED;
+}
 #endif
 
 #if defined(_M_IX86)
@@ -287,7 +296,9 @@ IntInt10CallBios(
     BiosContext.SegEs = BiosArguments->SegEs;
 
     /* Do the ROM BIOS call */
+    (void)KeWaitForMutexObject(&VideoPortInt10Mutex, Executive, KernelMode, FALSE, NULL);
     Status = Ke386CallBios(0x10, &BiosContext);
+    KeReleaseMutex(&VideoPortInt10Mutex, FALSE);
 
     /* Return the arguments */
     BiosArguments->Eax = BiosContext.Eax;
@@ -345,7 +356,9 @@ VideoPortInt10(
     BiosContext.Ebp = BiosArguments->Ebp;
 
     /* Do the ROM BIOS call */
+    (void)KeWaitForMutexObject(&VideoPortInt10Mutex, Executive, KernelMode, FALSE, NULL);
     Status = Ke386CallBios(0x10, &BiosContext);
+    KeReleaseMutex(&VideoPortInt10Mutex, FALSE);
 
     /* Return the arguments */
     BiosArguments->Eax = BiosContext.Eax;