]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.h
Update prints of variable attributes from 'RS' to 'RT' for 'Dmpstore' command.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / LibSmbiosView.h
1 /** @file
2 API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.
3
4 Copyright (c) 2005 - 2012, 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
9
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.
12
13 **/
14
15 #ifndef _LIB_SMBIOS_VIEW_H_
16 #define _LIB_SMBIOS_VIEW_H_
17
18 #include <IndustryStandard/SmBios.h>
19
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
32
33 #define INVALID_HANDLE (UINT16) (-1)
34
35 #define EFI_SMBIOSERR(val) EFIERR (0x30000 | val)
36
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)
41
42 /**
43 Init the SMBIOS VIEW API's environment.
44
45 @retval EFI_SUCCESS Successful to init the SMBIOS VIEW Lib.
46 **/
47 EFI_STATUS
48 LibSmbiosInit (
49 VOID
50 );
51
52 /**
53 Cleanup the Smbios information.
54 **/
55 VOID
56 LibSmbiosCleanup (
57 VOID
58 );
59
60 /**
61 Get the entry point structure for the table.
62
63 @param[out] EntryPointStructure The pointer to populate.
64 **/
65 VOID
66 LibSmbiosGetEPS (
67 OUT SMBIOS_TABLE_ENTRY_POINT **EntryPointStructure
68 );
69
70 /**
71 Return SMBIOS string for the given string number.
72
73 @param[in] Smbios Pointer to SMBIOS structure.
74 @param[in] StringNumber String number to return. -1 is used to skip all strings and
75 point to the next SMBIOS structure.
76
77 @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1
78 **/
79 CHAR8*
80 LibGetSmbiosString (
81 IN SMBIOS_STRUCTURE_POINTER *Smbios,
82 IN UINT16 StringNumber
83 );
84
85 /**
86 Get SMBIOS structure for the given Handle,
87 Handle is changed to the next handle or 0xFFFF when the end is
88 reached or the handle is not found.
89
90 @param[in, out] Handle 0xFFFF: get the first structure
91 Others: get a structure according to this value.
92 @param[out] Buffer The pointer to the pointer to the structure.
93 @param[out] Length Length of the structure.
94
95 @retval DMI_SUCCESS Handle is updated with next structure handle or
96 0xFFFF(end-of-list).
97
98 @retval DMI_INVALID_HANDLE Handle is updated with first structure handle or
99 0xFFFF(end-of-list).
100 **/
101 EFI_STATUS
102 LibGetSmbiosStructure (
103 IN OUT UINT16 *Handle,
104 OUT UINT8 **Buffer,
105 OUT UINT16 *Length
106 );
107
108 #endif