Index: /trunk/src/VBox/Devices/EFI/DevEFI.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/DevEFI.cpp	(revision 39706)
+++ /trunk/src/VBox/Devices/EFI/DevEFI.cpp	(revision 39707)
@@ -1016,4 +1016,5 @@
                               "DmiUseHostInfo\0"
                               "DmiExposeMemoryTable\0"
+                              "DmiExposeProcInf\0"
                               "64BitEntry\0"
                               "BootArgs\0"
@@ -1199,15 +1200,11 @@
      * Plant DMI and MPS tables
      */
-    rc = FwCommonPlantDMITable(pDevIns,
-                               pThis->au8DMIPage,
-                               VBOX_DMI_TABLE_SIZE,
-                               &pThis->aUuid,
-                               pDevIns->pCfg);
+    rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage,
+                               VBOX_DMI_TABLE_SIZE, &pThis->aUuid, pDevIns->pCfg, pThis->cCpus);
     AssertRCReturn(rc, rc);
     if (pThis->u8IOAPIC)
         FwCommonPlantMpsTable(pDevIns,
                               pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE,
-                              _4K - VBOX_DMI_TABLE_SIZE,
-                              pThis->cCpus);
+                              _4K - VBOX_DMI_TABLE_SIZE, pThis->cCpus);
     rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage, _4K,
                               PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, "DMI tables");
Index: /trunk/src/VBox/Devices/PC/DevFwCommon.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevFwCommon.cpp	(revision 39706)
+++ /trunk/src/VBox/Devices/PC/DevFwCommon.cpp	(revision 39707)
@@ -65,4 +65,6 @@
 static const char   *s_szDefDmiChassisSerial    = "";
 static const char   *s_szDefDmiChassisAssetTag  = "";
+static const char   *s_szDefDmiProcManufacturer = "GenuineIntel";
+static const char   *s_szDefDmiProcVersion      = "Pentium(R) III";
 
 static       char    g_szHostDmiSystemProduct[64];
@@ -189,5 +191,5 @@
     uint8_t         u8ProcessorFamily;
     uint8_t         u8ProcessorManufacturer;
-    uint64_t        u64ProcessorIdentification;
+    uint64_t        u64ProcessorID;
     uint8_t         u8ProcessorVersion;
     uint8_t         u8Voltage;
@@ -197,14 +199,18 @@
     uint8_t         u8Status;
     uint8_t         u8ProcessorUpgrade;
+    /* v2.1+ */
     uint16_t        u16L1CacheHandle;
     uint16_t        u16L2CacheHandle;
     uint16_t        u16L3CacheHandle;
+    /* v2.3+ */
     uint8_t         u8SerialNumber;
     uint8_t         u8AssetTag;
     uint8_t         u8PartNumber;
+    /* v2.5+ */
     uint8_t         u8CoreCount;
     uint8_t         u8CoreEnabled;
     uint8_t         u8ThreadCount;
     uint16_t        u16ProcessorCharacteristics;
+    /* v2.6+ */
     uint16_t        u16ProcessorFamily2;
 } *PDMIPROCESSORINF;
@@ -398,5 +404,5 @@
  * @param   pCfg                The handle to our config node.
  */
-int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg)
+int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus)
 {
 #define CHECKSIZE(cbWant) \
@@ -514,4 +520,9 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to read \"DmiExposeMemoryTable\""));
+    uint8_t fDmiExposeProcessorInf;
+    rc = CFGMR3QueryU8Def(pCfg, "DmiExposeProcInf", &fDmiExposeProcessorInf, 0);
+    if (RT_FAILURE (rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to read \"DmiExposeProcInf\""));
 
     for  (;; fForceDefault = true, fHideErrors = false)
@@ -606,5 +617,5 @@
         PDMISYSTEMINF pSystemInf     = (PDMISYSTEMINF)pszStr;
         CHECKSIZE(sizeof(*pSystemInf));
