VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/Smbios.h

Last change on this file was 108794, checked in by vboxsync, 3 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 12.8 KB
Line 
1/** @file
2 SMBIOS Protocol as defined in PI1.2 Specification VOLUME 5 Standard.
3
4 SMBIOS protocol allows consumers to log SMBIOS data records, and enables the producer
5 to create the SMBIOS tables for a platform.
6
7 This protocol provides an interface to add, remove or discover SMBIOS records. The driver which
8 produces this protocol is responsible for creating the SMBIOS data tables and installing the pointer
9 to the tables in the EFI System Configuration Table.
10 The caller is responsible for only adding SMBIOS records that are valid for the SMBIOS
11 MajorVersion and MinorVersion. When an enumerated SMBIOS field's values are
12 controlled by the DMTF, new values can be used as soon as they are defined by the DMTF without
13 requiring an update to MajorVersion and MinorVersion.
14 The SMBIOS protocol can only be called a TPL < TPL_NOTIFY.
15
16 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
17 SPDX-License-Identifier: BSD-2-Clause-Patent
18
19**/
20
21#ifndef __SMBIOS_PROTOCOL_H__
22#define __SMBIOS_PROTOCOL_H__
23
24#include <IndustryStandard/SmBios.h>
25
26#define EFI_SMBIOS_PROTOCOL_GUID \
27 { 0x3583ff6, 0xcb36, 0x4940, { 0x94, 0x7e, 0xb9, 0xb3, 0x9f, 0x4a, 0xfa, 0xf7 }}
28
29#define EFI_SMBIOS_TYPE_BIOS_INFORMATION SMBIOS_TYPE_BIOS_INFORMATION
30#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION SMBIOS_TYPE_SYSTEM_INFORMATION
31#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION SMBIOS_TYPE_BASEBOARD_INFORMATION
32#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE SMBIOS_TYPE_SYSTEM_ENCLOSURE
33#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION SMBIOS_TYPE_PROCESSOR_INFORMATION
34#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION
35#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON SMBIOS_TYPE_MEMORY_MODULE_INFORMATON
36#define EFI_SMBIOS_TYPE_CACHE_INFORMATION SMBIOS_TYPE_CACHE_INFORMATION
37#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION
38#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS SMBIOS_TYPE_SYSTEM_SLOTS
39#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION
40#define EFI_SMBIOS_TYPE_OEM_STRINGS SMBIOS_TYPE_OEM_STRINGS
41#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS
42#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION
43#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS SMBIOS_TYPE_GROUP_ASSOCIATIONS
44#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG SMBIOS_TYPE_SYSTEM_EVENT_LOG
45#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY
46#define EFI_SMBIOS_TYPE_MEMORY_DEVICE SMBIOS_TYPE_MEMORY_DEVICE
47#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION
48#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS
49#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS
50#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE
51#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY SMBIOS_TYPE_PORTABLE_BATTERY
52#define EFI_SMBIOS_TYPE_SYSTEM_RESET SMBIOS_TYPE_SYSTEM_RESET
53#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY SMBIOS_TYPE_HARDWARE_SECURITY
54#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS SMBIOS_TYPE_SYSTEM_POWER_CONTROLS
55#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE SMBIOS_TYPE_VOLTAGE_PROBE
56#define EFI_SMBIOS_TYPE_COOLING_DEVICE SMBIOS_TYPE_COOLING_DEVICE
57#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE SMBIOS_TYPE_TEMPERATURE_PROBE
58#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE
59#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS
60#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE
61#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION
62#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION
63#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE SMBIOS_TYPE_MANAGEMENT_DEVICE
64#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT
65#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA
66#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL SMBIOS_TYPE_MEMORY_CHANNEL
67#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION SMBIOS_TYPE_IPMI_DEVICE_INFORMATION
68#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY SMBIOS_TYPE_SYSTEM_POWER_SUPPLY
69#define EFI_SMBIOS_TYPE_ADDITIONAL_INFORMATION SMBIOS_TYPE_ADDITIONAL_INFORMATION
70#define EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION
71#define EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE
72#define EFI_SMBIOS_TYPE_TPM_DEVICE SMBIOS_TYPE_TPM_DEVICE
73#define EFI_SMBIOS_TYPE_PROCESSOR_ADDITIONAL_INFORMATION SMBIOS_TYPE_PROCESSOR_ADDITIONAL_INFORMATION
74#define EFI_SMBIOS_TYPE_FIRMWARE_INVENTORY_INFORMATION SMBIOS_TYPE_FIRMWARE_INVENTORY_INFORMATION
75#define EFI_SMBIOS_TYPE_STRING_PROPERTY_INFORMATION SMBIOS_TYPE_STRING_PROPERTY_INFORMATION
76#define EFI_SMBIOS_TYPE_INACTIVE SMBIOS_TYPE_INACTIVE
77#define EFI_SMBIOS_TYPE_END_OF_TABLE SMBIOS_TYPE_END_OF_TABLE
78#define EFI_SMBIOS_OEM_BEGIN SMBIOS_OEM_BEGIN
79#define EFI_SMBIOS_OEM_END SMBIOS_OEM_END
80
81typedef SMBIOS_TABLE_STRING EFI_SMBIOS_STRING;
82typedef SMBIOS_TYPE EFI_SMBIOS_TYPE;
83typedef SMBIOS_HANDLE EFI_SMBIOS_HANDLE;
84typedef SMBIOS_STRUCTURE EFI_SMBIOS_TABLE_HEADER;
85
86typedef struct _EFI_SMBIOS_PROTOCOL EFI_SMBIOS_PROTOCOL;
87
88/**
89 Add an SMBIOS record.
90
91 This function allows any agent to add SMBIOS records. The caller is responsible for ensuring
92 Record is formatted in a way that matches the version of the SMBIOS specification as defined in
93 the MajorRevision and MinorRevision fields of the EFI_SMBIOS_PROTOCOL.
94 Record must follow the SMBIOS structure evolution and usage guidelines in the SMBIOS
95 specification. Record starts with the formatted area of the SMBIOS structure and the length is
96 defined by EFI_SMBIOS_TABLE_HEADER.Length. Each SMBIOS structure is terminated by a
97 double-null (0x0000), either directly following the formatted area (if no strings are present) or
98 directly following the last string. The number of optional strings is not defined by the formatted area,
99 but is fixed by the call to Add(). A string can be a place holder, but it must not be a NULL string as
100 two NULL strings look like the double-null that terminates the structure.
101
102 @param[in] This The EFI_SMBIOS_PROTOCOL instance.
103 @param[in] ProducerHandle The handle of the controller or driver associated with the SMBIOS information. NULL means no handle.
104 @param[in, out] SmbiosHandle On entry, the handle of the SMBIOS record to add. If FFFEh, then a unique handle
105 will be assigned to the SMBIOS record. If the SMBIOS handle is already in use,
106 EFI_ALREADY_STARTED is returned and the SMBIOS record is not updated.
107 @param[in] Record The data for the fixed portion of the SMBIOS record. The format of the record is
108 determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted
109 area is defined by EFI_SMBIOS_TABLE_HEADER.Length and either followed
110 by a double-null (0x0000) or a set of null terminated strings and a null.
111
112 @retval EFI_SUCCESS Record was added.
113 @retval EFI_OUT_OF_RESOURCES Record was not added.
114 @retval EFI_ALREADY_STARTED The SmbiosHandle passed in was already in use.
115**/
116typedef
117EFI_STATUS
118(EFIAPI *EFI_SMBIOS_ADD)(
119 IN CONST EFI_SMBIOS_PROTOCOL *This,
120 IN EFI_HANDLE ProducerHandle OPTIONAL,
121 IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle,
122 IN EFI_SMBIOS_TABLE_HEADER *Record
123 );
124
125/**
126 Update the string associated with an existing SMBIOS record.
127
128 This function allows the update of specific SMBIOS strings. The number of valid strings for any
129 SMBIOS record is defined by how many strings were present when Add() was called.
130
131 @param[in] This The EFI_SMBIOS_PROTOCOL instance.
132 @param[in] SmbiosHandle SMBIOS Handle of structure that will have its string updated.
133 @param[in] StringNumber The non-zero string number of the string to update.
134 @param[in] String Update the StringNumber string with String.
135
136 @retval EFI_SUCCESS SmbiosHandle had its StringNumber String updated.
137 @retval EFI_INVALID_PARAMETER SmbiosHandle does not exist.
138 @retval EFI_UNSUPPORTED String was not added because it is longer than the SMBIOS Table supports.
139 @retval EFI_NOT_FOUND The StringNumber.is not valid for this SMBIOS record.
140**/
141typedef
142EFI_STATUS
143(EFIAPI *EFI_SMBIOS_UPDATE_STRING)(
144 IN CONST EFI_SMBIOS_PROTOCOL *This,
145 IN EFI_SMBIOS_HANDLE *SmbiosHandle,
146 IN UINTN *StringNumber,
147 IN CHAR8 *String
148 );
149
150/**
151 Remove an SMBIOS record.
152
153 This function removes an SMBIOS record using the handle specified by SmbiosHandle.
154
155 @param[in] This The EFI_SMBIOS_PROTOCOL instance.
156 @param[in] SmbiosHandle The handle of the SMBIOS record to remove.
157
158 @retval EFI_SUCCESS SMBIOS record was removed.
159 @retval EFI_INVALID_PARAMETER SmbiosHandle does not specify a valid SMBIOS record.
160**/
161typedef
162EFI_STATUS
163(EFIAPI *EFI_SMBIOS_REMOVE)(
164 IN CONST EFI_SMBIOS_PROTOCOL *This,
165 IN EFI_SMBIOS_HANDLE SmbiosHandle
166 );
167
168/**
169 Allow the caller to discover all or some of the SMBIOS records.
170
171 This function allows all of the SMBIOS records to be discovered. It's possible to find
172 only the SMBIOS records that match the optional Type argument.
173
174 @param[in] This The EFI_SMBIOS_PROTOCOL instance.
175 @param[in, out] SmbiosHandle On entry, points to the previous handle of the SMBIOS record. On exit, points to the
176 next SMBIOS record handle. If it is FFFEh on entry, then the first SMBIOS record
177 handle will be returned. If it returns FFFEh on exit, then there are no more SMBIOS records.
178 @param[in] Type On entry, it points to the type of the next SMBIOS record to return. If NULL, it
179 indicates that the next record of any type will be returned. Type is not
180 modified by the this function.
181 @param[out] Record On exit, points to a pointer to the the SMBIOS Record consisting of the formatted area
182 followed by the unformatted area. The unformatted area optionally contains text strings.
183 @param[out] ProducerHandle On exit, points to the ProducerHandle registered by Add(). If no
184 ProducerHandle was passed into Add() NULL is returned. If a NULL pointer is
185 passed in no data will be returned.
186 @retval EFI_SUCCESS SMBIOS record information was successfully returned in Record.
187 SmbiosHandle is the handle of the current SMBIOS record
188 @retval EFI_NOT_FOUND The SMBIOS record with SmbiosHandle was the last available record.
189**/
190typedef
191EFI_STATUS
192(EFIAPI *EFI_SMBIOS_GET_NEXT)(
193 IN CONST EFI_SMBIOS_PROTOCOL *This,
194 IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle,
195 IN EFI_SMBIOS_TYPE *Type OPTIONAL,
196 OUT EFI_SMBIOS_TABLE_HEADER **Record,
197 OUT EFI_HANDLE *ProducerHandle OPTIONAL
198 );
199
200struct _EFI_SMBIOS_PROTOCOL {
201 EFI_SMBIOS_ADD Add;
202 EFI_SMBIOS_UPDATE_STRING UpdateString;
203 EFI_SMBIOS_REMOVE Remove;
204 EFI_SMBIOS_GET_NEXT GetNext;
205 UINT8 MajorVersion; ///< The major revision of the SMBIOS specification supported.
206 UINT8 MinorVersion; ///< The minor revision of the SMBIOS specification supported.
207};
208
209extern EFI_GUID gEfiSmbiosProtocolGuid;
210
211#endif // __SMBIOS_PROTOCOL_H__
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette