2 Lib include for SMBIOS services. Used to get system serial number and GUID
4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _LIB_SMBIOS_H_
16 #define _LIB_SMBIOS_H_
19 // Define SMBIOS tables.
23 typedef UINT8 SMBIOS_STRING
;
26 UINT8 AnchorString
[4];
27 UINT8 EntryPointStructureChecksum
;
28 UINT8 EntryPointLength
;
31 UINT16 MaxStructureSize
;
32 UINT8 EntryPointRevision
;
33 UINT8 FormattedArea
[5];
34 UINT8 IntermediateAnchorString
[5];
35 UINT8 IntermediateChecksum
;
38 UINT16 NumberOfSmbiosStructures
;
39 UINT8 SmbiosBcdRevision
;
40 } SMBIOS_STRUCTURE_TABLE
;
43 // Please note that SMBIOS structures can be odd byte aligned since the
44 // unformated section of each record is a set of arbitrary size strings.
55 SMBIOS_STRING BiosVersion
;
57 SMBIOS_STRING BiosReleaseDate
;
59 UINT64 BiosCharacteristics
;
60 UINT8 BIOSCharacteristicsExtensionBytes
[2];
61 UINT8 SystemBiosMajorRelease
;
62 UINT8 SystemBiosMinorRelease
;
63 UINT8 EmbeddedControllerFirmwareMajorRelease
;
64 UINT8 EmbeddedControllerFirmwareMinorRelease
;
69 SMBIOS_STRING Manufacturer
;
70 SMBIOS_STRING ProductName
;
71 SMBIOS_STRING Version
;
72 SMBIOS_STRING SerialNumber
;
75 SMBIOS_STRING SKUNumber
;
81 SMBIOS_STRING Manufacturer
;
82 SMBIOS_STRING ProductName
;
83 SMBIOS_STRING Version
;
84 SMBIOS_STRING SerialNumber
;
85 SMBIOS_STRING AssetTag
;
87 SMBIOS_STRING LocationInChassis
;
90 UINT8 NumberOfContainedObjectHandles
;
91 UINT16 ContainedObjectHandles
[1];
95 UINT8 ContainedElementType
;
96 UINT8 ContainedElementMinimum
;
97 UINT8 ContainedElementMaximum
;
102 SMBIOS_STRING Manufacturer
;
104 SMBIOS_STRING Version
;
105 SMBIOS_STRING SerialNumber
;
106 SMBIOS_STRING AssetTag
;
108 UINT8 PowerSupplyState
;
110 UINT8 SecurityStatus
;
113 UINT8 NumberofPowerCords
;
114 UINT8 ContainedElementCount
;
115 UINT8 ContainedElementRecordLength
;
116 CONTAINED_ELEMENT ContainedElements
[1];
123 UINT8 ProcessorFamily
;
124 SMBIOS_STRING ProcessorManufacture
;
125 UINT8 ProcessorId
[8];
126 SMBIOS_STRING ProcessorVersion
;
128 UINT16 ExternalClock
;
132 UINT8 ProcessorUpgrade
;
133 UINT16 L1CacheHandle
;
134 UINT16 L2CacheHandle
;
135 UINT16 L3CacheHandle
;
136 SMBIOS_STRING SerialNumber
;
137 SMBIOS_STRING AssetTag
;
138 SMBIOS_STRING PartNumber
;
140 // Add for smbios 2.5
143 UINT8 EnabledCoreCount
;
145 UINT16 ProcessorCharacteristics
;
147 // Add for smbios 2.6
149 UINT16 ProcessorFamily2
;
154 UINT8 ErrDetectMethod
;
155 UINT8 ErrCorrectCapability
;
156 UINT8 SupportInterleave
;
157 UINT8 CurrentInterleave
;
158 UINT8 MaxMemoryModuleSize
;
160 UINT16 SupportMemoryType
;
161 UINT8 MemoryModuleVoltage
;
162 UINT8 AssociatedMemorySlotNum
;
163 UINT16 MemoryModuleConfigHandles
[1];
168 SMBIOS_STRING SocketDesignation
;
169 UINT8 BankConnections
;
171 UINT16 CurrentMemoryType
;
179 SMBIOS_STRING SocketDesignation
;
180 UINT16 CacheConfiguration
;
181 UINT16 MaximumCacheSize
;
182 UINT16 InstalledSize
;
183 UINT16 SupportedSRAMType
;
184 UINT16 CurrentSRAMType
;
186 UINT8 ErrorCorrectionType
;
187 UINT8 SystemCacheType
;
193 SMBIOS_STRING InternalReferenceDesignator
;
194 UINT8 InternalConnectorType
;
195 SMBIOS_STRING ExternalReferenceDesignator
;
196 UINT8 ExternalConnectorType
;
202 SMBIOS_STRING SlotDesignation
;
204 UINT8 SlotDataBusWidth
;
208 UINT8 SlotCharacteristics1
;
209 UINT8 SlotCharacteristics2
;
211 // Add for smbios 2.6
213 UINT16 SegmentGroupNum
;
218 typedef struct _DEVICE_STRUCTURE
{
220 SMBIOS_STRING DescriptionString
;
225 DEVICE_STRUCTURE Device
[1];
240 UINT8 InstallableLanguages
;
243 SMBIOS_STRING CurrentLanguages
;
248 SMBIOS_STRING GroupName
;
253 typedef struct EVENTLOGTYPE
{
255 UINT8 DataFormatType
;
260 UINT16 LogAreaLength
;
261 UINT16 LogHeaderStartOffset
;
262 UINT16 LogDataStartOffset
;
265 UINT32 LogChangeToken
;
266 UINT32 AccessMethodAddress
;
267 UINT8 LogHeaderFormat
;
268 UINT8 NumberOfSupportedLogTypeDescriptors
;
269 UINT8 LengthOfLogTypeDescriptor
;
270 EVENTLOGTYPE EventLogTypeDescriptors
[1];
277 UINT8 MemoryErrorCorrection
;
278 UINT32 MaximumCapacity
;
279 UINT16 MemoryErrorInformationHandle
;
280 UINT16 NumberOfMemoryDevices
;
285 UINT16 MemoryArrayHandle
;
286 UINT16 MemoryErrorInformationHandle
;
292 SMBIOS_STRING DeviceLocator
;
293 SMBIOS_STRING BankLocator
;
297 SMBIOS_STRING Manufacturer
;
298 SMBIOS_STRING SerialNumber
;
299 SMBIOS_STRING AssetTag
;
300 SMBIOS_STRING PartNumber
;
302 // Add for smbios 2.6
310 UINT8 ErrorGranularity
;
311 UINT8 ErrorOperation
;
312 UINT32 VendorSyndrome
;
313 UINT32 MemoryArrayErrorAddress
;
314 UINT32 DeviceErrorAddress
;
315 UINT32 ErrorResolution
;
320 UINT32 StartingAddress
;
321 UINT32 EndingAddress
;
322 UINT16 MemoryArrayHandle
;
323 UINT8 PartitionWidth
;
325 // Add for smbios 2.7
327 UINT64 ExtendedStartingAddress
;
328 UINT64 ExtendedEndingAddress
;
333 UINT32 StartingAddress
;
334 UINT32 EndingAddress
;
335 UINT16 MemoryDeviceHandle
;
336 UINT16 MemoryArrayMappedAddressHandle
;
337 UINT8 PartitionRowPosition
;
338 UINT8 InterleavePosition
;
339 UINT8 InterleavedDataDepth
;
346 UINT8 NumberOfButtons
;
351 SMBIOS_STRING Location
;
352 SMBIOS_STRING Manufacturer
;
353 SMBIOS_STRING ManufactureDate
;
354 SMBIOS_STRING SerialNumber
;
355 SMBIOS_STRING DeviceName
;
356 UINT8 DeviceChemistry
;
357 UINT16 DeviceCapacity
;
358 UINT16 DesignVoltage
;
359 SMBIOS_STRING SBDSVersionNumber
;
360 UINT8 MaximumErrorInBatteryData
;
361 UINT16 SBDSSerialNumber
;
362 UINT16 SBDSManufactureDate
;
363 SMBIOS_STRING SBDSDeviceChemistry
;
364 UINT8 DesignCapacityMultiplier
;
373 UINT16 TimerInterval
;
379 UINT8 HardwareSecuritySettings
;
384 UINT8 NextScheduledPowerOnMonth
;
385 UINT8 NextScheduledPowerOnDayOfMonth
;
386 UINT8 NextScheduledPowerOnHour
;
387 UINT8 NextScheduledPowerOnMinute
;
388 UINT8 NextScheduledPowerOnSecond
;
393 SMBIOS_STRING Description
;
394 UINT8 LocationAndStatus
;
406 UINT16 TemperatureProbeHandle
;
407 UINT8 DeviceTypeAndStatus
;
408 UINT8 CoolingUnitGroup
;
415 SMBIOS_STRING Description
;
416 UINT8 LocationAndStatus
;
428 SMBIOS_STRING Description
;
429 UINT8 LocationAndStatus
;
441 SMBIOS_STRING ManufacturerName
;
465 UINT8 ErrorGranularity
;
466 UINT8 ErrorOperation
;
467 UINT32 VendorSyndrome
;
468 UINT64 MemoryArrayErrorAddress
;
469 UINT64 DeviceErrorAddress
;
470 UINT32 ErrorResolution
;
475 SMBIOS_STRING Description
;
483 SMBIOS_STRING Description
;
484 UINT16 ManagementDeviceHandle
;
485 UINT16 ComponentHandle
;
486 UINT16 ThresholdHandle
;
491 UINT16 LowerThresholdNonCritical
;
492 UINT16 UpperThresholdNonCritical
;
493 UINT16 LowerThresholdCritical
;
494 UINT16 UpperThresholdCritical
;
495 UINT16 LowerThresholdNonRecoverable
;
496 UINT16 UpperThresholdNonRecoverable
;
499 typedef struct MEMORYDEVICE
{
507 UINT8 MaximumChannelLoad
;
508 UINT8 MemoryDeviceCount
;
509 MEMORYDEVICE MemoryDevice
[1];
515 UINT8 IPMISpecificationRevision
;
516 UINT8 I2CSlaveAddress
;
517 UINT8 NVStorageDeviceAddress
;
523 UINT8 PowerUnitGroup
;
524 SMBIOS_STRING Location
;
525 SMBIOS_STRING DeviceName
;
526 SMBIOS_STRING Manufacturer
;
527 SMBIOS_STRING SerialNumber
;
528 SMBIOS_STRING AssetTagNumber
;
529 SMBIOS_STRING ModelPartNumber
;
530 SMBIOS_STRING RevisionLevel
;
531 UINT16 MaxPowerCapacity
;
532 UINT16 PowerSupplyCharacteristics
;
533 UINT16 InputVoltageProbeHandle
;
534 UINT16 CoolingDeviceHandle
;
535 UINT16 InputCurrentProbeHandle
;
539 // Add type 40 and type 41 for smbios 2.6
543 UINT16 ReferencedHandle
;
544 UINT8 ReferencedOffset
;
545 SMBIOS_STRING EntryString
;
547 } ADDITIONAL_INFORMATION_ENTRY
;
551 UINT8 NumberOfAdditionalInformationEntries
;
552 ADDITIONAL_INFORMATION_ENTRY AdditionalInfoEntries
[1];
557 SMBIOS_STRING ReferenceDesignation
;
559 UINT8 DeviceTypeInstance
;
560 UINT16 SegmentGroupNum
;
575 Among the following 42 type of structues for SMBIOS Stucture table,
576 There are only 11 Types(0,1,3,4,7,9,16,17,19,20,32) are required,
577 The other types is optional.
591 SMBIOS_TYPE10
*Type10
;
592 SMBIOS_TYPE11
*Type11
;
593 SMBIOS_TYPE12
*Type12
;
594 SMBIOS_TYPE13
*Type13
;
595 SMBIOS_TYPE14
*Type14
;
596 SMBIOS_TYPE15
*Type15
;
597 SMBIOS_TYPE16
*Type16
;
598 SMBIOS_TYPE17
*Type17
;
599 SMBIOS_TYPE18
*Type18
;
600 SMBIOS_TYPE19
*Type19
;
601 SMBIOS_TYPE20
*Type20
;
602 SMBIOS_TYPE21
*Type21
;
603 SMBIOS_TYPE22
*Type22
;
604 SMBIOS_TYPE23
*Type23
;
605 SMBIOS_TYPE24
*Type24
;
606 SMBIOS_TYPE25
*Type25
;
607 SMBIOS_TYPE26
*Type26
;
608 SMBIOS_TYPE27
*Type27
;
609 SMBIOS_TYPE28
*Type28
;
610 SMBIOS_TYPE29
*Type29
;
611 SMBIOS_TYPE30
*Type30
;
612 SMBIOS_TYPE31
*Type31
;
613 SMBIOS_TYPE32
*Type32
;
614 SMBIOS_TYPE33
*Type33
;
615 SMBIOS_TYPE34
*Type34
;
616 SMBIOS_TYPE35
*Type35
;
617 SMBIOS_TYPE36
*Type36
;
618 SMBIOS_TYPE37
*Type37
;
619 SMBIOS_TYPE38
*Type38
;
620 SMBIOS_TYPE39
*Type39
;
621 SMBIOS_TYPE40
*Type40
;
622 SMBIOS_TYPE41
*Type41
;
623 SMBIOS_TYPE126
*Type126
;
624 SMBIOS_TYPE127
*Type127
;
626 } SMBIOS_STRUCTURE_POINTER
;
631 Return SMBIOS string given the string number.
633 @param[in] Smbios Pointer to SMBIOS structure.
634 @param[in] StringNumber String number to return. -1 is used to skip all strings and
635 point to the next SMBIOS structure.
637 @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1
641 IN SMBIOS_STRUCTURE_POINTER
*Smbios
,
642 IN UINT16 StringNumber