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.
20 #include <Library/PostCodeLib.h>
21 #include <Library/DebugLib.h>
22 #include <Library/PcdLib.h>
25 Sends an 32-bit value to a POST card.
27 Sends the 32-bit value specified by Value to a POST card, and returns Value.
28 Some implementations of this library function may perform I/O operations
29 directly to a POST card device. Other implementations may send Value to
30 ReportStatusCode(), and the status code reporting mechanism will eventually
31 display the 32-bit value on the status reporting device.
33 PostCode() must actively prevent recursion. If PostCode() is called while
34 processing another any other Report Status Code Library function, then
35 PostCode() must return Value immediately.
37 @param Value The 32-bit value to write to the POST card.
48 DEBUG((EFI_D_INFO
, "POST %08x\n", Value
));
54 Sends an 32-bit value to a POST and associated ASCII string.
56 Sends the 32-bit value specified by Value to a POST card, and returns Value.
57 If Description is not NULL, then the ASCII string specified by Description is
58 also passed to the handler that displays the POST card value. Some
59 implementations of this library function may perform I/O operations directly
60 to a POST card device. Other implementations may send Value to ReportStatusCode(),
61 and the status code reporting mechanism will eventually display the 32-bit
62 value on the status reporting device.
64 PostCodeWithDescription()must actively prevent recursion. If
65 PostCodeWithDescription() is called while processing another any other Report
66 Status Code Library function, then PostCodeWithDescription() must return Value
69 @param Value The 32-bit value to write to the POST card.
70 @param Description Pointer to an ASCII string that is a description of the
71 POST code value. This is an optional parameter that may
79 PostCodeWithDescription (
81 IN CONST CHAR8
*Description OPTIONAL
84 DEBUG((EFI_D_INFO
, "POST %08x - %s\n", Value
, Description
));
90 Returns TRUE if POST Codes are enabled.
92 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
93 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
95 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
96 PcdPostCodeProperyMask is set.
97 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
98 PcdPostCodeProperyMask is clear.
107 return (BOOLEAN
) ((PcdGet8(PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_ENABLED
) != 0);
112 Returns TRUE if POST code descriptions are enabled.
114 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
115 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
117 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
118 PcdPostCodeProperyMask is set.
119 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
120 PcdPostCodeProperyMask is clear.
125 PostCodeDescriptionEnabled (
129 return (BOOLEAN
) ((PcdGet8(PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_ENABLED
) != 0);