2 The instance of Post Code Library that layers on top of a Debug Library instance.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/PostCodeLib.h>
12 #include <Library/DebugLib.h>
13 #include <Library/PcdLib.h>
16 Sends an 32-bit value to a POST card.
18 Sends the 32-bit value specified by Value to a POST card, and returns Value.
19 Some implementations of this library function may perform I/O operations
20 directly to a POST card device. Other implementations may send Value to
21 ReportStatusCode(), and the status code reporting mechanism will eventually
22 display the 32-bit value on the status reporting device.
24 PostCode() must actively prevent recursion. If PostCode() is called while
25 processing another any other Post Code Library function, then
26 PostCode() must return Value immediately.
28 @param Value The 32-bit value to write to the POST card.
30 @return The 32-bit value to write to the POST card.
39 DEBUG((EFI_D_INFO
, "POST %08x\n", Value
));
45 Sends an 32-bit value to a POST and associated ASCII string.
47 Sends the 32-bit value specified by Value to a POST card, and returns Value.
48 If Description is not NULL, then the ASCII string specified by Description is
49 also passed to the handler that displays the POST card value. Some
50 implementations of this library function may perform I/O operations directly
51 to a POST card device. Other implementations may send Value to ReportStatusCode(),
52 and the status code reporting mechanism will eventually display the 32-bit
53 value on the status reporting device.
55 PostCodeWithDescription()must actively prevent recursion. If
56 PostCodeWithDescription() is called while processing another any other Post
57 Code Library function, then PostCodeWithDescription() must return Value
60 @param Value The 32-bit value to write to the POST card.
61 @param Description The pointer to an ASCII string that is a description of the
62 POST code value. This is an optional parameter that may
65 @return The 32-bit value to write to the POST card.
70 PostCodeWithDescription (
72 IN CONST CHAR8
*Description OPTIONAL
75 DEBUG((EFI_D_INFO
, "POST %08x - %s\n", Value
, Description
));
81 Returns TRUE if POST Codes are enabled.
83 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
84 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
86 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
87 PcdPostCodeProperyMask is set.
88 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
89 PcdPostCodeProperyMask is clear.
98 return (BOOLEAN
) ((PcdGet8(PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_ENABLED
) != 0);
103 Returns TRUE if POST code descriptions are enabled.
105 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED
106 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
108 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of
109 PcdPostCodeProperyMask is set.
110 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of
111 PcdPostCodeProperyMask is clear.
116 PostCodeDescriptionEnabled (
120 return (BOOLEAN
) ((PcdGet8(PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED
) != 0);