-        pszStr                       = (char *)(pSystemInf + 1);
+        START_STRUCT(pSystemInf);
         iStrNr                       = 1;
         pSystemInf->header.u8Type    = 1; /* System Information */
@@ -675,63 +686,127 @@
         TERM_STRUCT;
 
+        /**************************************
+         * DMI Processor Information (Type 4) *
+         **************************************/
+
+        /*
+         * This is just a dummy processor. Should we expose the real guest CPU features
+         * here? Accessing this information at this point is difficult.
+         */
+        char szSocket[32];
+        PDMIPROCESSORINF pProcessorInf = (PDMIPROCESSORINF)pszStr;
+        CHECKSIZE(sizeof(*pProcessorInf));
+        START_STRUCT(pProcessorInf);
+        iStrNr                             = 1;
+        if (fDmiExposeProcessorInf)
+            pProcessorInf->header.u8Type   = 4; /* Processor Information */
+        else
+            pProcessorInf->header.u8Type   = 126; /* inactive structure */
+        pProcessorInf->header.u8Length     = sizeof(*pProcessorInf);
+        pProcessorInf->header.u16Handle    = 0x0007;
+        RTStrPrintf(szSocket, sizeof(szSocket), "Socket #%u", 0);
+        pProcessorInf->u8SocketDesignation = iStrNr++;
+        {
+            size_t cStr = strlen(szSocket) + 1;
+            CHECKSIZE(cStr);
+            memcpy(pszStr, szSocket, cStr);
+            pszStr += cStr;
+        }
+        pProcessorInf->u8ProcessorType     = 0x03; /* Central Processor */
+        pProcessorInf->u8ProcessorFamily   = 0xB1; /* Pentium III with Intel SpeedStep(TM) */
+        READCFGSTR(pProcessorInf->u8ProcessorManufacturer, DmiProcManufacturer);
+
+        pProcessorInf->u64ProcessorID      = UINT64_C(0x0FEBFBFF00010676);
+                                             /* Ext Family ID  = 0
+                                              * Ext Model ID   = 2
+                                              * Processor Type = 0
+                                              * Family ID      = 6
+                                              * Model          = 7
+                                              * Stepping       = 6
+                                              * Features: FPU, VME, DE, PSE, TSC, MSR, PAE, MCE, CX8,
+                                              *           APIC, SEP, MTRR, PGE, MCA, CMOV, PAT, PSE-36,
+                                              *           CFLSH, DS, ACPI, MMX, FXSR, SSE, SSE2, SS */
+        READCFGSTR(pProcessorInf->u8ProcessorVersion, DmiProcVersion);
+        pProcessorInf->u8Voltage           = 0x02;   /* 3.3V */
+        pProcessorInf->u16ExternalClock    = 0x00;   /* unknown */
+        pProcessorInf->u16MaxSpeed         = 3000;   /* 3GHz */
+        pProcessorInf->u16CurrentSpeed     = 3000;   /* 3GHz */
+        pProcessorInf->u8Status            = RT_BIT(6)  /* CPU socket populated */
+                                           | RT_BIT(0)  /* CPU enabled */
+                                           ;
+        pProcessorInf->u8ProcessorUpgrade  = 0x04;   /* ZIF Socket */
+        pProcessorInf->u16L1CacheHandle    = 0x001C;
+        pProcessorInf->u16L2CacheHandle    = 0x001D;
+        pProcessorInf->u16L3CacheHandle    = 0xFFFF; /* unknown */
+        pProcessorInf->u8SerialNumber      = 0;      /* not specified */
+        pProcessorInf->u8AssetTag          = 0;      /* not specified */
+        pProcessorInf->u8PartNumber        = 0;      /* not specified */
+        pProcessorInf->u8CoreCount         = cCpus;  /*  */
+        pProcessorInf->u8CoreEnabled       = cCpus;
+        pProcessorInf->u8ThreadCount       = 1;
+        pProcessorInf->u16ProcessorCharacteristics 
+                                           = RT_BIT(2); /* 64-bit capable */
+        pProcessorInf->u16ProcessorFamily2 = 0;
+        TERM_STRUCT;
+
+        /***************************************
+         * DMI Physical Memory Array (Type 16) *
+         ***************************************/
+        uint64_t u64RamSize;
+        rc = CFGMR3QueryU64(pCfg, "RamSize", &u64RamSize);
+        if (RT_FAILURE (rc))
+            return PDMDEV_SET_ERROR(pDevIns, rc,
+                                    N_("Configuration error: Failed to read \"RamSize\""));
+
+        PDMIRAMARRAY pMemArray = (PDMIRAMARRAY)pszStr;
+        CHECKSIZE(sizeof(*pMemArray));
+        START_STRUCT(pMemArray);
         if (fDmiExposeMemoryTable)
