Changeset 21869 in vbox
- Timestamp:
- Jul 30, 2009 9:03:19 AM (15 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r20924 r21869 29 29 30 30 #include <VBox/log.h> 31 #ifdef VBOX_WITH_DMI_OEMSTRINGS 32 #include <VBox/version.h> 33 #endif 31 34 #include <iprt/assert.h> 32 35 #include <iprt/alloc.h> … … 252 255 uint16_t u16ProcessorCharacteristics; 253 256 uint16_t u16ProcessorFamily2; 254 } PDMIPROCESSORINF;257 } *PDMIPROCESSORINF; 255 258 AssertCompileSize(DMIPROCESSORINF, 0x2a); 259 260 #ifdef VBOX_WITH_DMI_OEMSTRINGS 261 /** DMI OEM strings */ 262 typedef struct DMIOEMSTRINGS 263 { 264 DMIHDR header; 265 uint8_t u8Count; 266 uint8_t u8VboxVersion; 267 uint8_t u8VboxRevision; 268 } *PDMIOEMSTRINGS; 269 AssertCompileSize(DMIOEMSTRINGS, 0x7); 270 #endif 256 271 257 272 /** MPS floating pointer structure */ … … 918 933 int iDmiBIOSReleaseMajor, iDmiBIOSReleaseMinor, iDmiBIOSFirmwareMajor, iDmiBIOSFirmwareMinor; 919 934 char *pszDmiSystemVendor, *pszDmiSystemProduct, *pszDmiSystemVersion, *pszDmiSystemSerial, *pszDmiSystemUuid, *pszDmiSystemFamily; 935 #ifdef VBOX_WITH_DMI_OEMSTRINGS 936 char *pszDmiOEMVBoxVer, *pszDmiOEMVBoxRev; 937 #endif 920 938 921 939 #define SETSTRING(memb, str) \ … … 1056 1074 *pszStr++ = '\0'; 1057 1075 1076 #ifdef VBOX_WITH_DMI_OEMSTRINGS 1077 /* DMI OEM strings */ 1078 PDMIOEMSTRINGS pOEMStrings = (PDMIOEMSTRINGS)pszStr; 1079 pszStr = (char *)(pOEMStrings + 1); 1080 iStrNr = 1; 1081 pOEMStrings->header.u8Type = 0xb; /* OEM Strings */ 1082 pOEMStrings->header.u8Length = sizeof(*pOEMStrings); 1083 pOEMStrings->header.u16Handle = 0x0002; 1084 pOEMStrings->u8Count = 2; 1085 1086 char* pszVBoxVer, *pszVBoxRev; 1087 RTStrAPrintf(&pszVBoxVer, "vboxVer_%d.%d.%d", 1088 VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD); 1089 RTStrAPrintf(&pszVBoxRev, "vboxRev_%ld", VBOX_SVN_REV); 1090 READCFGSTR("DmiOEMVBoxVer", pszDmiOEMVBoxVer, pszVBoxVer); 1091 READCFGSTR("DmiOEMVBoxRev", pszDmiOEMVBoxRev, pszVBoxRev); 1092 SETSTRING(pOEMStrings->u8VboxVersion, pszDmiOEMVBoxVer); 1093 SETSTRING(pOEMStrings->u8VboxRevision, pszDmiOEMVBoxRev); 1094 RTStrFree(pszVBoxVer); 1095 RTStrFree(pszVBoxRev); 1096 1097 *pszStr++ = '\0'; 1098 #endif 1099 1058 1100 /* End-of-table marker - includes padding to account for fixed table size. */ 1059 1101 PDMIHDR pEndOfTable = (PDMIHDR)pszStr; … … 1076 1118 MMR3HeapFree(pszDmiSystemUuid); 1077 1119 MMR3HeapFree(pszDmiSystemFamily); 1120 #ifdef VBOX_WITH_DMI_OEMSTRINGS 1121 MMR3HeapFree(pszDmiOEMVBoxVer); 1122 MMR3HeapFree(pszDmiOEMVBoxRev); 1123 #endif 1078 1124 1079 1125 return VINF_SUCCESS; 1080 1126 } 1081 AssertCompile(VBOX_DMI_TABLE_ENTR == 3);1127 AssertCompile(VBOX_DMI_TABLE_ENTR == 4); 1082 1128 1083 1129 … … 1417 1463 "DmiSystemUuid\0" 1418 1464 "DmiSystemVendor\0" 1419 "DmiSystemVersion\0")) 1465 "DmiSystemVersion\0" 1466 "DmiOEMVBoxVer\0" 1467 "DmiOEMVBoxRev\0")) 1420 1468 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 1421 1469 N_("Invalid configuraton for device pcbios device")); -
trunk/src/VBox/Devices/PC/DevPcBios.h
r12653 r21869 26 26 #define VBOX_DMI_TABLE_BASE 0xe1000 27 27 #define VBOX_DMI_TABLE_VER 0x25 28 #define VBOX_DMI_TABLE_ENTR 328 #define VBOX_DMI_TABLE_ENTR 4 29 29 #define VBOX_DMI_TABLE_SIZE 0x100 30 30
Note:
See TracChangeset
for help on using the changeset viewer.