X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FSmbios.h;h=f52c4dfc5bacbb92a531be251930ecdc98356cf8;hb=b88df76120d228a5d27f48577f629671682475eb;hp=48d4803802bb7a8cd6e0de4f6447a85161de7ad6;hpb=176648481e5f5edd4cb2770ff7cd25dc8dd426c5;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/Smbios.h b/MdePkg/Include/Protocol/Smbios.h index 48d4803802..f52c4dfc5b 100644 --- a/MdePkg/Include/Protocol/Smbios.h +++ b/MdePkg/Include/Protocol/Smbios.h @@ -13,8 +13,8 @@ requiring an update to MajorVersion and MinorVersion. The SMBIOS protocol can only be called a TPL < TPL_NOTIFY. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -27,93 +27,63 @@ #ifndef __SMBIOS_PROTOCOL_H__ #define __SMBIOS_PROTOCOL_H__ +#include + #define EFI_SMBIOS_PROTOCOL_GUID \ { 0x3583ff6, 0xcb36, 0x4940, { 0x94, 0x7e, 0xb9, 0xb3, 0x9f, 0x4a, 0xfa, 0xf7 }} - -// -// SMBIOS type macros which is according to SMBIOS specification. -// -#define EFI_SMBIOS_TYPE_BIOS_INFORMATION 0 -#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION 1 -#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION 2 -#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE 3 -#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION 4 -#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION 5 -#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON 6 -#define EFI_SMBIOS_TYPE_CACHE_INFORMATION 7 -#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION 8 -#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS 9 -#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION 10 -#define EFI_SMBIOS_TYPE_OEM_STRINGS 11 -#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS 12 -#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION 13 -#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS 14 -#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG 15 -#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY 16 -#define EFI_SMBIOS_TYPE_MEMORY_DEVICE 17 -#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION 18 -#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS 19 -#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS 20 -#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE 21 -#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY 22 -#define EFI_SMBIOS_TYPE_SYSTEM_RESET 23 -#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY 24 -#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS 25 -#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE 26 -#define EFI_SMBIOS_TYPE_COOLING_DEVICE 27 -#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE 28 -#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE 29 -#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS 30 -#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE 31 -#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION 32 -#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION 33 -#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE 34 -#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT 35 -#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA 36 -#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL 37 -#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION 38 -#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY 39 -#define EFI_SMBIOS_TYPE_INACTIVE 126 -#define EFI_SMBIOS_TYPE_END_OF_TABLE 127 -#define EFI_SMBIOS_OEM_BEGIN 128 -#define EFI_SMBIOS_OEM_END 255 -/// -/// Text strings associated with a given SMBIOS structure are returned in the dmiStrucBuffer, appended directly after -/// the formatted portion of the structure. This method of returning string information eliminates the need for -/// application software to deal with pointers embedded in the SMBIOS structure. Each string is terminated with a null -/// (00h) BYTE and the set of strings is terminated with an additional null (00h) BYTE. When the formatted portion of -/// a SMBIOS structure references a string, it does so by specifying a non-zero string number within the structure's -/// string-set. For example, if a string field contains 02h, it references the second string following the formatted portion -/// of the SMBIOS structure. If a string field references no string, a null (0) is placed in that string field. If the -/// formatted portion of the structure contains string-reference fields and all the string fields are set to 0 (no string -/// references), the formatted section of the structure is followed by two null (00h) BYTES. -/// -typedef UINT8 EFI_SMBIOS_STRING; +#define EFI_SMBIOS_TYPE_BIOS_INFORMATION SMBIOS_TYPE_BIOS_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION SMBIOS_TYPE_SYSTEM_INFORMATION +#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION SMBIOS_TYPE_BASEBOARD_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE SMBIOS_TYPE_SYSTEM_ENCLOSURE +#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION SMBIOS_TYPE_PROCESSOR_INFORMATION +#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION +#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON SMBIOS_TYPE_MEMORY_MODULE_INFORMATON +#define EFI_SMBIOS_TYPE_CACHE_INFORMATION SMBIOS_TYPE_CACHE_INFORMATION +#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS SMBIOS_TYPE_SYSTEM_SLOTS +#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION +#define EFI_SMBIOS_TYPE_OEM_STRINGS SMBIOS_TYPE_OEM_STRINGS +#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS +#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION +#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS SMBIOS_TYPE_GROUP_ASSOCIATIONS +#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG SMBIOS_TYPE_SYSTEM_EVENT_LOG +#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY +#define EFI_SMBIOS_TYPE_MEMORY_DEVICE SMBIOS_TYPE_MEMORY_DEVICE +#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION +#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS +#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS +#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE +#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY SMBIOS_TYPE_PORTABLE_BATTERY +#define EFI_SMBIOS_TYPE_SYSTEM_RESET SMBIOS_TYPE_SYSTEM_RESET +#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY SMBIOS_TYPE_HARDWARE_SECURITY +#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS SMBIOS_TYPE_SYSTEM_POWER_CONTROLS +#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE SMBIOS_TYPE_VOLTAGE_PROBE +#define EFI_SMBIOS_TYPE_COOLING_DEVICE SMBIOS_TYPE_COOLING_DEVICE +#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE SMBIOS_TYPE_TEMPERATURE_PROBE +#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE +#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS +#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE +#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION +#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION +#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE SMBIOS_TYPE_MANAGEMENT_DEVICE +#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT +#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA +#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL SMBIOS_TYPE_MEMORY_CHANNEL +#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION SMBIOS_TYPE_IPMI_DEVICE_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY SMBIOS_TYPE_SYSTEM_POWER_SUPPLY +#define EFI_SMBIOS_TYPE_ADDITIONAL_INFORMATION SMBIOS_TYPE_ADDITIONAL_INFORMATION +#define EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION +#define EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE +#define EFI_SMBIOS_TYPE_INACTIVE SMBIOS_TYPE_INACTIVE +#define EFI_SMBIOS_TYPE_END_OF_TABLE SMBIOS_TYPE_END_OF_TABLE +#define EFI_SMBIOS_OEM_BEGIN SMBIOS_OEM_BEGIN +#define EFI_SMBIOS_OEM_END SMBIOS_OEM_END -/// -/// Types 0 through 127 (7Fh) are reserved for and defined by this -/// specification. Types 128 through 256 (80h to FFh) are available for system- and OEM-specific information. -/// -typedef UINT8 EFI_SMBIOS_TYPE; - -/// -/// Specifies the structure's handle, a unique 16-bit number in the range 0 to 0FFFEh (for version -/// 2.0) or 0 to 0FEFFh (for version 2.1 and later). The handle can be used with the Get SMBIOS -/// Structure function to retrieve a specific structure; the handle numbers are not required to be -/// contiguous. For v2.1 and later, handle values in the range 0FF00h to 0FFFFh are reserved for -/// use by this specification. -/// If the system configuration changes, a previously assigned handle might no longer exist. -/// However once a handle has been assigned by the BIOS, the BIOS cannot re-assign that handle -/// number to another structure. -/// -typedef UINT16 EFI_SMBIOS_HANDLE; - -typedef struct { - EFI_SMBIOS_TYPE Type; - UINT8 Length; - EFI_SMBIOS_HANDLE Handle; -} EFI_SMBIOS_TABLE_HEADER; +typedef SMBIOS_TABLE_STRING EFI_SMBIOS_STRING; +typedef SMBIOS_TYPE EFI_SMBIOS_TYPE; +typedef SMBIOS_HANDLE EFI_SMBIOS_HANDLE; +typedef SMBIOS_STRUCTURE EFI_SMBIOS_TABLE_HEADER; typedef struct _EFI_SMBIOS_PROTOCOL EFI_SMBIOS_PROTOCOL; @@ -133,8 +103,8 @@ typedef struct _EFI_SMBIOS_PROTOCOL EFI_SMBIOS_PROTOCOL; @param[in] This The EFI_SMBIOS_PROTOCOL instance. @param[in] ProducerHandle The handle of the controller or driver associated with the SMBIOS information. NULL means no handle. - @param[in, out] SmbiosHandle On entry, if non-zero, the handle of the SMBIOS record. If zero, then a unique handle - will be assigned to the SMBIOS record. If the SMBIOS handle is already in use + @param[in, out] SmbiosHandle On entry, the handle of the SMBIOS record to add. If FFFEh, then a unique handle + will be assigned to the SMBIOS record. If the SMBIOS handle is already in use, EFI_ALREADY_STARTED is returned and the SMBIOS record is not updated. @param[in] Record The data for the fixed portion of the SMBIOS record. The format of the record is determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted @@ -167,7 +137,7 @@ EFI_STATUS @retval EFI_SUCCESS SmbiosHandle had its StringNumber String updated. @retval EFI_INVALID_PARAMETER SmbiosHandle does not exist. - @retval EFI_UNSUPPORTED String was not added since it's longer than 64 significant characters. + @retval EFI_UNSUPPORTED String was not added because it is longer than the SMBIOS Table supports. @retval EFI_NOT_FOUND The StringNumber.is not valid for this SMBIOS record. **/ typedef @@ -205,8 +175,8 @@ EFI_STATUS @param[in] This The EFI_SMBIOS_PROTOCOL instance. @param[in, out] SmbiosHandle On entry, points to the previous handle of the SMBIOS record. On exit, points to the - next SMBIOS record handle. If it is zero on entry, then the first SMBIOS record - handle will be returned. If it returns zero on exit, then there are no more SMBIOS records. + next SMBIOS record handle. If it is FFFEh on entry, then the first SMBIOS record + handle will be returned. If it returns FFFEh on exit, then there are no more SMBIOS records. @param[in] Type On entry, it points to the type of the next SMBIOS record to return. If NULL, it indicates that the next record of any type will be returned. Type is not modified by the this function.