-        {
-            /***************************************
-             * DMI Physical Memory Array (Type 16) *
-             ***************************************/
-            uint64_t u64RamSize;
-            rc = CFGMR3QueryU64(pCfg, "RamSize", &u64RamSize);
-            if (RT_FAILURE (rc))
-                return PDMDEV_SET_ERROR(pDevIns, rc,
-                                        N_("Configuration error: Failed to read \"RamSize\""));
-
-            PDMIRAMARRAY pMemArray = (PDMIRAMARRAY)pszStr;
-            CHECKSIZE(sizeof(*pMemArray));
-
-            START_STRUCT(pMemArray);
-            pMemArray->header.u8Type    = 16; /* Physical Memory Array */
-            pMemArray->header.u8Length  = sizeof(*pMemArray);
-            pMemArray->header.u16Handle = 0x0005;
-            pMemArray->u8Location = 0x03; /* Motherboard */
-            pMemArray->u8Use = 0x03; /* System memory */
-            pMemArray->u8MemErrorCorrection = 0x01; /* Other */
-            uint32_t u32RamSizeK = (uint32_t)(u64RamSize / _1K);
-            pMemArray->u32MaxCapacity = u32RamSizeK; /* RAM size in K */
-            pMemArray->u16MemErrorHandle = 0xfffe; /* No error info structure */
-            pMemArray->u16NumberOfMemDevices = 1;
-            TERM_STRUCT;
-
-            /***************************************
-             * DMI Memory Device (Type 17)         *
-             ***************************************/
-            PDMIMEMORYDEV pMemDev = (PDMIMEMORYDEV)pszStr;
-            CHECKSIZE(sizeof(*pMemDev));
-
-            START_STRUCT(pMemDev);
-            pMemDev->header.u8Type    = 17; /* Memory Device */
-            pMemDev->header.u8Length  = sizeof(*pMemDev);
-            pMemDev->header.u16Handle = 0x0006;
-            pMemDev->u16PhysMemArrayHandle = 0x0005; /* handle of array we belong to */
-            pMemDev->u16MemErrHandle = 0xfffe; /* system doesn't provide this information */
-            pMemDev->u16TotalWidth = 0xffff; /* Unknown */
-            pMemDev->u16DataWidth = 0xffff;  /* Unknown */
-            int16_t u16RamSizeM = (uint16_t)(u64RamSize / _1M);
-            if (u16RamSizeM == 0)
-                u16RamSizeM = 0x400; /* 1G */
-            pMemDev->u16Size = u16RamSizeM; /* RAM size */
-            pMemDev->u8FormFactor = 0x09; /* DIMM */
-            pMemDev->u8DeviceSet = 0x00; /* Not part of a device set */
-            READCFGSTRDEF(pMemDev->u8DeviceLocator, " ", "DIMM 0");
-            READCFGSTRDEF(pMemDev->u8BankLocator, " ", "Bank 0");
-            pMemDev->u8MemoryType = 0x03; /* DRAM */
-            pMemDev->u16TypeDetail = 0; /* Nothing special */
-            pMemDev->u16Speed = 1600; /* Unknown, shall be speed in MHz */
-            READCFGSTR(pMemDev->u8Manufacturer, DmiSystemVendor);
-            READCFGSTRDEF(pMemDev->u8SerialNumber, " ", "00000000");
-            READCFGSTRDEF(pMemDev->u8AssetTag, " ", "00000000");
-            READCFGSTRDEF(pMemDev->u8PartNumber, " ", "00000000");
-            pMemDev->u8Attributes = 0; /* Unknown */
-            TERM_STRUCT;
-        }
+            pMemArray->header.u8Type     = 16;     /* Physical Memory Array */
+        else
+            pMemArray->header.u8Type     = 126;    /* inactive structure */
+        pMemArray->header.u8Length       = sizeof(*pMemArray);
+        pMemArray->header.u16Handle      = 0x0005;
+        pMemArray->u8Location            = 0x03;   /* Motherboard */
+        pMemArray->u8Use                 = 0x03;   /* System memory */
+        pMemArray->u8MemErrorCorrection  = 0x01;   /* Other */
+        pMemArray->u32MaxCapacity        = (uint32_t)(u64RamSize / _1K); /* RAM size in K */
+        pMemArray->u16MemErrorHandle     = 0xfffe; /* No error info structure */
+        pMemArray->u16NumberOfMemDevices = 1;
+        TERM_STRUCT;
+
+        /***************************************
+         * DMI Memory Device (Type 17)         *
+         ***************************************/
+        PDMIMEMORYDEV pMemDev = (PDMIMEMORYDEV)pszStr;
+        CHECKSIZE(sizeof(*pMemDev));
+        START_STRUCT(pMemDev);
+        if (fDmiExposeMemoryTable)
+            pMemDev->header.u8Type       = 17;     /* Memory Device */
+        else
+            pMemDev->header.u8Type       = 126;    /* inactive structure */
+        pMemDev->header.u8Length         = sizeof(*pMemDev);
+        pMemDev->header.u16Handle        = 0x0006;
+        pMemDev->u16PhysMemArrayHandle   = 0x0005; /* handle of array we belong to */
+        pMemDev->u16MemErrHandle         = 0xfffe; /* system doesn't provide this information */
+        pMemDev->u16TotalWidth           = 0xffff; /* Unknown */
+        pMemDev->u16DataWidth            = 0xffff; /* Unknown */
+        int16_t u16RamSizeM = (uint16_t)(u64RamSize / _1M);
+        if (u16RamSizeM == 0)
+            u16RamSizeM = 0x400; /* 1G */
+        pMemDev->u16Size                 = u16RamSizeM; /* RAM size */
+        pMemDev->u8FormFactor            = 0x09; /* DIMM */
+        pMemDev->u8DeviceSet             = 0x00; /* Not part of a device set */
+        READCFGSTRDEF(pMemDev->u8DeviceLocator, " ", "DIMM 0");
+        READCFGSTRDEF(pMemDev->u8BankLocator, " ", "Bank 0");
+        pMemDev->u8MemoryType            = 0x03; /* DRAM */
+        pMemDev->u16TypeDetail           = 0;    /* Nothing special */
+        pMemDev->u16Speed                = 1600; /* Unknown, shall be speed in MHz */
+        READCFGSTR(pMemDev->u8Manufacturer, DmiSystemVendor);
+        READCFGSTRDEF(pMemDev->u8SerialNumber, " ", "00000000");
+        READCFGSTRDEF(pMemDev->u8AssetTag, " ", "00000000");
+        READCFGSTRDEF(pMemDev->u8PartNumber, " ", "00000000");
+        pMemDev->u8Attributes            = 0; /* Unknown */
+        TERM_STRUCT;
 
         /*****************************
@@ -740,10 +815,10 @@
         PDMIOEMSTRINGS pOEMStrings    = (PDMIOEMSTRINGS)pszStr;
         CHECKSIZE(sizeof(*pOEMStrings));
-        pszStr                        = (char *)(pOEMStrings + 1);
+        START_STRUCT(pOEMStrings);
         iStrNr                        = 1;
 #ifdef VBOX_WITH_DMI_OEMSTRINGS
         pOEMStrings->header.u8Type    = 0xb; /* OEM Strings */
 #else
