Changeset 28424 in vbox
- Timestamp:
- Apr 16, 2010 5:46:28 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60190
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r28414 r28424 474 474 pThis->szPanicMsg[0] = '\0'; 475 475 476 /* 477 * Plan some structures in RAM. 478 */ 479 FwCommonPlantSmbiosAndDmiHdrs(pDevIns); 476 480 if (pThis->u8IOAPIC) 477 481 FwCommonPlantMpsFloatPtr(pDevIns); 478 479 /*480 * Plant DMI and MPS tables481 */482 rc = FwCommonPlantDMITable(pDevIns,483 pThis->au8DMIPage,484 VBOX_DMI_TABLE_SIZE,485 &pThis->aUuid,486 pDevIns->pCfg,487 true /*fPutSmbiosHeaders*/);488 AssertRC(rc);489 if (pThis->u8IOAPIC)490 FwCommonPlantMpsTable(pDevIns,491 pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE,492 _4K - VBOX_DMI_TABLE_SIZE,493 pThis->cCpus);494 495 482 496 483 /* … … 1206 1193 1207 1194 /* 1208 * Call reset to set things up. 1209 */ 1210 efiReset(pDevIns); 1211 1212 1195 * Plant DMI and MPS tables 1196 */ 1197 rc = FwCommonPlantDMITable(pDevIns, 1198 pThis->au8DMIPage, 1199 VBOX_DMI_TABLE_SIZE, 1200 &pThis->aUuid, 1201 pDevIns->pCfg); 1202 AssertRCReturn(rc, rc); 1203 if (pThis->u8IOAPIC) 1204 FwCommonPlantMpsTable(pDevIns, 1205 pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 1206 _4K - VBOX_DMI_TABLE_SIZE, 1207 pThis->cCpus); 1213 1208 rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage, 1214 1209 PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, "DMI tables"); … … 1216 1211 AssertRCReturn(rc, rc); 1217 1212 1218 1213 /* 1214 * Call reset to set things up. 1215 */ 1216 efiReset(pDevIns); 1219 1217 1220 1218 return VINF_SUCCESS; -
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r28203 r28424 317 317 } 318 318 319 #if 0 /* unused */ 319 320 static bool fwCommonChecksumOk(const uint8_t * const au8Data, uint32_t u32Length) 320 321 { … … 324 325 return (u8Sum == 0); 325 326 } 326 327 /* 328 * Macmini2,1 - matches Mac Mini 327 #endif 328 329 /** 330 * Try fetch the DMI strings from the system. 329 331 */ 330 332 static void fwCommonUseHostDMIStrings(void) … … 359 361 * configuration string isn't present. 360 362 * @param pCfg The handle to our config node. 361 * @param fPutSmbiosHeaders Plant SMBIOS headers if true.362 363 */ 363 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, 364 PCFGMNODE pCfg, bool fPutSmbiosHeaders) 364 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg) 365 365 { 366 366 #define CHECKSIZE(cbWant) \ … … 668 668 #undef READCFGINT 669 669 #undef CHECKSIZE 670 671 if (fPutSmbiosHeaders) 670 return VINF_SUCCESS; 671 } 672 673 /** 674 * Construct the SMBIOS and DMI headers table pointer at VM construction and 675 * reset. 676 * 677 * @param pDevIns The device instance data. 678 */ 679 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns) 680 { 681 struct 672 682 { 673 struct {674 struct SMBIOSHDR smbios;675 struct DMIMAINHDR dmi;676 } aBiosHeaders677 =683 struct SMBIOSHDR smbios; 684 struct DMIMAINHDR dmi; 685 } aBiosHeaders = 686 { 687 // The SMBIOS header 678 688 { 679 // The SMBIOS header 680 { 681 { 0x5f, 0x53, 0x4d, 0x5f}, // "_SM_" signature 682 0x00, // checksum 683 0x1f, // EPS length, defined by standard 684 VBOX_SMBIOS_MAJOR_VER, // SMBIOS major version 685 VBOX_SMBIOS_MINOR_VER, // SMBIOS minor version 686 VBOX_SMBIOS_MAXSS, // Maximum structure size 687 0x00, // Entry point revision 688 { 0x00, 0x00, 0x00, 0x00, 0x00 } // padding 689 }, 690 // The DMI header 691 { 692 { 0x5f, 0x44, 0x4d, 0x49, 0x5f }, // "_DMI_" signature 693 0x00, // checksum 694 VBOX_DMI_TABLE_SIZE, // DMI tables length 695 VBOX_DMI_TABLE_BASE, // DMI tables base 696 VBOX_DMI_TABLE_ENTR, // DMI tables entries 697 VBOX_DMI_TABLE_VER, // DMI version 698 } 699 }; 700 701 aBiosHeaders.smbios.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.smbios, sizeof(aBiosHeaders.smbios)); 702 aBiosHeaders.dmi.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.dmi, sizeof(aBiosHeaders.dmi)); 703 704 PDMDevHlpPhysWrite (pDevIns, 0xfe300, &aBiosHeaders, sizeof(aBiosHeaders)); 705 } 706 707 return VINF_SUCCESS; 689 { 0x5f, 0x53, 0x4d, 0x5f}, // "_SM_" signature 690 0x00, // checksum 691 0x1f, // EPS length, defined by standard 692 VBOX_SMBIOS_MAJOR_VER, // SMBIOS major version 693 VBOX_SMBIOS_MINOR_VER, // SMBIOS minor version 694 VBOX_SMBIOS_MAXSS, // Maximum structure size 695 0x00, // Entry point revision 696 { 0x00, 0x00, 0x00, 0x00, 0x00 } // padding 697 }, 698 // The DMI header 699 { 700 { 0x5f, 0x44, 0x4d, 0x49, 0x5f }, // "_DMI_" signature 701 0x00, // checksum 702 VBOX_DMI_TABLE_SIZE, // DMI tables length 703 VBOX_DMI_TABLE_BASE, // DMI tables base 704 VBOX_DMI_TABLE_ENTR, // DMI tables entries 705 VBOX_DMI_TABLE_VER, // DMI version 706 } 707 }; 708 709 aBiosHeaders.smbios.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.smbios, sizeof(aBiosHeaders.smbios)); 710 aBiosHeaders.dmi.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.dmi, sizeof(aBiosHeaders.dmi)); 711 712 PDMDevHlpPhysWrite(pDevIns, 0xfe300, &aBiosHeaders, sizeof(aBiosHeaders)); 708 713 } 709 714 AssertCompile(VBOX_DMI_TABLE_ENTR == 5); -
trunk/src/VBox/Devices/PC/DevFwCommon.h
r28203 r28424 32 32 33 33 /* Plant DMI table */ 34 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, 35 PCFGMNODE pCfg, bool fPutSmbiosHeaders);34 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg); 35 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns); 36 36 37 37 /* Plant MPS table */ -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r28203 r28424 1045 1045 uuid.Gen.u16TimeHiAndVersion = RT_H2BE_U16(uuid.Gen.u16TimeHiAndVersion); 1046 1046 rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, 1047 VBOX_DMI_TABLE_SIZE, &uuid, pCfg , /*fPutSmbiosHeaders=*/false);1047 VBOX_DMI_TABLE_SIZE, &uuid, pCfg); 1048 1048 if (RT_FAILURE(rc)) 1049 1049 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.