]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.h
ShellPkg/for: Fix potential null pointer deference
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / SmbiosView.h
CommitLineData
5d73d92f 1/** @file\r
2 Tools of clarify the content of the smbios table.\r
3\r
ec8a502e 4 Copyright (c) 2005 - 2015, 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 _SMBIOS_VIEW_H_\r
16#define _SMBIOS_VIEW_H_\r
5d73d92f 17\r
18#define STRUCTURE_TYPE_RANDOM (UINT8) 0xFE\r
19#define STRUCTURE_TYPE_INVALID (UINT8) 0xFF\r
20\r
5d73d92f 21typedef struct {\r
22 UINT16 Index;\r
23 UINT8 Type;\r
24 UINT16 Handle;\r
25 UINT16 Addr; // offset from table head\r
26 UINT16 Length; // total structure length\r
27} STRUCTURE_STATISTICS;\r
28\r
29/**\r
30 Query all structures Data from SMBIOS table and Display\r
31 the information to users as required display option.\r
32\r
33 @param[in] QueryType Structure type to view.\r
34 @param[in] QueryHandle Structure handle to view.\r
35 @param[in] Option Display option: none,outline,normal,detail.\r
36 @param[in] RandomView Support for -h parameter.\r
37\r
38 @retval EFI_SUCCESS print is successful.\r
39 @retval EFI_BAD_BUFFER_SIZE structure is out of the range of SMBIOS table.\r
40**/\r
41EFI_STATUS\r
5d73d92f 42SMBiosView (\r
43 IN UINT8 QueryType,\r
44 IN UINT16 QueryHandle,\r
45 IN UINT8 Option,\r
46 IN BOOLEAN RandomView\r
47 );\r
48\r
ec8a502e
EL
49/**\r
50 Query all structures Data from SMBIOS table and Display\r
51 the information to users as required display option.\r
52\r
53 @param[in] QueryType Structure type to view.\r
54 @param[in] QueryHandle Structure handle to view.\r
55 @param[in] Option Display option: none,outline,normal,detail.\r
56 @param[in] RandomView Support for -h parameter.\r
57\r
58 @retval EFI_SUCCESS print is successful.\r
59 @retval EFI_BAD_BUFFER_SIZE structure is out of the range of SMBIOS table.\r
60**/\r
61EFI_STATUS\r
ec8a502e
EL
62SMBios64View (\r
63 IN UINT8 QueryType,\r
64 IN UINT16 QueryHandle,\r
65 IN UINT8 Option,\r
66 IN BOOLEAN RandomView\r
67 );\r
68\r
5d73d92f 69/**\r
70 Function to initialize the global mStatisticsTable object.\r
71\r
72 @retval EFI_SUCCESS print is successful.\r
73**/\r
74EFI_STATUS\r
5d73d92f 75InitSmbiosTableStatistics (\r
76 VOID\r
77 );\r
78\r
ec8a502e
EL
79/**\r
80 Function to initialize the global mSmbios64BitStatisticsTable object.\r
81\r
82 @retval EFI_SUCCESS print is successful.\r
83**/\r
84EFI_STATUS\r
ec8a502e
EL
85InitSmbios64BitTableStatistics (\r
86 VOID\r
87 );\r
88\r
5d73d92f 89/**\r
90 Function to display the global mStatisticsTable object.\r
91\r
92 @param[in] Option ECHO, NORMAL, or DETAIL control the amount of detail displayed.\r
93\r
94 @retval EFI_SUCCESS print is successful.\r
95**/\r
96EFI_STATUS\r
5d73d92f 97DisplayStatisticsTable (\r
98 IN UINT8 Option\r
99 );\r
100\r
ec8a502e
EL
101/**\r
102 Function to display the global mSmbios64BitStatisticsTable object.\r
103\r
104 @param[in] Option ECHO, NORMAL, or DETAIL control the amount of detail displayed.\r
105\r
106 @retval EFI_SUCCESS print is successful.\r
107**/\r
108EFI_STATUS\r
ec8a502e
EL
109DisplaySmbios64BitStatisticsTable (\r
110 IN UINT8 Option\r
111 );\r
112\r
5d73d92f 113/**\r
114 function to return a string of the detail level.\r
115\r
116 @param[in] ShowType The detail level whose name is desired in clear text.\r
117\r
118 @return A pointer to a string representing the ShowType (or 'undefined type' if not known).\r
119**/\r
120CHAR16*\r
5d73d92f 121GetShowTypeString (\r
122 UINT8 ShowType\r
123 );\r
124\r
125extern UINT8 gShowType;\r
126\r
ec8a502e
EL
127extern UINTN mSmbios64BitTableLength;\r
128\r
5d73d92f 129#endif\r