]>
Commit | Line | Data |
---|---|---|
5d73d92f | 1 | /** @file\r |
2 | API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.\r | |
3 | \r | |
187cb3dd | 4 | Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r |
5d73d92f | 5 | This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
a1d4bfcc | 15 | #ifndef _LIB_SMBIOS_VIEW_H_\r |
16 | #define _LIB_SMBIOS_VIEW_H_\r | |
5d73d92f | 17 | \r |
187cb3dd | 18 | #include <IndustryStandard/SmBios.h>\r |
5d73d92f | 19 | \r |
20 | #define DMI_SUCCESS 0x00\r | |
21 | #define DMI_UNKNOWN_FUNCTION 0x81\r | |
22 | #define DMI_FUNCTION_NOT_SUPPORTED 0x82\r | |
23 | #define DMI_INVALID_HANDLE 0x83\r | |
24 | #define DMI_BAD_PARAMETER 0x84\r | |
25 | #define DMI_INVALID_SUBFUNCTION 0x85\r | |
26 | #define DMI_NO_CHANGE 0x86\r | |
27 | #define DMI_ADD_STRUCTURE_FAILED 0x87\r | |
28 | #define DMI_READ_ONLY 0x8D\r | |
29 | #define DMI_LOCK_NOT_SUPPORTED 0x90\r | |
30 | #define DMI_CURRENTLY_LOCKED 0x91\r | |
31 | #define DMI_INVALID_LOCK 0x92\r | |
32 | \r | |
187cb3dd | 33 | #define INVALID_HANDLE (UINT16) (-1)\r |
5d73d92f | 34 | \r |
35 | #define EFI_SMBIOSERR(val) EFIERR (0x30000 | val)\r | |
36 | \r | |
37 | #define EFI_SMBIOSERR_FAILURE EFI_SMBIOSERR (1)\r | |
38 | #define EFI_SMBIOSERR_STRUCT_NOT_FOUND EFI_SMBIOSERR (2)\r | |
39 | #define EFI_SMBIOSERR_TYPE_UNKNOWN EFI_SMBIOSERR (3)\r | |
40 | #define EFI_SMBIOSERR_UNSUPPORTED EFI_SMBIOSERR (4)\r | |
41 | \r | |
a1d4bfcc | 42 | /**\r |
43 | Init the SMBIOS VIEW API's environment.\r | |
44 | \r | |
45 | @retval EFI_SUCCESS Successful to init the SMBIOS VIEW Lib.\r | |
46 | **/\r | |
5d73d92f | 47 | EFI_STATUS\r |
48 | LibSmbiosInit (\r | |
49 | VOID\r | |
50 | );\r | |
51 | \r | |
a1d4bfcc | 52 | /**\r |
53 | Cleanup the Smbios information.\r | |
54 | **/\r | |
5d73d92f | 55 | VOID\r |
56 | LibSmbiosCleanup (\r | |
57 | VOID\r | |
58 | );\r | |
59 | \r | |
a1d4bfcc | 60 | /**\r |
61 | Get the entry point structure for the table.\r | |
5d73d92f | 62 | \r |
a1d4bfcc | 63 | @param[out] EntryPointStructure The pointer to populate.\r |
64 | **/\r | |
5d73d92f | 65 | VOID\r |
a1d4bfcc | 66 | LibSmbiosGetEPS (\r |
187cb3dd | 67 | OUT SMBIOS_TABLE_ENTRY_POINT **EntryPointStructure\r |
5d73d92f | 68 | );\r |
69 | \r | |
a1d4bfcc | 70 | /**\r |
187cb3dd SZ |
71 | Return SMBIOS string for the given string number.\r |
72 | \r | |
73 | @param[in] Smbios Pointer to SMBIOS structure.\r | |
74 | @param[in] StringNumber String number to return. -1 is used to skip all strings and\r | |
75 | point to the next SMBIOS structure.\r | |
76 | \r | |
77 | @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1\r | |
78 | **/\r | |
79 | CHAR8*\r | |
80 | LibGetSmbiosString (\r | |
81 | IN SMBIOS_STRUCTURE_POINTER *Smbios,\r | |
82 | IN UINT16 StringNumber\r | |
83 | );\r | |
84 | \r | |
85 | /**\r | |
86 | Get SMBIOS structure for the given Handle,\r | |
a1d4bfcc | 87 | Handle is changed to the next handle or 0xFFFF when the end is\r |
88 | reached or the handle is not found.\r | |
5d73d92f | 89 | \r |
4ff7e37b ED |
90 | @param[in, out] Handle 0xFFFF: get the first structure\r |
91 | Others: get a structure according to this value.\r | |
187cb3dd SZ |
92 | @param[out] Buffer The pointer to the pointer to the structure.\r |
93 | @param[out] Length Length of the structure.\r | |
5d73d92f | 94 | \r |
187cb3dd | 95 | @retval DMI_SUCCESS Handle is updated with next structure handle or\r |
a1d4bfcc | 96 | 0xFFFF(end-of-list).\r |
5d73d92f | 97 | \r |
187cb3dd | 98 | @retval DMI_INVALID_HANDLE Handle is updated with first structure handle or\r |
a1d4bfcc | 99 | 0xFFFF(end-of-list).\r |
5d73d92f | 100 | **/\r |
101 | EFI_STATUS\r | |
102 | LibGetSmbiosStructure (\r | |
103 | IN OUT UINT16 *Handle,\r | |
187cb3dd | 104 | OUT UINT8 **Buffer,\r |
5d73d92f | 105 | OUT UINT16 *Length\r |
106 | );\r | |
107 | \r | |
5d73d92f | 108 | #endif\r |