儲存庫 vbox 的更動 44820
- 時間撮記:
- 2013-2-25 下午02:45:13 (12 年 以前)
- 位置:
- trunk/src/VBox/Devices
- 檔案:
-
- 修改 7 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r44627 r44820 167 167 /** The size of the DMI tables. */ 168 168 uint16_t cbDmiTables; 169 /** Number of the DMI tables. */ 170 uint16_t cNumDmiTables; 169 171 /** The DMI tables. */ 170 172 uint8_t au8DMIPage[0x1000]; … … 1405 1407 * Plan some structures in RAM. 1406 1408 */ 1407 FwCommonPlantSmbiosAndDmiHdrs(pDevIns, pThis->cbDmiTables );1409 FwCommonPlantSmbiosAndDmiHdrs(pDevIns, pThis->cbDmiTables, pThis->cNumDmiTables); 1408 1410 if (pThis->u8IOAPIC) 1409 1411 FwCommonPlantMpsFloatPtr(pDevIns); … … 1925 1927 /** @todo XXX I wonder if we really need these tables as there is no SMBIOS header... */ 1926 1928 rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, VBOX_DMI_TABLE_SIZE, &pThis->aUuid, 1927 pDevIns->pCfg, pThis->cCpus, &pThis->cbDmiTables );1929 pDevIns->pCfg, pThis->cCpus, &pThis->cbDmiTables, &pThis->cNumDmiTables); 1928 1930 AssertRCReturn(rc, rc); 1929 1931 if (pThis->u8IOAPIC) -
trunk/src/VBox/Devices/PC/BIOS/smidmi.inc
r43712 r44820 66 66 dw 0 ; DMI tables length (set by DevPcBios) 67 67 dd VBOX_DMI_TABLE_BASE ; DMI tables base 68 dw VBOX_DMI_TABLE_ENTR ; DMI tables entries68 dw 0 ; DMI tables entries (set by DevPcBios) 69 69 db VBOX_DMI_TABLE_VER ; DMI version 70 70 db 0 ; Just for alignment (16 bytes total) -
trunk/src/VBox/Devices/PC/BIOS/vbdmismi.inc
r43712 r44820 3 3 VBOX_DMI_TABLE_BASE equ 0E1000h 4 4 VBOX_DMI_TABLE_VER equ 25h 5 VBOX_DMI_TABLE_ENTR equ 96 5 VBOX_DMI_TABLE_SIZE equ 352 7 6 -
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r44752 r44820 35 35 #include <iprt/system.h> 36 36 37 #include "vl_vbox.h" 37 38 #include "VBoxDD.h" 38 39 #include "VBoxDD2.h" … … 240 241 AssertCompileSize(DMIOEMSTRINGS, 0x7); 241 242 243 /** DMI OEM-specific table (Type 128) */ 244 typedef struct DMIOEMSPECIFIC 245 { 246 DMIHDR header; 247 uint32_t u32CpuFreqKHz; 248 } *PDMIOEMSPECIFIC; 249 AssertCompileSize(DMIOEMSPECIFIC, 0x8); 250 242 251 /** Physical memory array (Type 16) */ 243 252 typedef struct DMIRAMARRAY … … 416 425 * configuration string isn't present. 417 426 * @param pCfg The handle to our config node. 427 * @param cCpus Number of VCPUs. 428 * @param pcbDmiTables Size of DMI data in bytes. 429 * @param pcNumDmiTables Number of DMI tables. 418 430 */ 419 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus, uint16_t *pcbDmiTables )431 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus, uint16_t *pcbDmiTables, uint16_t *pcNumDmiTables) 420 432 { 421 433 #define CHECKSIZE(cbWant) \ … … 869 881 TERM_STRUCT; 870 882 883 /************************************* 884 * DMI OEM specific table (Type 128) * 885 ************************************/ 886 PDMIOEMSPECIFIC pOEMSpecific = (PDMIOEMSPECIFIC)pszStr; 887 CHECKSIZE(sizeof(*pOEMSpecific)); 888 START_STRUCT(pOEMSpecific); 889 pOEMSpecific->header.u8Type = 0x80; /* OEM specific */ 890 pOEMSpecific->header.u8Length = sizeof(*pOEMSpecific); 891 pOEMSpecific->header.u16Handle = 0x0008; /* Just next free handle */ 892 pOEMSpecific->u32CpuFreqKHz = cpu_to_le32((uint32_t)((uint64_t)TMCpuTicksPerSecond(PDMDevHlpGetVM(pDevIns)) / 1000)); 893 TERM_STRUCT; 894 871 895 /* End-of-table marker - includes padding to account for fixed table size. */ 872 896 PDMIHDR pEndOfTable = (PDMIHDR)pszStr; … … 877 901 pEndOfTable->u16Handle = 0xFEFF; 878 902 *pcbDmiTables = ((uintptr_t)pszStr - (uintptr_t)pTable) + 2; 903 904 /* We currently plant 10 DMI tables. Update this if tables number changed. */ 905 *pcNumDmiTables = 10; 879 906 880 907 /* If more fields are added here, fix the size check in READCFGSTR */ … … 896 923 * @param pDevIns The device instance data. 897 924 */ 898 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint16_t cbDmiTables )925 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint16_t cbDmiTables, uint16_t cNumDmiTables) 899 926 { 900 927 struct … … 922 949 0, // DMI tables length 923 950 VBOX_DMI_TABLE_BASE, // DMI tables base 924 VBOX_DMI_TABLE_ENTR,// DMI tables entries951 0, // DMI tables entries 925 952 VBOX_DMI_TABLE_VER, // DMI version 926 953 } … … 928 955 929 956 aBiosHeaders.dmi.u16TablesLength = cbDmiTables; 957 aBiosHeaders.dmi.u16TableEntries = cNumDmiTables; 930 958 aBiosHeaders.smbios.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.smbios, sizeof(aBiosHeaders.smbios)); 931 959 aBiosHeaders.dmi.u8Checksum = fwCommonChecksum((uint8_t*)&aBiosHeaders.dmi, sizeof(aBiosHeaders.dmi)); … … 933 961 PDMDevHlpPhysWrite(pDevIns, 0xfe300, &aBiosHeaders, sizeof(aBiosHeaders)); 934 962 } 935 AssertCompile(VBOX_DMI_TABLE_ENTR == 9);936 963 937 964 /** -
trunk/src/VBox/Devices/PC/DevFwCommon.h
r44529 r44820 28 28 29 29 /* Plant DMI table */ 30 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus, uint16_t *pcbDmiTables );31 void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint16_t cbDmiTables );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, uint16_t cbDmiTables, uint16_t cNumDmiTables); 32 32 33 33 /* Plant MPS table */ -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r44706 r44820 35 35 #include <VBox/param.h> 36 36 37 #include "vl_vbox.h" 37 38 #include "VBoxDD.h" 38 39 #include "VBoxDD2.h" … … 1243 1244 uuid.Gen.u16TimeHiAndVersion = RT_H2BE_U16(uuid.Gen.u16TimeHiAndVersion); 1244 1245 uint16_t cbDmiTables = 0; 1246 uint16_t cNumDmiTables = 0; 1245 1247 rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, VBOX_DMI_TABLE_SIZE, 1246 &uuid, pCfg, pThis->cCpus, &cbDmiTables );1248 &uuid, pCfg, pThis->cCpus, &cbDmiTables, &cNumDmiTables); 1247 1249 if (RT_FAILURE(rc)) 1248 1250 return rc; … … 1258 1260 && *(uint16_t*)&pThis->pu8PcBios[i + 0x06] == 0) 1259 1261 { 1260 *(uint16_t*)&pThis->pu8PcBios[i + 0x06] = cbDmiTables; 1262 *(uint16_t*)&pThis->pu8PcBios[i + 0x06] = cpu_to_le16(cbDmiTables); 1263 *(uint16_t*)&pThis->pu8PcBios[i + 0x0C] = cpu_to_le16(cNumDmiTables); 1261 1264 uint8_t u8Sum = 0; 1262 1265 for (unsigned j = 0; j < pThis->cbPcBios; j++) -
trunk/src/VBox/Devices/PC/DevPcBios.h
r44528 r44820 23 23 #define VBOX_DMI_TABLE_VER 0x25 24 24 25 /** define VBOX_DMI_TABLE_ENTR26 *27 * This is the number of DMI structures.28 */29 #define VBOX_DMI_TABLE_ENTR 930 31 25 /** def VBOX_DMI_TABLE_SIZE 32 26 *
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器