-        pOEMStrings->header.u8Type    = 0x7e; /* inactive */
+        pOEMStrings->header.u8Type    = 126; /* inactive structure */
 #endif
         pOEMStrings->header.u8Length  = sizeof(*pOEMStrings);
@@ -762,5 +837,9 @@
         PDMIHDR pEndOfTable          = (PDMIHDR)pszStr;
         pEndOfTable->u8Type          = 0x7f;
-        pEndOfTable->u8Length        = cbMax - ((char *)pszStr - (char *)pTable) - 2;
+        uint32_t cbEof = cbMax - ((uintptr_t)pszStr - (uintptr_t)pTable) - 2;
+        if (cbEof > 255)
+            return PDMDevHlpVMSetError(pDevIns, VERR_TOO_MUCH_DATA, RT_SRC_POS, \
+                                       N_("DMI table has the wrong length (%u bytes left for the EOF marker). One of the DMI strings is too long. Check all bios/Dmi* configuration entries"), cbEof); \
+        pEndOfTable->u8Length        = cbEof;
         pEndOfTable->u16Handle       = 0xFEFF;
 
@@ -818,5 +897,5 @@
     PDMDevHlpPhysWrite(pDevIns, 0xfe300, &aBiosHeaders, sizeof(aBiosHeaders));
 }
