]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePostCodeLib.h
3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 EdkIIGluePostCodeLib.h
19 Public header file for Post Code Lib
23 #ifndef __EDKII_GLUE_POST_CODE_LIB_H__
24 #define __EDKII_GLUE_POST_CODE_LIB_H__
27 #define PostCode(_VALUE) GluePostCode(_VALUE)
28 #define PostCodeWithDescription(_VALUE, _DESC) GluePostCodeWithDescription(_VALUE, _DESC)
29 #define PostCodeEnabled() GluePostCodeEnabled()
30 #define PostCodeDescriptionEnabled() GluePostCodeDescriptionEnabled()
33 #define POST_CODE_PROPERTY_POST_CODE_ENABLED 0x00000008
34 #define POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED 0x00000010
37 Sends an 32-bit value to a POST card.
39 Sends the 32-bit value specified by Value to a POST card, and returns Value.
40 Some implementations of this library function may perform I/O operations
41 directly to a POST card device. Other implementations may send Value to
42 ReportStatusCode(), and the status code reporting mechanism will eventually
43 display the 32-bit value on the status reporting device.
45 PostCode() must actively prevent recursion. If PostCode() is called while
46 processing another any other Report Status Code Library function, then
47 PostCode() must return Value immediately.
49 @param Value The 32-bit value to write to the POST card.
62 Sends an 32-bit value to a POST and associated ASCII string.
64 Sends the 32-bit value specified by Value to a POST card, and returns Value.
65 If Description is not NULL, then the ASCII string specified by Description is
66 also passed to the handler that displays the POST card value. Some
67 implementations of this library function may perform I/O operations directly
68 to a POST card device. Other implementations may send Value to ReportStatusCode(),
69 and the status code reporting mechanism will eventually display the 32-bit
70 value on the status reporting device.
72 PostCodeWithDescription()must actively prevent recursion. If
73 PostCodeWithDescription() is called while processing another any other Report
74 Status Code Library function, then PostCodeWithDescription() must return Value
77 @param Value The 32-bit value to write to the POST card.
78 @param Description Pointer to an ASCII string that is a description of the
79 POST code value. This is an optional parameter that may
87 GluePostCodeWithDescription (
89 IN CONST CHAR8
*Description OPTIONAL
94 Returns TRUE if POST Codes are enabled.
96 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
97 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
99 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
100 PcdPostCodeProperyMask is set.
101 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
102 PcdPostCodeProperyMask is clear.
107 GluePostCodeEnabled (
113 Returns TRUE if POST code descriptions are enabled.
115 This function returns TRUE if the
116 POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
117 PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
119 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED
120 bit of PcdPostCodeProperyMask is set.
121 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED
122 bit of PcdPostCodeProperyMask is clear.
127 GluePostCodeDescriptionEnabled (
133 Sends an 32-bit value to a POST card.
135 If POST codes are enabled in PcdPostCodeProperyMask, then call PostCode()
136 passing in Value. Value is returned.
138 @param Value The 32-bit value to write to the POST card.
143 #define POST_CODE(Value) PostCodeEnabled() ? PostCode(Value) : Value
146 Sends an 32-bit value to a POST and associated ASCII string.
148 If POST codes and POST code descriptions are enabled in
149 PcdPostCodeProperyMask, then call PostCodeWithDescription() passing in
150 Value and Description. If only POST codes are enabled, then call PostCode()
151 passing in Value. Value is returned.
153 @param Value The 32-bit value to write to the POST card.
154 @param Description Pointer to an ASCII string that is a description of the
158 #define POST_CODE_WITH_DESCRIPTION(Value,Description) \
159 PostCodeEnabled() ? \
160 (PostCodeDescriptionEnabled() ? \
161 PostCodeWithDescription(Value,Description) : \