Changeset 71061 in vbox
- Timestamp:
- Feb 19, 2018 5:03:41 PM (7 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
-
EFI/DevEFI.cpp (modified) (2 diffs)
-
PC/DevFwCommon.cpp (modified) (3 diffs)
-
PC/DevFwCommon.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r69500 r71061 1793 1793 * Plant some structures in RAM. 1794 1794 */ 1795 FwCommonPlantSmbiosAndDmiHdrs(pDevIns, pThis->cbDmiTables, pThis->cNumDmiTables);1796 1795 if (pThis->u8IOAPIC) 1797 1796 FwCommonPlantMpsFloatPtr(pDevIns); … … 2388 2387 2389 2388 /* 2390 * Plant DMI and MPS tables. 2391 */ 2392 /** @todo XXX I wonder if we really need these tables as there is no SMBIOS header... */ 2389 * Plant DMI and MPS tables in the ROM region. 2390 */ 2393 2391 rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, VBOX_DMI_TABLE_SIZE, &pThis->aUuid, 2394 2392 pDevIns->pCfg, pThis->cCpus, &pThis->cbDmiTables, &pThis->cNumDmiTables); 2395 2393 AssertRCReturn(rc, rc); 2394 2395 /* 2396 * NB: VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.c scans memory for 2397 * the SMBIOS header. The header must be placed in a range that EFI will scan. 2398 */ 2399 FwCommonPlantSmbiosAndDmiHdrs(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 2400 pThis->cbDmiTables, pThis->cNumDmiTables); 2401 2396 2402 if (pThis->u8IOAPIC) 2397 2403 FwCommonPlantMpsTable(pDevIns, 2398 pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 2399 _4K - VBOX_DMI_TABLE_SIZE, pThis->cCpus); 2404 pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE + VBOX_DMI_HDR_SIZE, 2405 _4K - VBOX_DMI_TABLE_SIZE - VBOX_DMI_HDR_SIZE, pThis->cCpus); 2406 2400 2407 rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage, _4K, 2401 2408 PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, "DMI tables"); -
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r69500 r71061 118 118 } *DMIMAINHDRPTR; 119 119 AssertCompileSize(DMIMAINHDR, 15); 120 121 AssertCompile(sizeof(SMBIOSHDR) + sizeof(DMIMAINHDR) <= VBOX_DMI_HDR_SIZE); 120 122 121 123 /** DMI header */ … … 956 958 * 957 959 * @param pDevIns The device instance data. 960 * @param pHdr Pointer to the header destination. 958 961 * @param cbDmiTables Size of all DMI tables planted in bytes. 959 962 * @param cNumDmiTables Number of DMI tables planted. 960 963 */ 961 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint16_t cbDmiTables, uint16_t cNumDmiTables) 962 { 964 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint8_t *pHdr, uint16_t cbDmiTables, uint16_t cNumDmiTables) 965 { 966 RT_NOREF(pDevIns); 967 963 968 struct 964 969 { … … 995 1000 aBiosHeaders.dmi.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.dmi, sizeof(aBiosHeaders.dmi)); 996 1001 997 PDMDevHlpPhysWrite(pDevIns, 0xfe300, &aBiosHeaders, sizeof(aBiosHeaders));1002 memcpy(pHdr, &aBiosHeaders, sizeof(aBiosHeaders)); 998 1003 } 999 1004 -
trunk/src/VBox/Devices/PC/DevFwCommon.h
r69500 r71061 29 29 /* Plant DMI table */ 30 30 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus, uint16_t *pcbDmiTables, uint16_t *pcNumDmiTables); 31 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint 16_t cbDmiTables, uint16_t cNumDmiTables);31 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint8_t *pHdr, uint16_t cbDmiTables, uint16_t cNumDmiTables); 32 32 33 33 /* Plant MPS table */
Note:
See TracChangeset
for help on using the changeset viewer.

