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