Changeset 25025 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Nov 26, 2009 5:06:38 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r24964 r25025 42 42 43 43 #pragma pack(1) 44 45 typedef struct SMBIOSHDR 46 { 47 uint8_t au8Signature[4]; 48 uint8_t u8Checksum; 49 uint8_t u8Eps; 50 uint8_t u8VersionMajor; 51 uint8_t u8VersionMinor; 52 uint16_t u16MaxStructureSize; 53 uint8_t u8EntryPointRevision; 54 uint8_t u8Pad[5]; 55 } *SMBIOSHDRPTR; 56 AssertCompileSize(SMBIOSHDR, 16); 57 58 typedef struct DMIMAINHDR 59 { 60 uint8_t au8Signature[5]; 61 uint8_t u8Checksum; 62 uint16_t u16TablesLength; 63 uint32_t u32TableBase; 64 uint16_t u16TableEntries; 65 uint16_t u8TableVersion; 66 uint8_t u8Pad; 67 } *DMIMAINHDRPTR; 44 68 45 69 /** DMI header */ … … 253 277 * @param pCfgHandle The handle to our config node. 254 278 */ 255 int sharedfwPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PRTUUID pUuid, PCFGMNODE pCfgHandle )279 int sharedfwPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PRTUUID pUuid, PCFGMNODE pCfgHandle, bool fPutSmbiosHeaders) 256 280 { 257 281 char *pszStr = (char *)pTable; … … 497 521 MMR3HeapFree(pszDmiOEMVBoxRev); 498 522 523 if (fPutSmbiosHeaders) 524 { 525 struct { 526 struct SMBIOSHDR smbios; 527 struct DMIMAINHDR dmi; 528 } aBiosHeaders = 529 { 530 // The SMBIOS header 531 { 532 { 0x5f, 0x53, 0x4d, 0x5f}, // "_SM_" signature 533 0x00, // checksum 534 0x1f, // EPS length, defined by standard 535 VBOX_SMBIOS_MAJOR_VER, // SMBIOS major version 536 VBOX_SMBIOS_MINOR_VER, // SMBIOS minor version 537 VBOX_SMBIOS_MAXSS, // Maximum structure size 538 0x00, // Entry point revision 539 { 0x00, 0x00, 0x00, 0x00, 0x00 } // padding 540 }, 541 // The DMI header 542 { 543 { 0x5f, 0x44, 0x4d, 0x49, 0x5f }, // "_DMI_" signature 544 0x00, // checksum 545 VBOX_DMI_TABLE_SIZE, // DMI tables length 546 VBOX_DMI_TABLE_BASE, // DMI tables base 547 VBOX_DMI_TABLE_ENTR, // DMI tables entries 548 VBOX_DMI_TABLE_VER, // DMI version 549 0x00 550 } 551 }; 552 553 aBiosHeaders.smbios.u8Checksum = sharedfwChecksum((uint8_t*)&aBiosHeaders.smbios, sizeof(aBiosHeaders.smbios)); 554 aBiosHeaders.dmi.u8Checksum = sharedfwChecksum((uint8_t*)&aBiosHeaders.dmi, sizeof(aBiosHeaders.dmi)); 555 556 //Log(("Write SMBIOS\n")); 557 PDMDevHlpPhysWrite (pDevIns, 0xff30, &aBiosHeaders, sizeof(aBiosHeaders)); 558 } 559 499 560 return VINF_SUCCESS; 500 561 } -
trunk/src/VBox/Devices/PC/DevFwCommon.h
r24706 r25025 1 1 /* $Id$ */ 2 2 /** @file 3 * DevFwCommon - shared header for code common between different firmware types (EFI, BIOS). 3 * DevFwCommon - shared header for code common between different firmware types (EFI, BIOS). 4 4 */ 5 5 … … 32 32 33 33 /* Plant DMI table */ 34 int sharedfwPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PRTUUID pUuid, PCFGMNODE pCfgHandle );34 int sharedfwPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PRTUUID pUuid, PCFGMNODE pCfgHandle, bool fPutSmbiosHeaders = false); 35 35 36 36 /* Plant MPS table */
Note:
See TracChangeset
for help on using the changeset viewer.