]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePostCodeLib.h
ICC cleanup: #undef previously defined _DEBUG.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Include / Library / EdkIIGluePostCodeLib.h
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 2004 - 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 EdkIIGluePostCodeLib.h\r
16 \r
17Abstract: \r
18\r
19 Public header file for Post Code Lib\r
20\r
21--*/\r
22\r
23#ifndef __EDKII_GLUE_POST_CODE_LIB_H__\r
24#define __EDKII_GLUE_POST_CODE_LIB_H__\r
25\r
26\r
27#define PostCode(_VALUE) GluePostCode(_VALUE)\r
28#define PostCodeWithDescription(_VALUE, _DESC) GluePostCodeWithDescription(_VALUE, _DESC)\r
29#define PostCodeEnabled() GluePostCodeEnabled()\r
30#define PostCodeDescriptionEnabled() GluePostCodeDescriptionEnabled()\r
31\r
32\r
33#define POST_CODE_PROPERTY_POST_CODE_ENABLED 0x00000008\r
34#define POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED 0x00000010\r
35\r
36/**\r
37 Sends an 32-bit value to a POST card.\r
38\r
39 Sends the 32-bit value specified by Value to a POST card, and returns Value. \r
40 Some implementations of this library function may perform I/O operations \r
41 directly to a POST card device. Other implementations may send Value to \r
42 ReportStatusCode(), and the status code reporting mechanism will eventually \r
43 display the 32-bit value on the status reporting device.\r
44 \r
45 PostCode() must actively prevent recursion. If PostCode() is called while \r
46 processing another any other Report Status Code Library function, then \r
47 PostCode() must return Value immediately.\r
48\r
49 @param Value The 32-bit value to write to the POST card.\r
50\r
51 @return Value\r
52\r
53**/\r
54UINT32\r
55EFIAPI\r
56GluePostCode (\r
57 IN UINT32 Value\r
58 );\r
59\r
60\r
61/**\r
62 Sends an 32-bit value to a POST and associated ASCII string.\r
63\r
64 Sends the 32-bit value specified by Value to a POST card, and returns Value.\r
65 If Description is not NULL, then the ASCII string specified by Description is \r
66 also passed to the handler that displays the POST card value. Some \r
67 implementations of this library function may perform I/O operations directly \r
68 to a POST card device. Other implementations may send Value to ReportStatusCode(), \r
69 and the status code reporting mechanism will eventually display the 32-bit \r
70 value on the status reporting device. \r
71\r
72 PostCodeWithDescription()must actively prevent recursion. If \r
73 PostCodeWithDescription() is called while processing another any other Report \r
74 Status Code Library function, then PostCodeWithDescription() must return Value \r
75 immediately.\r
76\r
77 @param Value The 32-bit value to write to the POST card.\r
78 @param Description Pointer to an ASCII string that is a description of the \r
79 POST code value. This is an optional parameter that may \r
80 be NULL.\r
81\r
82 @return Value\r
83\r
84**/\r
85UINT32\r
86EFIAPI\r
87GluePostCodeWithDescription (\r
88 IN UINT32 Value,\r
89 IN CONST CHAR8 *Description OPTIONAL\r
90 );\r
91\r
92\r
93/**\r
94 Returns TRUE if POST Codes are enabled.\r
95\r
96 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED \r
97 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.\r
98\r
99 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
100 PcdPostCodeProperyMask is set.\r
101 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
102 PcdPostCodeProperyMask is clear.\r
103\r
104**/\r
105BOOLEAN\r
106EFIAPI\r
107GluePostCodeEnabled (\r
108 VOID\r
109 );\r
110\r
111\r
112/**\r
113 Returns TRUE if POST code descriptions are enabled.\r
114\r
115 This function returns TRUE if the \r
116 POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
117 PcdPostCodePropertyMask is set. Otherwise FALSE is returned.\r
118\r
119 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED \r
120 bit of PcdPostCodeProperyMask is set.\r
121 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED \r
122 bit of PcdPostCodeProperyMask is clear.\r
123\r
124**/\r
125BOOLEAN\r
126EFIAPI\r
127GluePostCodeDescriptionEnabled (\r
128 VOID\r
129 );\r
130\r
131\r
132/**\r
133 Sends an 32-bit value to a POST card.\r
134\r
135 If POST codes are enabled in PcdPostCodeProperyMask, then call PostCode() \r
136 passing in Value. Value is returned.\r
137\r
138 @param Value The 32-bit value to write to the POST card.\r
139\r
140 @return Value\r
141\r
142**/\r
143#define POST_CODE(Value) PostCodeEnabled() ? PostCode(Value) : Value\r
144\r
145/**\r
146 Sends an 32-bit value to a POST and associated ASCII string.\r
147\r
148 If POST codes and POST code descriptions are enabled in \r
149 PcdPostCodeProperyMask, then call PostCodeWithDescription() passing in \r
150 Value and Description. If only POST codes are enabled, then call PostCode() \r
151 passing in Value. Value is returned.\r
152\r
153 @param Value The 32-bit value to write to the POST card.\r
154 @param Description Pointer to an ASCII string that is a description of the \r
155 POST code value.\r
156\r
157**/\r
158#define POST_CODE_WITH_DESCRIPTION(Value,Description) \\r
159 PostCodeEnabled() ? \\r
160 (PostCodeDescriptionEnabled() ? \\r
161 PostCodeWithDescription(Value,Description) : \\r
162 PostCode(Value)) : \\r
163 Value\r
164\r
165#endif\r