Changeset 26728 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 24, 2010 10:22:51 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57977
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r26601 r26728 480 480 &pThis->aUuid, 481 481 pDevIns->pCfg, 482 true /* fPutSmbiosHeaders */);482 /*fPutSmbiosHeaders=*/true); 483 483 Assert(RT_SUCCESS(rc)); 484 484 485 485 if (pThis->u8IOAPIC) 486 486 FwCommonPlantMpsTable(pDevIns, 487 pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 488 pThis->cCpus); 487 pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 488 _4K - VBOX_DMI_TABLE_SIZE, 489 pThis->cCpus); 489 490 rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage, 490 491 PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, "DMI tables"); … … 1145 1146 pThis->u64TscFrequency = RTMpGetMaxFrequency(0) * 1024 * 1024;// TMCpuTicksPerSecond(PDMDevHlpGetVM(pDevIns)); 1146 1147 if (pThis->u64TscFrequency == 0) 1147 pThis->u64TscFrequency = 2500000000;1148 pThis->u64TscFrequency = UINT64_C(2500000000); 1148 1149 /* Multiplier is read from MSR_IA32_PERF_STATUS, and now is hardcoded as 4 */ 1149 1150 pThis->u64FsbFrequency = pThis->u64TscFrequency / 4; -
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r26617 r26728 338 338 * @param pDevIns The device instance. 339 339 * @param pTable Where to create the DMI table. 340 * @param cbMax The max size of the DMI table.340 * @param cbMax The maximum size of the DMI table. 341 341 * @param pUuid Pointer to the UUID to use if the DmiUuid 342 342 * configuration string isn't present. … … 344 344 * @param fPutSmbiosHeaders Plant SMBIOS headers if true. 345 345 */ 346 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, bool fPutSmbiosHeaders) 346 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, 347 PCFGMNODE pCfg, bool fPutSmbiosHeaders) 347 348 { 348 349 #define CHECKSIZE(cbWant) \ … … 418 419 } 419 420 421 #define TERM_STRUCT \ 422 { \ 423 *pszStr++ = '\0'; /* terminate set of text strings */ \ 424 if (iStrNr == 1) \ 425 *pszStr++ = '\0'; /* terminate a structure without strings */ \ 426 } 427 420 428 bool fForceDefault = false; 421 429 #ifdef VBOX_BIOS_DMI_FALLBACK … … 528 536 /* any more?? */ 529 537 ; 530 *pszStr++ = '\0';538 TERM_STRUCT; 531 539 532 540 /*********************************** … … 569 577 pSystemInf->u8SKUNumber = 0; 570 578 READCFGSTR(pSystemInf->u8Family, DmiSystemFamily); 571 *pszStr++ = '\0';579 TERM_STRUCT; 572 580 573 581 /******************************************** … … 602 610 pChassis->u8ContElemRecLen = 0; /* no contained elements */ 603 611 # endif 604 *pszStr++ = '\0';612 TERM_STRUCT; 605 613 606 614 /***************************** … … 626 634 RTStrPrintf(szTmp, sizeof(szTmp), "vboxRev_%u", RTBldCfgRevision()); 627 635 READCFGSTRDEF(pOEMStrings->u8VBoxRevision, "DmiOEMVBoxRev", szTmp); 628 *pszStr++ = '\0';636 TERM_STRUCT; 629 637 630 638 /* End-of-table marker - includes padding to account for fixed table size. */ … … 709 717 * 710 718 * @param pDevIns The device instance data. 711 * @param addr physical address in guest memory. 719 * @param pTable Where to write the table. 720 * @param cbMax The maximum size of the MPS table. 721 * @param cCpus The number of guest CPUs. 712 722 */ 713 void FwCommonPlantMpsTable(PPDMDEVINS pDevIns, uint8_t *pTable, u int16_t cCpus)723 void FwCommonPlantMpsTable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, uint16_t cCpus) 714 724 { 715 725 /* configuration table */ … … 792 802 pCfgTab->u8Checksum = fwCommonChecksum(pTable, pCfgTab->u16Length); 793 803 794 AssertMsg(pCfgTab->u16Length < 0x1000 - 0x100,804 AssertMsg(pCfgTab->u16Length < cbMax, 795 805 ("VBOX_MPS_TABLE_SIZE=%d, maximum allowed size is %d", 796 pCfgTab->u16Length, 0x1000-0x100));806 pCfgTab->u16Length, cbMax)); 797 807 798 808 MPSFLOATPTR floatPtr; -
trunk/src/VBox/Devices/PC/DevFwCommon.h
r26173 r26728 32 32 33 33 /* Plant DMI table */ 34 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, bool fPutSmbiosHeaders); 34 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, 35 PCFGMNODE pCfg, bool fPutSmbiosHeaders); 35 36 36 37 /* Plant MPS table */ 37 void FwCommonPlantMpsTable(PPDMDEVINS pDevIns, uint8_t *pTable, u int16_t cCpus);38 void FwCommonPlantMpsTable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, uint16_t cCpus); 38 39 39 40 #endif -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r26601 r26728 747 747 748 748 if (pThis->u8IOAPIC) 749 FwCommonPlantMpsTable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, pThis->cCpus); 749 FwCommonPlantMpsTable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 750 _4K - VBOX_DMI_TABLE_SIZE, pThis->cCpus); 750 751 751 752 /* … … 1022 1023 uuid.Gen.u16TimeMid = RT_H2BE_U16(uuid.Gen.u16TimeMid); 1023 1024 uuid.Gen.u16TimeHiAndVersion = RT_H2BE_U16(uuid.Gen.u16TimeHiAndVersion); 1024 rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, VBOX_DMI_TABLE_SIZE, &uuid, pCfg, false /*fPutSmbiosHeaders*/); 1025 rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, 1026 VBOX_DMI_TABLE_SIZE, &uuid, pCfg, /*fPutSmbiosHeaders=*/false); 1025 1027 if (RT_FAILURE(rc)) 1026 1028 return rc; 1027 1029 if (pThis->u8IOAPIC) 1028 FwCommonPlantMpsTable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, pThis->cCpus); 1030 FwCommonPlantMpsTable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, 1031 _4K - VBOX_DMI_TABLE_SIZE, pThis->cCpus); 1029 1032 1030 1033 rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage, -
trunk/src/VBox/Devices/PC/DevPcBios.h
r24707 r26728 27 27 #define VBOX_DMI_TABLE_VER 0x25 28 28 #define VBOX_DMI_TABLE_ENTR 5 29 #define VBOX_DMI_TABLE_SIZE 0x100 29 30 /** def VBOX_DMI_TABLE_SIZE 31 * 32 * Must not be bigger than the minimal size of the DMI tables + 255 because 33 * the length field of the the DMI end-of-table marker is 8 bits only. And 34 * the size should be at least 16-byte aligned for a proper alignment of 35 * the MPS table. 36 */ 37 #define VBOX_DMI_TABLE_SIZE 352 30 38 31 39 /** @def VBOX_VMI_BIOS_BASE … … 38 46 39 47 /** @def VBOX_LANBOOT_SEG 48 * 49 * Should usually start right after the DMI BIOS page 40 50 */ 41 51 #define VBOX_LANBOOT_SEG 0xe200
Note:
See TracChangeset
for help on using the changeset viewer.