-AssertCompile(VBOX_DMI_TABLE_ENTR == 5);
+AssertCompile(VBOX_DMI_TABLE_ENTR == 8);
 
 /**
Index: /trunk/src/VBox/Devices/PC/DevFwCommon.h
===================================================================
--- /trunk/src/VBox/Devices/PC/DevFwCommon.h	(revision 39706)
+++ /trunk/src/VBox/Devices/PC/DevFwCommon.h	(revision 39707)
@@ -28,5 +28,5 @@
 
 /* Plant DMI table */
-int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg);
+int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus);
 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns);
 
Index: /trunk/src/VBox/Devices/PC/DevPcBios.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 39706)
+++ /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 39707)
@@ -982,4 +982,5 @@
                               "DmiUseHostInfo\0"
                               "DmiExposeMemoryTable\0"
+                              "DmiExposeProcInf\0"
                               ))
         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
@@ -1089,5 +1090,5 @@
     uuid.Gen.u16TimeHiAndVersion = RT_H2BE_U16(uuid.Gen.u16TimeHiAndVersion);
     rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage,
-                               VBOX_DMI_TABLE_SIZE, &uuid, pCfg);
+                               VBOX_DMI_TABLE_SIZE, &uuid, pCfg, pThis->cCpus);
     if (RT_FAILURE(rc))
         return rc;
Index: /trunk/src/VBox/Devices/PC/DevPcBios.h
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPcBios.h	(revision 39706)
+++ /trunk/src/VBox/Devices/PC/DevPcBios.h	(revision 39707)
@@ -22,5 +22,5 @@
 #define VBOX_DMI_TABLE_BASE         0xe1000
 #define VBOX_DMI_TABLE_VER          0x25
-#define VBOX_DMI_TABLE_ENTR         5
+#define VBOX_DMI_TABLE_ENTR         8
 
 /** def VBOX_DMI_TABLE_SIZE
@@ -31,5 +31,5 @@
  * the MPS table.
  */
-#define VBOX_DMI_TABLE_SIZE         352
+#define VBOX_DMI_TABLE_SIZE         496
 
 
