[vbox-dev] Updating _DMI_ needs updating _SM_

Jan Schunk scpcom at gmx.de
Sat Mar 31 19:39:55 GMT 2012


pcbiosConstruct has now code updating the _DMI_ structure, but this also 
needs updating the _SM_ structure.


-------------- next part --------------
Index: VBox/Devices/PC/DevPcBios.cpp
===================================================================
--- VBox/Devices/PC/DevPcBios.cpp	(revision 40732)
+++ VBox/Devices/PC/DevPcBios.cpp	(working copy)
@@ -1278,6 +1278,19 @@
         pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET + 0x05] = -u8Sum;
     }
 
+    if (   pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x00] == '_'
+        && pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x01] == 'S'
+        && pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x02] == 'M'
+        && pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x03] == '_')
+    {
+        /* *(uint8_t*)&pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x05] = 0x1F; */
+        uint8_t u8Sum = 0;
+        for (unsigned i = 0; i < *(uint8_t*)&pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x05]; i++)
+            if (i != 0x04)
+                u8Sum += pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + i];
+        pThis->pu8PcBios[VBOX_DMI_TABLE_OFFSET - 0x10 + 0x04] = -u8Sum;
+    }
+
     if (pThis->u8IOAPIC)
         FwCommonPlantMpsTable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE,
                               _4K - VBOX_DMI_TABLE_SIZE, pThis->cCpus);


More information about the vbox-dev mailing list