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 ((DEBUG_INFO
, "POST %08x\n", Value
));
44 Sends an 32-bit value to a POST and associated ASCII string.
46 Sends the 32-bit value specified by Value to a POST card, and returns Value.
47 If Description is not NULL, then the ASCII string specified by Description is
48 also passed to the handler that displays the POST card value. Some
49 implementations of this library function may perform I/O operations directly
50 to a POST card device. Other implementations may send Value to ReportStatusCode(),
51 and the status code reporting mechanism will eventually display the 32-bit
52 value on the status reporting device.
54 PostCodeWithDescription()must actively prevent recursion. If
55 PostCodeWithDescription() is called while processing another any other Post
56 Code Library function, then PostCodeWithDescription() must return Value
59 @param Value The 32-bit value to write to the POST card.
60 @param Description The pointer to an ASCII string that is a description of the
61 POST code value. This is an optional parameter that may
64 @return The 32-bit value to write to the POST card.
69 PostCodeWithDescription (
71 IN CONST CHAR8
*Description OPTIONAL
74 DEBUG ((DEBUG_INFO
, "POST %08x - %s\n", Value
, Description
));
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.
96 return (BOOLEAN
)((PcdGet8 (PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_ENABLED
) != 0);
100 Returns TRUE if POST code descriptions are enabled.
102 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED
103 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
105 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of
106 PcdPostCodeProperyMask is set.
107 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of
108 PcdPostCodeProperyMask is clear.
113 PostCodeDescriptionEnabled (
117 return (BOOLEAN
)((PcdGet8 (PcdPostCodePropertyMask
) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED
) != 0);