[NTVDM]: The BIOS should have its BDA and BCT zero'ed out.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 28 Sep 2014 19:55:28 +0000 (19:55 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 28 Sep 2014 19:55:28 +0000 (19:55 +0000)
svn path=/trunk/; revision=64378

reactos/subsystems/ntvdm/bios/bios32/bios32.c
reactos/subsystems/ntvdm/emulator.c

index b012d90..fa4bc01 100644 (file)
@@ -499,6 +499,8 @@ static VOID InitializeBiosInt32(VOID)
 
 static VOID InitializeBiosInfo(VOID)
 {
+    RtlZeroMemory(Bct, sizeof(*Bct));
+
     Bct->Length     = sizeof(*Bct);
     Bct->Model      = BIOS_MODEL;
     Bct->SubModel   = BIOS_SUBMODEL;
@@ -527,6 +529,7 @@ static VOID InitializeBiosData(VOID)
     *(PBYTE)(SEG_OFF_TO_PTR(0xF000, 0xFFFE)) = BIOS_MODEL;
 
     /* Initialize the BDA contents */
+    RtlZeroMemory(Bda, sizeof(*Bda));
     Bda->EquipmentList = BIOS_EQUIPMENT_LIST;
 
     /*
index 21a0644..18121b0 100644 (file)
@@ -550,7 +550,7 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
         return FALSE;
     }
     // For diagnostics purposes!!
-    FillMemory(BaseAddress, MAX_ADDRESS, 0xFF);
+    RtlFillMemory(BaseAddress, MAX_ADDRESS, 0xFF);
 
     /* Initialize I/O ports */
     /* Initialize RAM */