Changeset 83133 in vbox
- Timestamp:
- Feb 21, 2020 1:41:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevFwCommon.cpp
r83032 r83133 290 290 /* v2.6+ */ 291 291 uint8_t u8Attributes; 292 /* v2.7+ */ 293 uint32_t u32ExtendedSize; 294 uint16_t u16CfgSpeed; /* Configured speed in MT/sec. */ 292 295 } *PDMIMEMORYDEV; 293 AssertCompileSize(DMIMEMORYDEV, 28);296 AssertCompileSize(DMIMEMORYDEV, 34); 294 297 295 298 /** MPS floating pointer structure */ … … 868 871 pMemDev->u16DataWidth = 0xffff; /* Unknown */ 869 872 int16_t u16RamSizeM; 873 int32_t u32ExtRamSizeM = 0; 870 874 if (cbRamSize / _1M > INT16_MAX) 871 875 { 872 /** @todo 32G-1M limit. Provide multiple type-17 descriptors. 873 * The highest bit of u16Size must be 0 to specify 'GB' units / 1 would be 'KB' */ 876 /* The highest bit of u16Size must be 0 to specify 'GB' units / 1 would be 'KB'. 877 * SMBIOS 2.7 intruduced a 32-bit extended size. If module size is 32GB or greater, 878 * the old u16Size is set to 7FFFh; old parsers will see 32GB-1MB, new parsers will 879 * look at new u32ExtendedSize which can represent at least 128TB. OS X 10.14+ looks 880 * at the extended size. 881 */ 874 882 AssertLogRelMsgFailed(("DMI: RAM size %#RX64 too big for one type-17 descriptor, clipping to %#RX64\n", 875 883 cbRamSize, (uint64_t)INT16_MAX * _1M)); 876 884 u16RamSizeM = INT16_MAX; 885 if (cbRamSize / _1M >= 0x8000000) { 886 AssertLogRelMsgFailed(("DMI: RAM size %#RX64 too big for one type-17 descriptor, clipping to %#RX64\n", 887 cbRamSize, (uint64_t)INT32_MAX * _1M)); 888 u32ExtRamSizeM = 0x8000000; /* 128TB */ 889 } 890 else 891 u32ExtRamSizeM = cbRamSize / _1M; 877 892 } 878 893 else … … 881 896 u16RamSizeM = 0x400; /* 1G */ 882 897 pMemDev->u16Size = u16RamSizeM; /* RAM size */ 898 pMemDev->u32ExtendedSize = u32ExtRamSizeM; 883 899 pMemDev->u8FormFactor = 0x09; /* DIMM */ 884 900 pMemDev->u8DeviceSet = 0x00; /* Not part of a device set */
Note:
See TracChangeset
for help on using the changeset viewer.