//\r
#define SMBIOS_3_0_TABLE_MAX_LENGTH 0xFFFFFFFF\r
\r
+//\r
+// SMBIOS type macros which is according to SMBIOS 2.7 specification.\r
+//\r
+#define SMBIOS_TYPE_BIOS_INFORMATION 0\r
+#define SMBIOS_TYPE_SYSTEM_INFORMATION 1\r
+#define SMBIOS_TYPE_BASEBOARD_INFORMATION 2\r
+#define SMBIOS_TYPE_SYSTEM_ENCLOSURE 3\r
+#define SMBIOS_TYPE_PROCESSOR_INFORMATION 4\r
+#define SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION 5\r
+#define SMBIOS_TYPE_MEMORY_MODULE_INFORMATON 6\r
+#define SMBIOS_TYPE_CACHE_INFORMATION 7\r
+#define SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION 8\r
+#define SMBIOS_TYPE_SYSTEM_SLOTS 9\r
+#define SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION 10\r
+#define SMBIOS_TYPE_OEM_STRINGS 11\r
+#define SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS 12\r
+#define SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION 13\r
+#define SMBIOS_TYPE_GROUP_ASSOCIATIONS 14\r
+#define SMBIOS_TYPE_SYSTEM_EVENT_LOG 15\r
+#define SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY 16\r
+#define SMBIOS_TYPE_MEMORY_DEVICE 17\r
+#define SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION 18\r
+#define SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS 19\r
+#define SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS 20\r
+#define SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE 21\r
+#define SMBIOS_TYPE_PORTABLE_BATTERY 22\r
+#define SMBIOS_TYPE_SYSTEM_RESET 23\r
+#define SMBIOS_TYPE_HARDWARE_SECURITY 24\r
+#define SMBIOS_TYPE_SYSTEM_POWER_CONTROLS 25\r
+#define SMBIOS_TYPE_VOLTAGE_PROBE 26\r
+#define SMBIOS_TYPE_COOLING_DEVICE 27\r
+#define SMBIOS_TYPE_TEMPERATURE_PROBE 28\r
+#define SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE 29\r
+#define SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS 30\r
+#define SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE 31\r
+#define SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION 32\r
+#define SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION 33\r
+#define SMBIOS_TYPE_MANAGEMENT_DEVICE 34\r
+#define SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT 35\r
+#define SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA 36\r
+#define SMBIOS_TYPE_MEMORY_CHANNEL 37\r
+#define SMBIOS_TYPE_IPMI_DEVICE_INFORMATION 38\r
+#define SMBIOS_TYPE_SYSTEM_POWER_SUPPLY 39\r
+#define SMBIOS_TYPE_ADDITIONAL_INFORMATION 40\r
+#define SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION 41\r
+#define SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE 42\r
+\r
///\r
/// Inactive type is added from SMBIOS 2.2. Reference SMBIOS 2.6, chapter 3.3.43.\r
/// Upper-level software that interprets the SMBIOS structure-table should bypass an \r
///\r
#define SMBIOS_TYPE_END_OF_TABLE 0x007F\r
\r
+#define SMBIOS_OEM_BEGIN 128\r
+#define SMBIOS_OEM_END 255\r
+\r
+///\r
+/// Types 0 through 127 (7Fh) are reserved for and defined by this\r
+/// specification. Types 128 through 256 (80h to FFh) are available for system- and OEM-specific information. \r
+///\r
+typedef UINT8 SMBIOS_TYPE;\r
+\r
+///\r
+/// Specifies the structure's handle, a unique 16-bit number in the range 0 to 0FFFEh (for version\r
+/// 2.0) or 0 to 0FEFFh (for version 2.1 and later). The handle can be used with the Get SMBIOS\r
+/// Structure function to retrieve a specific structure; the handle numbers are not required to be\r
+/// contiguous. For v2.1 and later, handle values in the range 0FF00h to 0FFFFh are reserved for\r
+/// use by this specification.\r
+/// If the system configuration changes, a previously assigned handle might no longer exist.\r
+/// However once a handle has been assigned by the BIOS, the BIOS cannot re-assign that handle\r
+/// number to another structure.\r
+///\r
+typedef UINT16 SMBIOS_HANDLE;\r
+\r
///\r
/// Smbios Table Entry Point Structure.\r
///\r
/// The Smbios structure header.\r
///\r
typedef struct {\r
- UINT8 Type;\r
- UINT8 Length;\r
- UINT16 Handle;\r
+ SMBIOS_TYPE Type;\r
+ UINT8 Length;\r
+ SMBIOS_HANDLE Handle;\r
} SMBIOS_STRUCTURE;\r
\r
///\r
-/// String Number for a Null terminated string, 00h stands for no string available.\r
+/// Text strings associated with a given SMBIOS structure are returned in the dmiStrucBuffer, appended directly after\r
+/// the formatted portion of the structure. This method of returning string information eliminates the need for\r
+/// application software to deal with pointers embedded in the SMBIOS structure. Each string is terminated with a null\r
+/// (00h) BYTE and the set of strings is terminated with an additional null (00h) BYTE. When the formatted portion of\r
+/// a SMBIOS structure references a string, it does so by specifying a non-zero string number within the structure's\r
+/// string-set. For example, if a string field contains 02h, it references the second string following the formatted portion\r
+/// of the SMBIOS structure. If a string field references no string, a null (0) is placed in that string field. If the\r
+/// formatted portion of the structure contains string-reference fields and all the string fields are set to 0 (no string\r
+/// references), the formatted section of the structure is followed by two null (00h) BYTES.\r
///\r
typedef UINT8 SMBIOS_TABLE_STRING;\r
\r
#ifndef __SMBIOS_PROTOCOL_H__\r
#define __SMBIOS_PROTOCOL_H__\r
\r
+#include <IndustryStandard/SmBios.h>\r
+\r
#define EFI_SMBIOS_PROTOCOL_GUID \\r
{ 0x3583ff6, 0xcb36, 0x4940, { 0x94, 0x7e, 0xb9, 0xb3, 0x9f, 0x4a, 0xfa, 0xf7 }}\r
- \r
-//\r
-// SMBIOS type macros which is according to SMBIOS 2.7 specification.\r
-//\r
-#define EFI_SMBIOS_TYPE_BIOS_INFORMATION 0\r
-#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION 1\r
-#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION 2\r
-#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE 3\r
-#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION 4\r
-#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION 5\r
-#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON 6\r
-#define EFI_SMBIOS_TYPE_CACHE_INFORMATION 7\r
-#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION 8\r
-#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS 9\r
-#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION 10\r
-#define EFI_SMBIOS_TYPE_OEM_STRINGS 11\r
-#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS 12\r
-#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION 13\r
-#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS 14\r
-#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG 15\r
-#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY 16\r
-#define EFI_SMBIOS_TYPE_MEMORY_DEVICE 17\r
-#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION 18\r
-#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS 19\r
-#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS 20\r
-#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE 21\r
-#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY 22\r
-#define EFI_SMBIOS_TYPE_SYSTEM_RESET 23\r
-#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY 24\r
-#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS 25\r
-#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE 26\r
-#define EFI_SMBIOS_TYPE_COOLING_DEVICE 27\r
-#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE 28\r
-#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE 29\r
-#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS 30\r
-#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE 31\r
-#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION 32\r
-#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION 33\r
-#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE 34\r
-#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT 35\r
-#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA 36\r
-#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL 37\r
-#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION 38\r
-#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY 39\r
-#define EFI_SMBIOS_TYPE_ADDITIONAL_INFORMATION 40\r
-#define EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION 41\r
-#define EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE 42\r
-#define EFI_SMBIOS_TYPE_INACTIVE 126\r
-#define EFI_SMBIOS_TYPE_END_OF_TABLE 127\r
-#define EFI_SMBIOS_OEM_BEGIN 128\r
-#define EFI_SMBIOS_OEM_END 255\r
\r
-///\r
-/// Text strings associated with a given SMBIOS structure are returned in the dmiStrucBuffer, appended directly after\r
-/// the formatted portion of the structure. This method of returning string information eliminates the need for\r
-/// application software to deal with pointers embedded in the SMBIOS structure. Each string is terminated with a null\r
-/// (00h) BYTE and the set of strings is terminated with an additional null (00h) BYTE. When the formatted portion of\r
-/// a SMBIOS structure references a string, it does so by specifying a non-zero string number within the structure's\r
-/// string-set. For example, if a string field contains 02h, it references the second string following the formatted portion\r
-/// of the SMBIOS structure. If a string field references no string, a null (0) is placed in that string field. If the\r
-/// formatted portion of the structure contains string-reference fields and all the string fields are set to 0 (no string\r
-/// references), the formatted section of the structure is followed by two null (00h) BYTES.\r
-///\r
-typedef UINT8 EFI_SMBIOS_STRING; \r
+#define EFI_SMBIOS_TYPE_BIOS_INFORMATION SMBIOS_TYPE_BIOS_INFORMATION\r
+#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION SMBIOS_TYPE_SYSTEM_INFORMATION\r
+#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION SMBIOS_TYPE_BASEBOARD_INFORMATION\r
+#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE SMBIOS_TYPE_SYSTEM_ENCLOSURE\r
+#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION SMBIOS_TYPE_PROCESSOR_INFORMATION\r
+#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION\r
+#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON SMBIOS_TYPE_MEMORY_MODULE_INFORMATON\r
+#define EFI_SMBIOS_TYPE_CACHE_INFORMATION SMBIOS_TYPE_CACHE_INFORMATION\r
+#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION\r
+#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS SMBIOS_TYPE_SYSTEM_SLOTS\r
+#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION\r
+#define EFI_SMBIOS_TYPE_OEM_STRINGS SMBIOS_TYPE_OEM_STRINGS\r
+#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS\r
+#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION\r
+#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS SMBIOS_TYPE_GROUP_ASSOCIATIONS\r
+#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG SMBIOS_TYPE_SYSTEM_EVENT_LOG\r
+#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY\r
+#define EFI_SMBIOS_TYPE_MEMORY_DEVICE SMBIOS_TYPE_MEMORY_DEVICE\r
+#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION\r
+#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS\r
+#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS\r
+#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE\r
+#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY SMBIOS_TYPE_PORTABLE_BATTERY\r
+#define EFI_SMBIOS_TYPE_SYSTEM_RESET SMBIOS_TYPE_SYSTEM_RESET\r
+#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY SMBIOS_TYPE_HARDWARE_SECURITY\r
+#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS SMBIOS_TYPE_SYSTEM_POWER_CONTROLS\r
+#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE SMBIOS_TYPE_VOLTAGE_PROBE\r
+#define EFI_SMBIOS_TYPE_COOLING_DEVICE SMBIOS_TYPE_COOLING_DEVICE\r
+#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE SMBIOS_TYPE_TEMPERATURE_PROBE\r
+#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE\r
+#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS\r
+#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE\r
+#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION\r
+#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION\r
+#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE SMBIOS_TYPE_MANAGEMENT_DEVICE\r
+#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT\r
+#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA\r
+#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL SMBIOS_TYPE_MEMORY_CHANNEL\r
+#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION SMBIOS_TYPE_IPMI_DEVICE_INFORMATION\r
+#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY SMBIOS_TYPE_SYSTEM_POWER_SUPPLY\r
+#define EFI_SMBIOS_TYPE_ADDITIONAL_INFORMATION SMBIOS_TYPE_ADDITIONAL_INFORMATION\r
+#define EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION\r
+#define EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE\r
+#define EFI_SMBIOS_TYPE_INACTIVE SMBIOS_TYPE_INACTIVE\r
+#define EFI_SMBIOS_TYPE_END_OF_TABLE SMBIOS_TYPE_END_OF_TABLE\r
+#define EFI_SMBIOS_OEM_BEGIN SMBIOS_OEM_BEGIN\r
+#define EFI_SMBIOS_OEM_END SMBIOS_OEM_END\r
\r
-///\r
-/// Types 0 through 127 (7Fh) are reserved for and defined by this\r
-/// specification. Types 128 through 256 (80h to FFh) are available for system- and OEM-specific information. \r
-///\r
-typedef UINT8 EFI_SMBIOS_TYPE;\r
-\r
-///\r
-/// Specifies the structure's handle, a unique 16-bit number in the range 0 to 0FFFEh (for version\r
-/// 2.0) or 0 to 0FEFFh (for version 2.1 and later). The handle can be used with the Get SMBIOS\r
-/// Structure function to retrieve a specific structure; the handle numbers are not required to be\r
-/// contiguous. For v2.1 and later, handle values in the range 0FF00h to 0FFFFh are reserved for\r
-/// use by this specification.\r
-/// If the system configuration changes, a previously assigned handle might no longer exist.\r
-/// However once a handle has been assigned by the BIOS, the BIOS cannot re-assign that handle\r
-/// number to another structure.\r
-///\r
-typedef UINT16 EFI_SMBIOS_HANDLE;\r
- \r
-typedef struct {\r
- EFI_SMBIOS_TYPE Type;\r
- UINT8 Length;\r
- EFI_SMBIOS_HANDLE Handle;\r
-} EFI_SMBIOS_TABLE_HEADER;\r
+typedef SMBIOS_TABLE_STRING EFI_SMBIOS_STRING;\r
+typedef SMBIOS_TYPE EFI_SMBIOS_TYPE;\r
+typedef SMBIOS_HANDLE EFI_SMBIOS_HANDLE;\r
+typedef SMBIOS_STRUCTURE EFI_SMBIOS_TABLE_HEADER;\r
\r
typedef struct _EFI_SMBIOS_PROTOCOL EFI_SMBIOS_PROTOCOL;\r
\r