2 API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.
4 Copyright (c) 2005 - 2015, 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_VIEW_H_
16 #define _LIB_SMBIOS_VIEW_H_
18 #include <IndustryStandard/SmBios.h>
20 #define DMI_SUCCESS 0x00
21 #define DMI_UNKNOWN_FUNCTION 0x81
22 #define DMI_FUNCTION_NOT_SUPPORTED 0x82
23 #define DMI_INVALID_HANDLE 0x83
24 #define DMI_BAD_PARAMETER 0x84
25 #define DMI_INVALID_SUBFUNCTION 0x85
26 #define DMI_NO_CHANGE 0x86
27 #define DMI_ADD_STRUCTURE_FAILED 0x87
28 #define DMI_READ_ONLY 0x8D
29 #define DMI_LOCK_NOT_SUPPORTED 0x90
30 #define DMI_CURRENTLY_LOCKED 0x91
31 #define DMI_INVALID_LOCK 0x92
33 #define INVALID_HANDLE (UINT16) (-1)
35 #define EFI_SMBIOSERR(val) EFIERR (0x30000 | val)
37 #define EFI_SMBIOSERR_FAILURE EFI_SMBIOSERR (1)
38 #define EFI_SMBIOSERR_STRUCT_NOT_FOUND EFI_SMBIOSERR (2)
39 #define EFI_SMBIOSERR_TYPE_UNKNOWN EFI_SMBIOSERR (3)
40 #define EFI_SMBIOSERR_UNSUPPORTED EFI_SMBIOSERR (4)
43 Init the SMBIOS VIEW API's environment for the 32-bit table..
45 @retval EFI_SUCCESS Successful to init the SMBIOS VIEW Lib.
53 Init the SMBIOS VIEW API's environment for the 64-bit table..
55 @retval EFI_SUCCESS Successful to init the SMBIOS VIEW Lib.
63 Cleanup the Smbios information.
71 Cleanup the Smbios information.
74 LibSmbios64BitCleanup (
79 Get the entry point structure for the table.
81 @param[out] EntryPointStructure The pointer to populate.
85 OUT SMBIOS_TABLE_ENTRY_POINT
**EntryPointStructure
89 Get the entry point structure for the 64-bit table.
91 @param[out] EntryPointStructure The pointer to populate.
94 LibSmbios64BitGetEPS (
95 OUT SMBIOS_TABLE_3_0_ENTRY_POINT
**EntryPointStructure
99 Return SMBIOS string for the given string number.
101 @param[in] Smbios Pointer to SMBIOS structure.
102 @param[in] StringNumber String number to return. -1 is used to skip all strings and
103 point to the next SMBIOS structure.
105 @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1
109 IN SMBIOS_STRUCTURE_POINTER
*Smbios
,
110 IN UINT16 StringNumber
114 Get SMBIOS structure for the given Handle,
115 Handle is changed to the next handle or 0xFFFF when the end is
116 reached or the handle is not found.
118 @param[in, out] Handle 0xFFFF: get the first structure
119 Others: get a structure according to this value.
120 @param[out] Buffer The pointer to the pointer to the structure.
121 @param[out] Length Length of the structure.
123 @retval DMI_SUCCESS Handle is updated with next structure handle or
126 @retval DMI_INVALID_HANDLE Handle is updated with first structure handle or
130 LibGetSmbiosStructure (
131 IN OUT UINT16
*Handle
,
137 Get SMBIOS structure for the given Handle in 64-bit table,
138 Handle is changed to the next handle or 0xFFFF when the end is
139 reached or the handle is not found.
141 @param[in, out] Handle 0xFFFF: get the first structure
142 Others: get a structure according to this value.
143 @param[out] Buffer The pointer to the pointer to the structure.
144 @param[out] Length Length of the structure.
146 @retval DMI_SUCCESS Handle is updated with next structure handle or
149 @retval DMI_INVALID_HANDLE Handle is updated with first structure handle or
153 LibGetSmbios64BitStructure (
154 IN OUT UINT16
*Handle
,