Index: trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp	(revision 26172)
+++ trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp	(revision 26183)
@@ -42,4 +42,6 @@
 /* Statically compiled AML */
 # include <vboxaml.hex>
+# include <vboxssdt-standard.hex>
+# include <vboxssdt-cpuhotplug.hex>
 #endif
 
@@ -178,5 +180,5 @@
                      */
                     if (   RT_FAILURE(rc)
-                        || strncmp((const char *)pbAmlCode, "DSDT", 4))
+                        || strncmp((const char *)pbAmlCode, pcszSignature, 4))
                     {
                         RTMemFree(pbAmlCode);
@@ -186,4 +188,10 @@
                         if (RT_SUCCESS(rc))
                             rc = VERR_PARSE_ERROR;
+                    }
+                    else
+                    {
+                        *ppbAmlCode = pbAmlCode;
+                        *pcbAmlCode = cbAmlCode;
+                        rc = VINF_SUCCESS;
                     }
                 }
@@ -196,13 +204,27 @@
         MMR3HeapFree(pszAmlFilePath);
     }
-    else if (rc == VERR_CFGM_VALUE_NOT_FOUND)
+
+    return rc;
+}
+
+/* Two only public functions */
+int acpiPrepareDsdt(PPDMDEVINS pDevIns,  void * *ppPtr, size_t *puDsdtLen)
+{
+#ifdef VBOX_WITH_DYNAMIC_DSDT
+    return prepareDynamicDsdt(pDevIns, ppPtr, puDsdtLen);
+#else
+    uint8_t *pbAmlCodeDsdt = NULL;
+    size_t cbAmlCodeDsdt = 0;
+    int rc = acpiAmlLoadExternal(pDevIns, "DsdtFilePath", "DSDT", &pbAmlCodeDsdt, &cbAmlCodeDsdt);
+
+    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
     {
         rc = VINF_SUCCESS;
 
         /* Use the compiled in AML code */
-        cbAmlCode = sizeof(AmlCode);
-        pbAmlCode = (uint8_t *)RTMemAllocZ(cbAmlCode);
-        if (pbAmlCode)
-            memcpy(pbAmlCode, AmlCode, cbAmlCode);
+        cbAmlCodeDsdt = sizeof(AmlCode);
+        pbAmlCodeDsdt = (uint8_t *)RTMemAllocZ(cbAmlCodeDsdt);
+        if (pbAmlCodeDsdt)
+            memcpy(pbAmlCodeDsdt, AmlCode, cbAmlCodeDsdt);
         else
             rc = VERR_NO_MEMORY;
@@ -210,11 +232,11 @@
     else if (RT_FAILURE(rc))
         return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("Configuration error: Failed to read \"AmlFilePath\""));
+                                N_("Configuration error: Failed to read \"DsdtFilePath\""));
 
     if (RT_SUCCESS(rc))
     {
-        patchAml(pDevIns, pbAmlCode, cbAmlCode);
-        *ppPtr = pbAmlCode;
-        *puDsdtLen = cbAmlCode;
+        patchAml(pDevIns, pbAmlCodeDsdt, cbAmlCodeDsdt);
+        *ppPtr = pbAmlCodeDsdt;
+        *puDsdtLen = cbAmlCodeDsdt;
     }
     return rc;
@@ -233,2 +255,55 @@
 }
 
+int acpiPrepareSsdt(PPDMDEVINS pDevIns, void* *ppPtr, size_t *puSsdtLen)
+{
+    uint8_t *pbAmlCodeSsdt = NULL;
+    size_t   cbAmlCodeSsdt = 0;
+    int rc = acpiAmlLoadExternal(pDevIns, "SsdtFilePath", "SSDT", &pbAmlCodeSsdt, &cbAmlCodeSsdt);
+
+    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
+    {
+        bool fCpuHotPlug = false;
+        uint8_t *pbAmlCode = NULL;
+        rc = CFGMR3QueryBoolDef(pDevIns->pCfgHandle, "CpuHotPlug", &fCpuHotPlug, false);
+
+        if (RT_FAILURE(rc))
+            return rc;
+
+        if (fCpuHotPlug)
+        {
+            pbAmlCode     = AmlCodeSsdtCpuHotPlug;
+            cbAmlCodeSsdt = sizeof(AmlCodeSsdtCpuHotPlug);
+        }
+        else
+        {
+            pbAmlCode     = AmlCodeSsdtStandard;
+            cbAmlCodeSsdt = sizeof(AmlCodeSsdtStandard);
+        }
+
+        pbAmlCodeSsdt = (uint8_t *)RTMemAllocZ(cbAmlCodeSsdt);
+        if (pbAmlCodeSsdt)
+            memcpy(pbAmlCodeSsdt, pbAmlCode, cbAmlCodeSsdt);
+        else
+            rc = VERR_NO_MEMORY;
+    }
+    else if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to read \"SsdtFilePath\""));
+
+    if (RT_SUCCESS(rc))
+    {
+        patchAml(pDevIns, pbAmlCodeSsdt, cbAmlCodeSsdt);
+        *ppPtr = pbAmlCodeSsdt;
+        *puSsdtLen = cbAmlCodeSsdt;
+    }
+
+    return VINF_SUCCESS;
+}
+
+int acpiCleanupSsdt(PPDMDEVINS pDevIns, void* pPtr)
+{
+    if (pPtr)
+        RTMemFree(pPtr);
+    return VINF_SUCCESS;
+}
+
