Changeset 48755 in vbox
- Timestamp:
- Sep 28, 2013 8:08:36 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 89392
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r46355 r48755 51 51 52 52 /* type 0 -- DMI BIOS information */ 53 static const int32_t s_iDefDmiBIOSReleaseMajor = 0;54 static const int32_t s_iDefDmiBIOSReleaseMinor = 0;55 static const int32_t s_iDefDmiBIOSFirmwareMajor = 0;56 static const int32_t s_iDefDmiBIOSFirmwareMinor = 0;57 static const char * s_szDefDmiBIOSVendor= "innotek GmbH";58 static const char * s_szDefDmiBIOSVersion= "VirtualBox";59 static const char * s_szDefDmiBIOSReleaseDate= "12/01/2006";53 static const int32_t g_iDefDmiBIOSReleaseMajor = 0; 54 static const int32_t g_iDefDmiBIOSReleaseMinor = 0; 55 static const int32_t g_iDefDmiBIOSFirmwareMajor = 0; 56 static const int32_t g_iDefDmiBIOSFirmwareMinor = 0; 57 static const char *g_pszDefDmiBIOSVendor = "innotek GmbH"; 58 static const char *g_pszDefDmiBIOSVersion = "VirtualBox"; 59 static const char *g_pszDefDmiBIOSReleaseDate = "12/01/2006"; 60 60 /* type 1 -- DMI system information */ 61 static const char * s_szDefDmiSystemVendor= "innotek GmbH";62 static const char * s_szDefDmiSystemProduct= "VirtualBox";63 static const char * s_szDefDmiSystemVersion= "1.2";64 static const char * s_szDefDmiSystemSerial= "0";65 static const char * s_szDefDmiSystemSKU= "";66 static const char * s_szDefDmiSystemFamily= "Virtual Machine";61 static const char *g_pszDefDmiSystemVendor = "innotek GmbH"; 62 static const char *g_pszDefDmiSystemProduct = "VirtualBox"; 63 static const char *g_pszDefDmiSystemVersion = "1.2"; 64 static const char *g_pszDefDmiSystemSerial = "0"; 65 static const char *g_pszDefDmiSystemSKU = ""; 66 static const char *g_pszDefDmiSystemFamily = "Virtual Machine"; 67 67 /* type 2 -- DMI board information */ 68 static const char * s_szDefDmiBoardVendor= "Oracle Corporation";69 static const char * s_szDefDmiBoardProduct= "VirtualBox";70 static const char * s_szDefDmiBoardVersion= "1.2";71 static const char * s_szDefDmiBoardSerial= "0";72 static const char * s_szDefDmiBoardAssetTag= "";73 static const char * s_szDefDmiBoardLocInChass= "";74 static const int32_t s_iDefDmiBoardBoardType = 0x0A; /* Motherboard */68 static const char *g_pszDefDmiBoardVendor = "Oracle Corporation"; 69 static const char *g_pszDefDmiBoardProduct = "VirtualBox"; 70 static const char *g_pszDefDmiBoardVersion = "1.2"; 71 static const char *g_pszDefDmiBoardSerial = "0"; 72 static const char *g_pszDefDmiBoardAssetTag = ""; 73 static const char *g_pszDefDmiBoardLocInChass = ""; 74 static const int32_t g_iDefDmiBoardBoardType = 0x0A; /* Motherboard */ 75 75 /* type 3 -- DMI chassis information */ 76 static const char * s_szDefDmiChassisVendor= "Oracle Corporation";77 static const int32_t s_iDefDmiChassisType = 0x01; /* ''other'', no chassis lock present */78 static const char * s_szDefDmiChassisVersion= "";79 static const char * s_szDefDmiChassisSerial= "";80 static const char * s_szDefDmiChassisAssetTag= "";76 static const char *g_pszDefDmiChassisVendor = "Oracle Corporation"; 77 static const int32_t g_iDefDmiChassisType = 0x01; /* ''other'', no chassis lock present */ 78 static const char *g_pszDefDmiChassisVersion = ""; 79 static const char *g_pszDefDmiChassisSerial = ""; 80 static const char *g_pszDefDmiChassisAssetTag = ""; 81 81 /* type 4 -- DMI processor information */ 82 static const char *s_szDefDmiProcManufacturer = "GenuineIntel"; 83 static const char *s_szDefDmiProcVersion = "Pentium(R) III"; 84 82 static const char *g_pszDefDmiProcManufacturer= "GenuineIntel"; 83 static const char *g_pszDefDmiProcVersion = "Pentium(R) III"; 84 85 /** The host DMI system product value, for DmiUseHostInfo=1. */ 85 86 static char g_szHostDmiSystemProduct[64]; 87 /** The host DMI system version value, for DmiUseHostInfo=1. */ 86 88 static char g_szHostDmiSystemVersion[64]; 87 89 … … 403 405 if (RT_SUCCESS(rc)) 404 406 { 405 s_szDefDmiSystemProduct = g_szHostDmiSystemProduct;407 g_pszDefDmiSystemProduct = g_szHostDmiSystemProduct; 406 408 LogRel(("DMI: Using DmiSystemProduct from host: %s\n", g_szHostDmiSystemProduct)); 407 409 } … … 411 413 if (RT_SUCCESS(rc)) 412 414 { 413 s_szDefDmiSystemVersion = g_szHostDmiSystemVersion;415 g_pszDefDmiSystemVersion = g_szHostDmiSystemVersion; 414 416 LogRel(("DMI: Using DmiSystemVersion from host: %s\n", g_szHostDmiSystemVersion)); 415 417 } … … 432 434 int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus, uint16_t *pcbDmiTables, uint16_t *pcNumDmiTables) 433 435 { 434 #define CHECKSIZE(cbWant) \ 436 /* 437 * CFGM Hint! 438 * 439 * The macros below makes it a bit hard to figure out the config options 440 * available here. To get a quick hint, take a look a the CFGM 441 * validation in the calling code (DevEFI.cpp and DevPcBios.cpp). 442 * 443 * 32-bit signed integer CFGM options are read by DMI_READ_CFG_S32, the 2nd 444 * parameter is the CFGM value name. 445 * 446 * Strings are read by DMI_READ_CFG_STR and DMI_READ_CFG_STR_DEF, the 2nd parameter is 447 * the CFGM value name. 448 */ 449 #define DMI_CHECK_SIZE(cbWant) \ 435 450 { \ 436 451 size_t cbNeed = (size_t)(pszStr + cbWant - (char *)pTable) + 5; /* +1 for strtab terminator +4 for end-of-table entry */ \ … … 447 462 } 448 463 449 #define READCFGSTRDEF(variable, name, default_value) \464 #define DMI_READ_CFG_STR_DEF(variable, name, default_value) \ 450 465 { \ 451 466 if (fForceDefault) \ … … 475 490 variable = iStrNr++; \ 476 491 size_t cStr = strlen(pszTmp) + 1; \ 477 CHECKSIZE(cStr); \492 DMI_CHECK_SIZE(cStr); \ 478 493 memcpy(pszStr, pszTmp, cStr); \ 479 494 pszStr += cStr ; \ … … 481 496 } 482 497 483 #define READCFGSTR(variable, name) \484 READCFGSTRDEF(variable, # name, s_szDef ## name)485 486 #define READCFGINT(variable, name) \498 #define DMI_READ_CFG_STR(variable, name) \ 499 DMI_READ_CFG_STR_DEF(variable, # name, g_pszDef ## name) 500 501 #define DMI_READ_CFG_S32(variable, name) \ 487 502 { \ 488 503 if (fForceDefault) \ 489 variable = s_iDef ## name; \504 variable = g_iDef ## name; \ 490 505 else \ 491 506 { \ 492 rc = CFGMR3QueryS32Def(pCfg, # name, & variable, s_iDef ## name); \507 rc = CFGMR3QueryS32Def(pCfg, # name, & variable, g_iDef ## name); \ 493 508 if (RT_FAILURE(rc)) \ 494 509 { \ … … 504 519 } 505 520 506 #define START_STRUCT(tbl)\507 pszStr = (char *)(tbl + 1); 521 #define DMI_START_STRUCT(tbl) \ 522 pszStr = (char *)(tbl + 1); \ 508 523 iStrNr = 1; 509 524 510 #define TERM_STRUCT \525 #define DMI_TERM_STRUCT \ 511 526 { \ 512 527 *pszStr++ = '\0'; /* terminate set of text strings */ \ … … 586 601 *********************************/ 587 602 PDMIBIOSINF pBIOSInf = (PDMIBIOSINF)pszStr; 588 CHECKSIZE(sizeof(*pBIOSInf));603 DMI_CHECK_SIZE(sizeof(*pBIOSInf)); 589 604 590 605 pszStr = (char *)&pBIOSInf->u8ReleaseMajor; … … 593 608 /* don't set these fields by default for legacy compatibility */ 594 609 int iDmiBIOSReleaseMajor, iDmiBIOSReleaseMinor; 595 READCFGINT(iDmiBIOSReleaseMajor, DmiBIOSReleaseMajor);596 READCFGINT(iDmiBIOSReleaseMinor, DmiBIOSReleaseMinor);610 DMI_READ_CFG_S32(iDmiBIOSReleaseMajor, DmiBIOSReleaseMajor); 611 DMI_READ_CFG_S32(iDmiBIOSReleaseMinor, DmiBIOSReleaseMinor); 597 612 if (iDmiBIOSReleaseMajor != 0 || iDmiBIOSReleaseMinor != 0) 598 613 { … … 603 618 604 619 int iDmiBIOSFirmwareMajor, iDmiBIOSFirmwareMinor; 605 READCFGINT(iDmiBIOSFirmwareMajor, DmiBIOSFirmwareMajor);606 READCFGINT(iDmiBIOSFirmwareMinor, DmiBIOSFirmwareMinor);620 DMI_READ_CFG_S32(iDmiBIOSFirmwareMajor, DmiBIOSFirmwareMajor); 621 DMI_READ_CFG_S32(iDmiBIOSFirmwareMinor, DmiBIOSFirmwareMinor); 607 622 if (iDmiBIOSFirmwareMajor != 0 || iDmiBIOSFirmwareMinor != 0) 608 623 { … … 617 632 pBIOSInf->header.u8Type = 0; /* BIOS Information */ 618 633 pBIOSInf->header.u16Handle = 0x0000; 619 READCFGSTR(pBIOSInf->u8Vendor, DmiBIOSVendor);620 READCFGSTR(pBIOSInf->u8Version, DmiBIOSVersion);634 DMI_READ_CFG_STR(pBIOSInf->u8Vendor, DmiBIOSVendor); 635 DMI_READ_CFG_STR(pBIOSInf->u8Version, DmiBIOSVersion); 621 636 pBIOSInf->u16Start = 0xE000; 622 READCFGSTR(pBIOSInf->u8Release, DmiBIOSReleaseDate);637 DMI_READ_CFG_STR(pBIOSInf->u8Release, DmiBIOSReleaseDate); 623 638 pBIOSInf->u8ROMSize = 1; /* 128K */ 624 639 pBIOSInf->u64Characteristics = RT_BIT(4) /* ISA is supported */ … … 636 651 /* any more?? */ 637 652 ; 638 TERM_STRUCT;653 DMI_TERM_STRUCT; 639 654 640 655 /*********************************** … … 642 657 ***********************************/ 643 658 PDMISYSTEMINF pSystemInf = (PDMISYSTEMINF)pszStr; 644 CHECKSIZE(sizeof(*pSystemInf));645 START_STRUCT(pSystemInf);659 DMI_CHECK_SIZE(sizeof(*pSystemInf)); 660 DMI_START_STRUCT(pSystemInf); 646 661 pSystemInf->header.u8Type = 1; /* System Information */ 647 662 pSystemInf->header.u8Length = sizeof(*pSystemInf); 648 663 pSystemInf->header.u16Handle = 0x0001; 649 READCFGSTR(pSystemInf->u8Manufacturer, DmiSystemVendor);650 READCFGSTR(pSystemInf->u8ProductName, DmiSystemProduct);651 READCFGSTR(pSystemInf->u8Version, DmiSystemVersion);652 READCFGSTR(pSystemInf->u8SerialNumber, DmiSystemSerial);664 DMI_READ_CFG_STR(pSystemInf->u8Manufacturer, DmiSystemVendor); 665 DMI_READ_CFG_STR(pSystemInf->u8ProductName, DmiSystemProduct); 666 DMI_READ_CFG_STR(pSystemInf->u8Version, DmiSystemVersion); 667 DMI_READ_CFG_STR(pSystemInf->u8SerialNumber, DmiSystemSerial); 653 668 654 669 RTUUID uuid; … … 674 689 675 690 pSystemInf->u8WakeupType = 6; /* Power Switch */ 676 READCFGSTR(pSystemInf->u8SKUNumber, DmiSystemSKU);677 READCFGSTR(pSystemInf->u8Family, DmiSystemFamily);678 TERM_STRUCT;691 DMI_READ_CFG_STR(pSystemInf->u8SKUNumber, DmiSystemSKU); 692 DMI_READ_CFG_STR(pSystemInf->u8Family, DmiSystemFamily); 693 DMI_TERM_STRUCT; 679 694 680 695 /********************************** … … 682 697 **********************************/ 683 698 PDMIBOARDINF pBoardInf = (PDMIBOARDINF)pszStr; 684 CHECKSIZE(sizeof(*pBoardInf));685 START_STRUCT(pBoardInf);699 DMI_CHECK_SIZE(sizeof(*pBoardInf)); 700 DMI_START_STRUCT(pBoardInf); 686 701 int iDmiBoardBoardType; 687 702 pBoardInf->header.u8Type = 2; /* Board Information */ 688 703 pBoardInf->header.u8Length = sizeof(*pBoardInf); 689 704 pBoardInf->header.u16Handle = 0x0008; 690 READCFGSTR(pBoardInf->u8Manufacturer, DmiBoardVendor);691 READCFGSTR(pBoardInf->u8Product, DmiBoardProduct);692 READCFGSTR(pBoardInf->u8Version, DmiBoardVersion);693 READCFGSTR(pBoardInf->u8SerialNumber, DmiBoardSerial);694 READCFGSTR(pBoardInf->u8AssetTag, DmiBoardAssetTag);705 DMI_READ_CFG_STR(pBoardInf->u8Manufacturer, DmiBoardVendor); 706 DMI_READ_CFG_STR(pBoardInf->u8Product, DmiBoardProduct); 707 DMI_READ_CFG_STR(pBoardInf->u8Version, DmiBoardVersion); 708 DMI_READ_CFG_STR(pBoardInf->u8SerialNumber, DmiBoardSerial); 709 DMI_READ_CFG_STR(pBoardInf->u8AssetTag, DmiBoardAssetTag); 695 710 pBoardInf->u8FeatureFlags = RT_BIT(0) /* hosting board, e.g. motherboard */ 696 711 ; 697 READCFGSTR(pBoardInf->u8LocationInChass, DmiBoardLocInChass);712 DMI_READ_CFG_STR(pBoardInf->u8LocationInChass, DmiBoardLocInChass); 698 713 pBoardInf->u16ChassisHandle = 0x0003; /* see type 3 */ 699 READCFGINT(iDmiBoardBoardType, DmiBoardBoardType);714 DMI_READ_CFG_S32(iDmiBoardBoardType, DmiBoardBoardType); 700 715 pBoardInf->u8BoardType = iDmiBoardBoardType; 701 716 pBoardInf->u8cObjectHandles = 0; 702 717 703 TERM_STRUCT;718 DMI_TERM_STRUCT; 704 719 705 720 /******************************************** … … 707 722 ********************************************/ 708 723 PDMICHASSIS pChassis = (PDMICHASSIS)pszStr; 709 CHECKSIZE(sizeof(*pChassis));724 DMI_CHECK_SIZE(sizeof(*pChassis)); 710 725 pszStr = (char*)&pChassis->u32OEMdefined; 711 726 iStrNr = 1; … … 717 732 pChassis->header.u8Length = RT_OFFSETOF(DMICHASSIS, u32OEMdefined); 718 733 pChassis->header.u16Handle = 0x0003; 719 READCFGSTR(pChassis->u8Manufacturer, DmiChassisVendor);734 DMI_READ_CFG_STR(pChassis->u8Manufacturer, DmiChassisVendor); 720 735 int iDmiChassisType; 721 READCFGINT(iDmiChassisType, DmiChassisType);736 DMI_READ_CFG_S32(iDmiChassisType, DmiChassisType); 722 737 pChassis->u8Type = iDmiChassisType; 723 READCFGSTR(pChassis->u8Version, DmiChassisVersion);724 READCFGSTR(pChassis->u8SerialNumber, DmiChassisSerial);725 READCFGSTR(pChassis->u8AssetTag, DmiChassisAssetTag);738 DMI_READ_CFG_STR(pChassis->u8Version, DmiChassisVersion); 739 DMI_READ_CFG_STR(pChassis->u8SerialNumber, DmiChassisSerial); 740 DMI_READ_CFG_STR(pChassis->u8AssetTag, DmiChassisAssetTag); 726 741 pChassis->u8BootupState = 0x03; /* safe */ 727 742 pChassis->u8PowerSupplyState = 0x03; /* safe */ … … 736 751 pChassis->u8ContElemRecLen = 0; /* no contained elements */ 737 752 # endif 738 TERM_STRUCT;753 DMI_TERM_STRUCT; 739 754 740 755 /************************************** … … 748 763 char szSocket[32]; 749 764 PDMIPROCESSORINF pProcessorInf = (PDMIPROCESSORINF)pszStr; 750 CHECKSIZE(sizeof(*pProcessorInf));751 START_STRUCT(pProcessorInf);765 DMI_CHECK_SIZE(sizeof(*pProcessorInf)); 766 DMI_START_STRUCT(pProcessorInf); 752 767 if (fDmiExposeProcessorInf) 753 768 pProcessorInf->header.u8Type = 4; /* Processor Information */ … … 760 775 { 761 776 size_t cStr = strlen(szSocket) + 1; 762 CHECKSIZE(cStr);777 DMI_CHECK_SIZE(cStr); 763 778 memcpy(pszStr, szSocket, cStr); 764 779 pszStr += cStr; … … 766 781 pProcessorInf->u8ProcessorType = 0x03; /* Central Processor */ 767 782 pProcessorInf->u8ProcessorFamily = 0xB1; /* Pentium III with Intel SpeedStep(TM) */ 768 READCFGSTR(pProcessorInf->u8ProcessorManufacturer, DmiProcManufacturer);783 DMI_READ_CFG_STR(pProcessorInf->u8ProcessorManufacturer, DmiProcManufacturer); 769 784 770 785 pProcessorInf->u64ProcessorID = UINT64_C(0x0FEBFBFF00010676); … … 778 793 * APIC, SEP, MTRR, PGE, MCA, CMOV, PAT, PSE-36, 779 794 * CFLSH, DS, ACPI, MMX, FXSR, SSE, SSE2, SS */ 780 READCFGSTR(pProcessorInf->u8ProcessorVersion, DmiProcVersion);795 DMI_READ_CFG_STR(pProcessorInf->u8ProcessorVersion, DmiProcVersion); 781 796 pProcessorInf->u8Voltage = 0x02; /* 3.3V */ 782 797 pProcessorInf->u16ExternalClock = 0x00; /* unknown */ … … 799 814 = RT_BIT(2); /* 64-bit capable */ 800 815 pProcessorInf->u16ProcessorFamily2 = 0; 801 TERM_STRUCT;816 DMI_TERM_STRUCT; 802 817 803 818 /*************************************** … … 811 826 812 827 PDMIRAMARRAY pMemArray = (PDMIRAMARRAY)pszStr; 813 CHECKSIZE(sizeof(*pMemArray));814 START_STRUCT(pMemArray);828 DMI_CHECK_SIZE(sizeof(*pMemArray)); 829 DMI_START_STRUCT(pMemArray); 815 830 if (fDmiExposeMemoryTable) 816 831 pMemArray->header.u8Type = 16; /* Physical Memory Array */ … … 825 840 pMemArray->u16MemErrorHandle = 0xfffe; /* No error info structure */ 826 841 pMemArray->u16NumberOfMemDevices = 1; 827 TERM_STRUCT;842 DMI_TERM_STRUCT; 828 843 829 844 /*************************************** … … 831 846 ***************************************/ 832 847 PDMIMEMORYDEV pMemDev = (PDMIMEMORYDEV)pszStr; 833 CHECKSIZE(sizeof(*pMemDev));834 START_STRUCT(pMemDev);848 DMI_CHECK_SIZE(sizeof(*pMemDev)); 849 DMI_START_STRUCT(pMemDev); 835 850 if (fDmiExposeMemoryTable) 836 851 pMemDev->header.u8Type = 17; /* Memory Device */ … … 849 864 pMemDev->u8FormFactor = 0x09; /* DIMM */ 850 865 pMemDev->u8DeviceSet = 0x00; /* Not part of a device set */ 851 READCFGSTRDEF(pMemDev->u8DeviceLocator, " ", "DIMM 0");852 READCFGSTRDEF(pMemDev->u8BankLocator, " ", "Bank 0");866 DMI_READ_CFG_STR_DEF(pMemDev->u8DeviceLocator, " ", "DIMM 0"); 867 DMI_READ_CFG_STR_DEF(pMemDev->u8BankLocator, " ", "Bank 0"); 853 868 pMemDev->u8MemoryType = 0x03; /* DRAM */ 854 869 pMemDev->u16TypeDetail = 0; /* Nothing special */ 855 870 pMemDev->u16Speed = 1600; /* Unknown, shall be speed in MHz */ 856 READCFGSTR(pMemDev->u8Manufacturer, DmiSystemVendor);857 READCFGSTRDEF(pMemDev->u8SerialNumber, " ", "00000000");858 READCFGSTRDEF(pMemDev->u8AssetTag, " ", "00000000");859 READCFGSTRDEF(pMemDev->u8PartNumber, " ", "00000000");871 DMI_READ_CFG_STR(pMemDev->u8Manufacturer, DmiSystemVendor); 872 DMI_READ_CFG_STR_DEF(pMemDev->u8SerialNumber, " ", "00000000"); 873 DMI_READ_CFG_STR_DEF(pMemDev->u8AssetTag, " ", "00000000"); 874 DMI_READ_CFG_STR_DEF(pMemDev->u8PartNumber, " ", "00000000"); 860 875 pMemDev->u8Attributes = 0; /* Unknown */ 861 TERM_STRUCT;876 DMI_TERM_STRUCT; 862 877 863 878 /***************************** … … 865 880 *****************************/ 866 881 PDMIOEMSTRINGS pOEMStrings = (PDMIOEMSTRINGS)pszStr; 867 CHECKSIZE(sizeof(*pOEMStrings));868 START_STRUCT(pOEMStrings);882 DMI_CHECK_SIZE(sizeof(*pOEMStrings)); 883 DMI_START_STRUCT(pOEMStrings); 869 884 #ifdef VBOX_WITH_DMI_OEMSTRINGS 870 885 pOEMStrings->header.u8Type = 0xb; /* OEM Strings */ … … 879 894 RTStrPrintf(szTmp, sizeof(szTmp), "vboxVer_%u.%u.%u", 880 895 RTBldCfgVersionMajor(), RTBldCfgVersionMinor(), RTBldCfgVersionBuild()); 881 READCFGSTRDEF(pOEMStrings->u8VBoxVersion, "DmiOEMVBoxVer", szTmp);896 DMI_READ_CFG_STR_DEF(pOEMStrings->u8VBoxVersion, "DmiOEMVBoxVer", szTmp); 882 897 RTStrPrintf(szTmp, sizeof(szTmp), "vboxRev_%u", RTBldCfgRevision()); 883 READCFGSTRDEF(pOEMStrings->u8VBoxRevision, "DmiOEMVBoxRev", szTmp);884 TERM_STRUCT;898 DMI_READ_CFG_STR_DEF(pOEMStrings->u8VBoxRevision, "DmiOEMVBoxRev", szTmp); 899 DMI_TERM_STRUCT; 885 900 886 901 /************************************* … … 888 903 ************************************/ 889 904 PDMIOEMSPECIFIC pOEMSpecific = (PDMIOEMSPECIFIC)pszStr; 890 CHECKSIZE(sizeof(*pOEMSpecific));891 START_STRUCT(pOEMSpecific);905 DMI_CHECK_SIZE(sizeof(*pOEMSpecific)); 906 DMI_START_STRUCT(pOEMSpecific); 892 907 pOEMSpecific->header.u8Type = 0x80; /* OEM specific */ 893 908 pOEMSpecific->header.u8Length = sizeof(*pOEMSpecific); 894 909 pOEMSpecific->header.u16Handle = 0x0008; /* Just next free handle */ 895 910 pOEMSpecific->u32CpuFreqKHz = RT_H2LE_U32((uint32_t)((uint64_t)TMCpuTicksPerSecond(PDMDevHlpGetVM(pDevIns)) / 1000)); 896 TERM_STRUCT;911 DMI_TERM_STRUCT; 897 912 898 913 /* End-of-table marker - includes padding to account for fixed table size. */ … … 908 923 *pcNumDmiTables = 10; 909 924 910 /* If more fields are added here, fix the size check in READCFGSTR */925 /* If more fields are added here, fix the size check in DMI_READ_CFG_STR */ 911 926 912 927 /* Success! */ … … 914 929 } 915 930 916 #undef READCFGSTR917 #undef READCFGINT918 #undef CHECKSIZE931 #undef DMI_READ_CFG_STR 932 #undef DMI_READ_CFG_S32 933 #undef DMI_CHECK_SIZE 919 934 return VINF_SUCCESS; 920 935 } … … 1149 1164 PDMDevHlpPhysWrite(pDevIns, 0x9fff0, &floatPtr, 16); 1150 1165 } 1166
Note:
See TracChangeset
for help on using the changeset viewer.