]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/PostCodeLib.h
2 Report Status Code Library public .h file
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. 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
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.
15 #ifndef __POST_CODE_LIB_H__
16 #define __POST_CODE_LIB_H__
18 #define POST_CODE_PROPERTY_POST_CODE_ENABLED 0x00000008
19 #define POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED 0x00000010
22 Sends an 32-bit value to a POST card.
24 Sends the 32-bit value specified by Value to a POST card, and returns Value.
25 Some implementations of this library function may perform I/O operations
26 directly to a POST card device. Other implementations may send Value to
27 ReportStatusCode(), and the status code reporting mechanism will eventually
28 display the 32-bit value on the status reporting device.
30 PostCode() must actively prevent recursion. If PostCode() is called while
31 processing another any other Report Status Code Library function, then
32 PostCode() must return Value immediately.
34 @param Value The 32-bit value to write to the POST card.
47 Sends an 32-bit value to a POST and associated ASCII string.
49 Sends the 32-bit value specified by Value to a POST card, and returns Value.
50 If Description is not NULL, then the ASCII string specified by Description is
51 also passed to the handler that displays the POST card value. Some
52 implementations of this library function may perform I/O operations directly
53 to a POST card device. Other implementations may send Value to ReportStatusCode(),
54 and the status code reporting mechanism will eventually display the 32-bit
55 value on the status reporting device.
57 PostCodeWithDescription()must actively prevent recursion. If
58 PostCodeWithDescription() is called while processing another any other Report
59 Status Code Library function, then PostCodeWithDescription() must return Value
62 @param Value The 32-bit value to write to the POST card.
63 @param Description Pointer to an ASCII string that is a description of the
64 POST code value. This is an optional parameter that may
72 PostCodeWithDescription (
74 IN CONST CHAR8
*Description OPTIONAL
79 Returns TRUE if POST Codes are enabled.
81 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
82 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
84 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
85 PcdPostCodeProperyMask is set.
86 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
87 PcdPostCodeProperyMask is clear.
98 Returns TRUE if POST code descriptions are enabled.
100 This function returns TRUE if the
101 POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
102 PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
104 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED
105 bit of PcdPostCodeProperyMask is set.
106 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED
107 bit of PcdPostCodeProperyMask is clear.
112 PostCodeDescriptionEnabled (
118 Sends an 32-bit value to a POST card.
120 If POST codes are enabled in PcdPostCodeProperyMask, then call PostCode()
121 passing in Value. Value is returned.
123 @param Value The 32-bit value to write to the POST card.
128 #define POST_CODE(Value) PostCodeEnabled() ? PostCode(Value) : Value
131 Sends an 32-bit value to a POST and associated ASCII string.
133 If POST codes and POST code descriptions are enabled in
134 PcdPostCodeProperyMask, then call PostCodeWithDescription() passing in
135 Value and Description. If only POST codes are enabled, then call PostCode()
136 passing in Value. Value is returned.
138 @param Value The 32-bit value to write to the POST card.
139 @param Description Pointer to an ASCII string that is a description of the
143 #define POST_CODE_WITH_DESCRIPTION(Value,Description) \
144 PostCodeEnabled() ? \
145 (PostCodeDescriptionEnabled() ? \
146 PostCodeWithDescription(Value,Description) : \