2 Report Status Code Library Post Code functions for DXE Phase.
4 Copyright (c) 2006, Intel Corporation<BR>
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.
16 Converts POST code value to status code value.
18 This macro converts the post code to status code value. Bits 0..4 of PostCode
19 are mapped to bits 16..20 of status code value, and bits 5..7 of PostCode are mapped to bits
20 24..26 of status code value.
22 @param PostCode POST code value.
24 @return The converted status code value.
27 #define POST_CODE_TO_STATUS_CODE_VALUE(PostCode) \
28 ((EFI_STATUS_CODE_VALUE) (((PostCode & 0x1f) << 16) | ((PostCode & 0x3) << 19)))
31 Sends an 32-bit value to a POST card.
33 Sends the 32-bit value specified by Value to a POST card, and returns Value.
34 Some implementations of this library function may perform I/O operations
35 directly to a POST card device. Other implementations may send Value to
36 ReportStatusCode(), and the status code reporting mechanism will eventually
37 display the 32-bit value on the status reporting device.
39 PostCode() must actively prevent recursion. If PostCode() is called while
40 processing another any other Report Status Code Library function, then
41 PostCode() must return Value immediately.
43 @param Value The 32-bit value to write to the POST card.
54 REPORT_STATUS_CODE (EFI_PROGRESS_CODE
, POST_CODE_TO_STATUS_CODE_VALUE (Value
));
60 Sends an 32-bit value to a POST and associated ASCII string.
62 Sends the 32-bit value specified by Value to a POST card, and returns Value.
63 If Description is not NULL, then the ASCII string specified by Description is
64 also passed to the handler that displays the POST card value. Some
65 implementations of this library function may perform I/O operations directly
66 to a POST card device. Other implementations may send Value to ReportStatusCode(),
67 and the status code reporting mechanism will eventually display the 32-bit
68 value on the status reporting device.
70 PostCodeWithDescription()must actively prevent recursion. If
71 PostCodeWithDescription() is called while processing another any other Report
72 Status Code Library function, then PostCodeWithDescription() must return Value
75 @param Value The 32-bit value to write to the POST card.
76 @param Description Pointer to an ASCII string that is a description of the
77 POST code value. This is an optional parameter that may
85 PostCodeWithDescription (
87 IN CONST CHAR8
*Description OPTIONAL
90 if (Description
== NULL
) {
93 POST_CODE_TO_STATUS_CODE_VALUE (Value
)
96 REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
98 POST_CODE_TO_STATUS_CODE_VALUE (Value
),
100 AsciiStrSize (Description
)
109 Returns TRUE if POST Codes are enabled.
111 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
112 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
114 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
115 PcdPostCodeProperyMask is set.
116 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
117 PcdPostCodeProperyMask is clear.
126 return ((PcdGet8(PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_ENABLED
) != 0);
131 Returns TRUE if POST code descriptions are enabled.
133 This function returns TRUE if the
134 POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
135 PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
137 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED
138 bit of PcdPostCodeProperyMask is set.
139 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED
140 bit of PcdPostCodeProperyMask is clear.
145 PostCodeDescriptionEnabled (
149 return ((PcdGet8(PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_ENABLED
) != 0);