Changeset 40019 in vbox
- Timestamp:
- Feb 7, 2012 1:46:41 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/user_AdvancedTopics.xml
r39860 r40019 1340 1340 with <screen>dmidecode -t0</screen>and the DMI system information can be 1341 1341 obtained with <screen>dmidecode -t1</screen></para> 1342 </sect1> 1343 1344 <sect1 id="changeacpicust"> 1345 <title>Configuring the custom ACPI table</title> 1346 1347 <para>VirtualBox can be configured to present an custom ACPI table to 1348 the guest. Use the following command to configure this:</para> 1349 1350 <screen>VBoxManage setextradata "VM name" 1351 "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/path/to/table.bin"</screen> 1352 1353 <para>Configuring a custom ACPI table can prevent Windows 1354 Vista and Windows 7 from asking for a new product key. On Linux hosts, 1355 one of the host tables can be read from 1356 <filename>/sys/firmware/acpi/tables/</filename>.</para> 1342 1357 </sect1> 1343 1358 -
trunk/doc/manual/en_US/user_Security.xml
r39763 r40019 333 333 HTTP. This is a potential security risk! For details about the web 334 334 service, please see <xref linkend="VirtualBoxAPI" />.</para> 335 <para>The web services are not started by default. Please refer to 336 <xref linkend="vboxwebsrv-daemon"/> to find out how to start this 337 service. It has to be started as a regular user and only the VMs 338 of that user can be controled. By default, the service binds to 339 localhost preventing any remote connection.</para> 335 340 </listitem> 336 341 -
trunk/src/VBox/Devices/Makefile.kmk
r39959 r40019 272 272 VBOX_WITH_HGCM \ 273 273 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \ 274 VBOX_WITH_DMI_CHASSIS \ 274 275 VBOX_WITH_DMI_OEMSTRINGS 275 276 -
trunk/src/VBox/Devices/PC/DevACPI.cpp
r39303 r40019 29 29 #include <iprt/asm.h> 30 30 #include <iprt/asm-math.h> 31 #include <iprt/file.h> 31 32 #ifdef IN_RING3 32 33 # include <iprt/alloc.h> … … 229 230 uint32_t gpe0_sts; 230 231 231 u nsigned intuBatteryIndex;232 uint32_t uBatteryIndex; 232 233 uint32_t au8BatteryInfo[13]; 233 234 234 u nsigned intuSystemInfoIndex;235 uint32_t uSystemInfoIndex; 235 236 uint64_t u64RamSize; 236 237 /** The number of bytes above 4GB. */ … … 327 328 /** Pointer to default PCI config write function. */ 328 329 R3PTRTYPE(PFNPCICONFIGWRITE) pfnAcpiPciConfigWrite; 330 331 /** If custom table should be supported */ 332 bool fUseCust; 333 /** ACPI OEM ID */ 334 uint8_t au8OemId[6]; 335 /** ACPI Crator ID */ 336 uint8_t au8CreatorId[4]; 337 /** ACPI Crator Rev */ 338 uint32_t u32CreatorRev; 339 /** ACPI custom OEM Tab ID */ 340 uint8_t au8OemTabId[8]; 341 /** ACPI custom OEM Rev */ 342 uint32_t u32OemRevision; 343 uint32_t Alignment0; 344 345 /** The custom table binary data. */ 346 R3PTRTYPE(uint8_t *) pu8CustBin; 347 /** The size of the custom table binary. */ 348 uint64_t cbCustBin; 329 349 } ACPIState; 330 350 … … 585 605 # define PCAT_COMPAT 0x1 /**< system has also a dual-8259 setup */ 586 606 607 /** Custom Description Table */ 608 struct ACPITBLCUST 609 { 610 ACPITBLHEADER header; 611 uint8_t au8Data[476]; 612 }; 613 AssertCompileSize(ACPITBLCUST, 512); 614 587 615 /** 588 616 * Multiple APIC Description Table. … … 1196 1224 1197 1225 int rc = VINF_SUCCESS; 1198 u nsignedconst uSystemInfoIndex = pThis->uSystemInfoIndex;1226 uint32_t const uSystemInfoIndex = pThis->uSystemInfoIndex; 1199 1227 switch (uSystemInfoIndex) 1200 1228 { … … 2056 2084 * Prepare a ACPI table header. 2057 2085 */ 2058 static void acpiPrepareHeader(ACPITBLHEADER *header, const char au8Signature[4], 2086 static void acpiPrepareHeader(ACPIState *pThis, ACPITBLHEADER *header, 2087 const char au8Signature[4], 2059 2088 uint32_t u32Length, uint8_t u8Revision) 2060 2089 { … … 2062 2091 header->u32Length = RT_H2LE_U32(u32Length); 2063 2092 header->u8Revision = u8Revision; 2064 memcpy(header->au8OemId, "VBOX ", 6);2093 memcpy(header->au8OemId, pThis->au8OemId, 6); 2065 2094 memcpy(header->au8OemTabId, "VBOX", 4); 2066 2095 memcpy(header->au8OemTabId+4, au8Signature, 4); 2067 2096 header->u32OemRevision = RT_H2LE_U32(1); 2068 memcpy(header->au8CreatorId, "ASL ", 4);2069 header->u32CreatorRev = RT_H2LE_U32(0x61);2097 memcpy(header->au8CreatorId, pThis->au8CreatorId, 4); 2098 header->u32CreatorRev = pThis->u32CreatorRev; 2070 2099 } 2071 2100 … … 2139 2168 /* First the ACPI version 2+ version of the structure. */ 2140 2169 memset(&fadt, 0, sizeof(fadt)); 2141 acpiPrepareHeader( &fadt.header, "FACP", sizeof(fadt), 4);2170 acpiPrepareHeader(pThis, &fadt.header, "FACP", sizeof(fadt), 4); 2142 2171 fadt.u32FACS = RT_H2LE_U32(GCPhysFacs); 2143 2172 fadt.u32DSDT = RT_H2LE_U32(GCPhysDsdt); … … 2225 2254 return PDMDEV_SET_ERROR(pThis->pDevIns, VERR_NO_TMP_MEMORY, N_("Cannot allocate RSDT")); 2226 2255 2227 acpiPrepareHeader( &rsdt->header, "RSDT", (uint32_t)size, 1);2256 acpiPrepareHeader(pThis, &rsdt->header, "RSDT", (uint32_t)size, 1); 2228 2257 for (unsigned int i = 0; i < nb_entries; ++i) 2229 2258 { … … 2249 2278 return VERR_NO_TMP_MEMORY; 2250 2279 2251 acpiPrepareHeader(&xsdt->header, "XSDT", (uint32_t)size, 1 /* according to ACPI 3.0 specs */); 2280 acpiPrepareHeader(pThis, &xsdt->header, "XSDT", (uint32_t)size, 1 /* according to ACPI 3.0 specs */); 2281 2282 if (pThis->fUseCust) 2283 memcpy(xsdt->header.au8OemTabId, pThis->au8OemTabId, 8); 2284 2252 2285 for (unsigned int i = 0; i < nb_entries; ++i) 2253 2286 { … … 2264 2297 * Plant the Root System Description Pointer (RSDP). 2265 2298 */ 2266 static void acpiSetupRSDP(ACPI TBLRSDP *rsdp, RTGCPHYS32 GCPhysRsdt, RTGCPHYS GCPhysXsdt)2299 static void acpiSetupRSDP(ACPIState *pThis, ACPITBLRSDP *rsdp, RTGCPHYS32 GCPhysRsdt, RTGCPHYS GCPhysXsdt) 2267 2300 { 2268 2301 memset(rsdp, 0, sizeof(*rsdp)); … … 2270 2303 /* ACPI 1.0 part (RSDT */ 2271 2304 memcpy(rsdp->au8Signature, "RSD PTR ", 8); 2272 memcpy(rsdp->au8OemId, "VBOX ", 6);2305 memcpy(rsdp->au8OemId, pThis->au8OemId, 6); 2273 2306 rsdp->u8Revision = ACPI_REVISION; 2274 2307 rsdp->u32RSDT = RT_H2LE_U32(GCPhysRsdt); … … 2293 2326 AcpiTableMADT madt(cpus, NUMBER_OF_IRQ_SOURCE_OVERRIDES); 2294 2327 2295 acpiPrepareHeader( madt.header_addr(), "APIC", madt.size(), 2);2328 acpiPrepareHeader(pThis, madt.header_addr(), "APIC", madt.size(), 2); 2296 2329 2297 2330 *madt.u32LAPIC_addr() = RT_H2LE_U32(0xfee00000); … … 2365 2398 memset(&hpet, 0, sizeof(hpet)); 2366 2399 2367 acpiPrepareHeader( &hpet.aHeader, "HPET", sizeof(hpet), 1);2400 acpiPrepareHeader(pThis, &hpet.aHeader, "HPET", sizeof(hpet), 1); 2368 2401 /* Keep base address consistent with appropriate DSDT entry (vbox.dsl) */ 2369 2402 acpiWriteGenericAddr(&hpet.HpetAddr, … … 2385 2418 2386 2419 2420 /** Custom Description Table */ 2421 static void acpiSetupCUST(ACPIState *pThis, RTGCPHYS32 addr) 2422 { 2423 ACPITBLCUST cust; 2424 2425 /* First the ACPI version 1 version of the structure. */ 2426 memset(&cust, 0, sizeof(cust)); 2427 acpiPrepareHeader(pThis, &cust.header, "CUST", sizeof(cust), 1); 2428 2429 memcpy(cust.header.au8OemTabId, pThis->au8OemTabId, 8); 2430 cust.header.u32OemRevision = RT_H2LE_U32(pThis->u32OemRevision); 2431 cust.header.u8Checksum = acpiChecksum((uint8_t *)&cust, sizeof(cust)); 2432 2433 acpiPhyscpy(pThis, addr, pThis->pu8CustBin, pThis->cbCustBin); 2434 } 2435 2387 2436 /** 2388 2437 * Used by acpiPlantTables to plant a MMCONFIG PCI config space access (MCFG) … … 2404 2453 RT_ZERO(tbl); 2405 2454 2406 acpiPrepareHeader( &tbl.hdr.aHeader, "MCFG", sizeof(tbl), 1);2455 acpiPrepareHeader(pThis, &tbl.hdr.aHeader, "MCFG", sizeof(tbl), 1); 2407 2456 tbl.entry.u64BaseAddress = pThis->u64PciConfigMMioAddress; 2408 2457 tbl.entry.u8StartBus = u8StartBus; … … 2436 2485 RTGCPHYS32 GCPhysSsdt = 0; 2437 2486 RTGCPHYS32 GCPhysMcfg = 0; 2487 RTGCPHYS32 GCPhysCust = 0; 2438 2488 uint32_t addend = 0; 2439 2489 RTGCPHYS32 aGCPhysRsdt[8]; … … 2444 2494 uint32_t iSsdt = 0; 2445 2495 uint32_t iMcfg = 0; 2496 uint32_t iCust = 0; 2446 2497 size_t cbRsdt = sizeof(ACPITBLHEADER); 2447 2498 size_t cbXsdt = sizeof(ACPITBLHEADER); … … 2456 2507 if (pThis->fUseMcfg) 2457 2508 iMcfg = cAddr++; /* MCFG */ 2509 2510 if (pThis->fUseCust) 2511 iCust = cAddr++; /* CUST */ 2458 2512 2459 2513 iSsdt = cAddr++; /* SSDT */ … … 2521 2575 /* Assume one entry */ 2522 2576 GCPhysCur = RT_ALIGN_32(GCPhysCur + sizeof(ACPITBLMCFG) + sizeof(ACPITBLMCFGENTRY), 16); 2577 } 2578 if (pThis->fUseCust) 2579 { 2580 GCPhysCust = GCPhysCur; 2581 GCPhysCur = RT_ALIGN_32(GCPhysCur + pThis->cbCustBin, 16); 2523 2582 } 2524 2583 … … 2557 2616 if (pThis->fUseMcfg) 2558 2617 Log((" MCFG 0x%08X", GCPhysMcfg + addend)); 2618 if (pThis->fUseCust) 2619 Log((" CUST 0x%08X", GCPhysCust + addend)); 2559 2620 Log((" SSDT 0x%08X", GCPhysSsdt + addend)); 2560 2621 Log(("\n")); 2561 2622 2562 acpiSetupRSDP( (ACPITBLRSDP *)pThis->au8RSDPPage, GCPhysRsdt + addend, GCPhysXsdt + addend);2623 acpiSetupRSDP(pThis, (ACPITBLRSDP *)pThis->au8RSDPPage, GCPhysRsdt + addend, GCPhysXsdt + addend); 2563 2624 acpiSetupDSDT(pThis, GCPhysDsdt + addend, pvDsdtCode, cbDsdtSize); 2564 2625 acpiCleanupDsdt(pThis->pDevIns, pvDsdtCode); … … 2585 2646 aGCPhysRsdt[iMcfg] = GCPhysMcfg + addend; 2586 2647 aGCPhysXsdt[iMcfg] = GCPhysMcfg + addend; 2648 } 2649 if (pThis->fUseCust) 2650 { 2651 acpiSetupCUST(pThis, GCPhysCust + addend); 2652 aGCPhysRsdt[iCust] = GCPhysCust + addend; 2653 aGCPhysXsdt[iCust] = GCPhysCust + addend; 2587 2654 } 2588 2655 … … 2778 2845 pThis->pPmTimerRC = TMTimerRCPtr(pThis->pPmTimerR3); 2779 2846 NOREF(offDelta); 2847 } 2848 2849 /** 2850 * @interface_methid_impl{PDMDEVREG,pfnDestruct} 2851 */ 2852 static DECLCALLBACK(int) acpiDestruct(PPDMDEVINS pDevIns) 2853 { 2854 ACPIState *pThis = PDMINS_2_DATA(pDevIns, ACPIState *); 2855 if (pThis->pu8CustBin) 2856 { 2857 MMR3HeapFree(pThis->pu8CustBin); 2858 pThis->pu8CustBin = NULL; 2859 } 2860 return VINF_SUCCESS; 2780 2861 } 2781 2862 … … 2851 2932 "Serial0Irq\0" 2852 2933 "Serial1Irq\0" 2934 "AcpiOemId\0" 2935 "AcpiCreatorId\0" 2936 "AcpiCreatorRev\0" 2937 "CustomTable\0" 2938 "SLICTable\0" 2853 2939 )) 2854 2940 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, … … 2888 2974 pThis->fUseMcfg = (pThis->u64PciConfigMMioAddress != 0) && (pThis->u64PciConfigMMioLength != 0); 2889 2975 2976 /* query whether we are supposed to present custom table */ 2977 pThis->fUseCust = false; 2978 2890 2979 /* query whether we are supposed to present SMC */ 2891 2980 rc = CFGMR3QueryBoolDef(pCfg, "SmcEnabled", &pThis->fUseSmc, false); … … 2954 3043 N_("Configuration error: Failed to read \"CpuHotPlug\"")); 2955 3044 2956 rc = CFGMR3QueryBool(pCfg, "GCEnabled", &pThis->fGCEnabled); 2957 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 2958 pThis->fGCEnabled = true; 2959 else if (RT_FAILURE(rc)) 3045 rc = CFGMR3QueryBoolDef(pCfg, "GCEnabled", &pThis->fGCEnabled, true); 3046 if (RT_FAILURE(rc)) 2960 3047 return PDMDEV_SET_ERROR(pDevIns, rc, 2961 3048 N_("Configuration error: Failed to read \"GCEnabled\"")); 2962 3049 2963 rc = CFGMR3QueryBool(pCfg, "R0Enabled", &pThis->fR0Enabled); 2964 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 2965 pThis->fR0Enabled = true; 2966 else if (RT_FAILURE(rc)) 3050 rc = CFGMR3QueryBoolDef(pCfg, "R0Enabled", &pThis->fR0Enabled, true); 3051 if (RT_FAILURE(rc)) 2967 3052 return PDMDEV_SET_ERROR(pDevIns, rc, 2968 N_("configuration error: failed to read R0Enabled as boolean"));3053 N_("configuration error: failed to read \"R0Enabled\"")); 2969 3054 2970 3055 /* query serial info */ … … 3017 3102 } 3018 3103 3104 char *pszOemId = NULL; 3105 rc = CFGMR3QueryStringAllocDef(pThis->pDevIns->pCfg, "AcpiOemId", &pszOemId, "VBOX "); 3106 if (RT_FAILURE(rc)) 3107 return PDMDEV_SET_ERROR(pThis->pDevIns, rc, 3108 N_("Configuration error: Querying \"AcpiOemId\" as string failed")); 3109 size_t cbOemId = strlen(pszOemId); 3110 if (cbOemId > 6) 3111 return PDMDEV_SET_ERROR(pThis->pDevIns, rc, 3112 N_("Configuration error: \"AcpiOemId\" must contain not more than 6 characters")); 3113 memset(pThis->au8OemId, ' ', sizeof(pThis->au8OemId)); 3114 memcpy(pThis->au8OemId, pszOemId, cbOemId); 3115 MMR3HeapFree(pszOemId); 3116 3117 char *pszCreatorId = NULL; 3118 rc = CFGMR3QueryStringAllocDef(pThis->pDevIns->pCfg, "AcpiCreatorId", &pszCreatorId, "ASL "); 3119 if (RT_FAILURE(rc)) 3120 return PDMDEV_SET_ERROR(pThis->pDevIns, rc, 3121 N_("Configuration error: Querying \"AcpiCreatorId\" as string failed")); 3122 size_t cbCreatorId = strlen(pszCreatorId); 3123 if (cbCreatorId > 4) 3124 return PDMDEV_SET_ERROR(pThis->pDevIns, rc, 3125 N_("Configuration error: \"AcpiCreatorId\" must contain not more than 4 characters")); 3126 memset(pThis->au8CreatorId, ' ', sizeof(pThis->au8CreatorId)); 3127 memcpy(pThis->au8CreatorId, pszCreatorId, cbCreatorId); 3128 MMR3HeapFree(pszCreatorId); 3129 3130 rc = CFGMR3QueryU32Def(pThis->pDevIns->pCfg, "AcpiCreatorRev", &pThis->u32CreatorRev, RT_H2LE_U32(0x61)); 3131 if (RT_FAILURE(rc)) 3132 return PDMDEV_SET_ERROR(pThis->pDevIns, rc, 3133 N_("Configuration error: Querying \"AcpiCreatorRev\" as integer failed")); 3134 pThis->u32OemRevision = RT_H2LE_U32(0x1); 3135 3136 /* 3137 * Get the custom table binary file name. 3138 */ 3139 char *pszCustBinFile; 3140 rc = CFGMR3QueryStringAlloc(pThis->pDevIns->pCfg, "CustomTable", &pszCustBinFile); 3141 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 3142 rc = CFGMR3QueryStringAlloc(pThis->pDevIns->pCfg, "SLICTable", &pszCustBinFile); 3143 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 3144 { 3145 pszCustBinFile = NULL; 3146 rc = VINF_SUCCESS; 3147 } 3148 else if (RT_FAILURE(rc)) 3149 return PDMDEV_SET_ERROR(pThis->pDevIns, rc, 3150 N_("Configuration error: Querying \"CustomTable\" as a string failed")); 3151 else if (!*pszCustBinFile) 3152 { 3153 MMR3HeapFree(pszCustBinFile); 3154 pszCustBinFile = NULL; 3155 } 3156 3157 /* 3158 * Determine the custom table binary size, open specified ROM file in the process. 3159 */ 3160 if (pszCustBinFile) 3161 { 3162 RTFILE FileCUSTBin; 3163 rc = RTFileOpen(&FileCUSTBin, pszCustBinFile, 3164 RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE); 3165 if (RT_SUCCESS(rc)) 3166 { 3167 rc = RTFileGetSize(FileCUSTBin, &pThis->cbCustBin); 3168 if (RT_SUCCESS(rc)) 3169 { 3170 /* The following checks should be in sync the AssertReleaseMsg's below. */ 3171 if ( pThis->cbCustBin > 3072 3172 || pThis->cbCustBin < sizeof(ACPITBLHEADER)) 3173 rc = VERR_TOO_MUCH_DATA; 3174 3175 /* 3176 * Allocate buffer for the custom table binary data. 3177 */ 3178 pThis->pu8CustBin = (uint8_t *)PDMDevHlpMMHeapAlloc(pThis->pDevIns, pThis->cbCustBin); 3179 if (pThis->pu8CustBin) 3180 { 3181 rc = RTFileRead(FileCUSTBin, pThis->pu8CustBin, pThis->cbCustBin, NULL); 3182 if (RT_FAILURE(rc)) 3183 { 3184 AssertMsgFailed(("RTFileRead(,,%d,NULL) -> %Rrc\n", pThis->cbCustBin, rc)); 3185 MMR3HeapFree(pThis->pu8CustBin); 3186 pThis->pu8CustBin = NULL; 3187 } 3188 else 3189 { 3190 pThis->fUseCust = true; 3191 memcpy(&pThis->au8OemId[0], &pThis->pu8CustBin[10], 6); 3192 memcpy(&pThis->au8OemTabId[0], &pThis->pu8CustBin[16], 8); 3193 memcpy(&pThis->u32OemRevision, &pThis->pu8CustBin[24], 4); 3194 memcpy(&pThis->au8CreatorId[0], &pThis->pu8CustBin[28], 4); 3195 memcpy(&pThis->u32CreatorRev, &pThis->pu8CustBin[32], 4); 3196 LogRel(("Reading custom ACPI table from file '%s' (%d bytes)\n", pszCustBinFile, pThis->cbCustBin)); 3197 } 3198 } 3199 else 3200 rc = VERR_NO_MEMORY; 3201 3202 RTFileClose(FileCUSTBin); 3203 } 3204 } 3205 MMR3HeapFree(pszCustBinFile); 3206 if (RT_FAILURE(rc)) 3207 return PDMDEV_SET_ERROR(pDevIns, rc, 3208 N_("Error reading custom ACPI table")); 3209 } 3019 3210 3020 3211 /* Set default port base */ … … 3183 3374 acpiConstruct, 3184 3375 /* pfnDestruct */ 3185 NULL,3376 acpiDestruct, 3186 3377 /* pfnRelocate */ 3187 3378 acpiRelocate, -
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r39707 r40019 46 46 /* 47 47 * Default DMI data (legacy). 48 * Don't change this information otherwise Windows guests willdemand re-activation!48 * Don't change this information otherwise Windows guests might demand re-activation! 49 49 */ 50 51 /* type 0 -- DMI BIOS information */ 50 52 static const int32_t s_iDefDmiBIOSReleaseMajor = 0; 51 53 static const int32_t s_iDefDmiBIOSReleaseMinor = 0; … … 55 57 static const char *s_szDefDmiBIOSVersion = "VirtualBox"; 56 58 static const char *s_szDefDmiBIOSReleaseDate = "12/01/2006"; 59 /* type 1 -- DMI system information */ 57 60 static const char *s_szDefDmiSystemVendor = "innotek GmbH"; 58 61 static const char *s_szDefDmiSystemProduct = "VirtualBox"; … … 61 64 static const char *s_szDefDmiSystemSKU = ""; 62 65 static const char *s_szDefDmiSystemFamily = "Virtual Machine"; 63 static const char *s_szDefDmiChassisVendor = "Sun Microsystems, Inc."; 66 /* type 2 -- DMI board information */ 67 static const char *s_szDefDmiBoardVendor = "Oracle Corporation"; 68 static const char *s_szDefDmiBoardProduct = "VirtualBox"; 69 static const char *s_szDefDmiBoardVersion = "1.2"; 70 static const char *s_szDefDmiBoardSerial = "0"; 71 static const char *s_szDefDmiBoardAssetTag = ""; 72 static const char *s_szDefDmiBoardLocInChass = ""; 73 static const int32_t s_iDefDmiBoardBoardType = 0x0A; /* Motherboard */ 74 /* type 3 -- DMI chassis information */ 75 static const char *s_szDefDmiChassisVendor = "Oracle Corporation"; 64 76 static const char *s_szDefDmiChassisVersion = ""; 65 77 static const char *s_szDefDmiChassisSerial = ""; 66 78 static const char *s_szDefDmiChassisAssetTag = ""; 79 /* type 4 -- DMI processor information */ 67 80 static const char *s_szDefDmiProcManufacturer = "GenuineIntel"; 68 81 static const char *s_szDefDmiProcVersion = "Pentium(R) III"; … … 154 167 uint8_t u8AssetTag; 155 168 uint8_t u8FeatureFlags; 156 uint8_t u8LocationInChass is;169 uint8_t u8LocationInChass; 157 170 uint16_t u16ChassisHandle; 158 171 uint8_t u8BoardType; … … 653 666 TERM_STRUCT; 654 667 668 /********************************** 669 * DMI board information (Type 2) * 670 **********************************/ 671 PDMIBOARDINF pBoardInf = (PDMIBOARDINF)pszStr; 672 CHECKSIZE(sizeof(*pBoardInf)); 673 pszStr = (char *)(pBoardInf + 1); 674 iStrNr = 1; 675 int iDmiBoardBoardType; 676 pBoardInf->header.u8Type = 2; /* Board Information */ 677 pBoardInf->header.u8Length = sizeof(*pBoardInf); 678 pBoardInf->header.u16Handle = 0x0008; 679 READCFGSTR(pBoardInf->u8Manufacturer, DmiBoardVendor); 680 READCFGSTR(pBoardInf->u8Product, DmiBoardProduct); 681 READCFGSTR(pBoardInf->u8Version, DmiBoardVersion); 682 READCFGSTR(pBoardInf->u8SerialNumber, DmiBoardSerial); 683 READCFGSTR(pBoardInf->u8AssetTag, DmiBoardAssetTag); 684 pBoardInf->u8FeatureFlags = RT_BIT(0) /* hosting board, e.g. motherboard */ 685 ; 686 READCFGSTR(pBoardInf->u8LocationInChass, DmiBoardLocInChass); 687 pBoardInf->u16ChassisHandle = 0x0003; /* see type 3 */ 688 READCFGINT(iDmiBoardBoardType, DmiBoardBoardType); 689 pBoardInf->u8BoardType = iDmiBoardBoardType; 690 pBoardInf->u8cObjectHandles = 0; 691 692 TERM_STRUCT; 693 655 694 /******************************************** 656 695 * DMI System Enclosure or Chassis (Type 3) * … … 897 936 PDMDevHlpPhysWrite(pDevIns, 0xfe300, &aBiosHeaders, sizeof(aBiosHeaders)); 898 937 } 899 AssertCompile(VBOX_DMI_TABLE_ENTR == 8);938 AssertCompile(VBOX_DMI_TABLE_ENTR == 9); 900 939 901 940 /** -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r39707 r40019 958 958 "McfgBase\0" 959 959 "McfgLength\0" 960 "DmiBIOS Vendor\0"961 "DmiBIOS Version\0"960 "DmiBIOSFirmwareMajor\0" 961 "DmiBIOSFirmwareMinor\0" 962 962 "DmiBIOSReleaseDate\0" 963 963 "DmiBIOSReleaseMajor\0" 964 964 "DmiBIOSReleaseMinor\0" 965 "DmiBIOSFirmwareMajor\0" 966 "DmiBIOSFirmwareMinor\0" 967 "DmiSystemSKU\0" 965 "DmiBIOSVendor\0" 966 "DmiBIOSVersion\0" 968 967 "DmiSystemFamily\0" 969 968 "DmiSystemProduct\0" 970 969 "DmiSystemSerial\0" 970 "DmiSystemSKU\0" 971 971 "DmiSystemUuid\0" 972 972 "DmiSystemVendor\0" 973 973 "DmiSystemVersion\0" 974 "DmiBoardAssetTag\0" 975 "DmiBoardBoardType\0" 976 "DmiBoardLocInChass\0" 977 "DmiBoardProduct\0" 978 "DmiBoardSerial\0" 979 "DmiBoardVendor\0" 980 "DmiBoardVersion\0" 981 "DmiChassisAssetTag\0" 982 "DmiChassisSerial\0" 974 983 "DmiChassisVendor\0" 975 984 "DmiChassisVersion\0" 976 "DmiChassisSerial\0" 977 "DmiChassisAssetTag\0" 978 #ifdef VBOX_WITH_DMI_OEMSTRINGS 985 "DmiProcManufacturer\0" 986 "DmiProcVersion\0" 979 987 "DmiOEMVBoxVer\0" 980 988 "DmiOEMVBoxRev\0" 981 #endif982 989 "DmiUseHostInfo\0" 983 990 "DmiExposeMemoryTable\0" -
trunk/src/VBox/Devices/PC/DevPcBios.h
r39707 r40019 22 22 #define VBOX_DMI_TABLE_BASE 0xe1000 23 23 #define VBOX_DMI_TABLE_VER 0x25 24 #define VBOX_DMI_TABLE_ENTR 8 24 25 /** define VBOX_DMI_TABLE_ENTR 26 * 27 * This is the number of DMI structures. 28 */ 29 #define VBOX_DMI_TABLE_ENTR 9 25 30 26 31 /** def VBOX_DMI_TABLE_SIZE … … 31 36 * the MPS table. 32 37 */ 33 #define VBOX_DMI_TABLE_SIZE 49638 #define VBOX_DMI_TABLE_SIZE 512 34 39 35 40
Note:
See TracChangeset
for help on using the changeset viewer.