TianoCore EDK2 master
Loading...
Searching...
No Matches
PostCode.c
Go to the documentation of this file.
1
10#include <PiPei.h>
11
12#include <Library/PostCodeLib.h>
14#include <Library/PcdLib.h>
15#include <Library/BaseLib.h>
16
29#define POST_CODE_TO_STATUS_CODE_VALUE(PostCode) \
30 ((EFI_STATUS_CODE_VALUE) (((PostCode & 0x1f) << 16) | ((PostCode & 0x3) << 19)))
31
50UINT32
51EFIAPI
53 IN UINT32 Value
54 )
55{
57 return Value;
58}
59
84UINT32
85EFIAPI
87 IN UINT32 Value,
88 IN CONST CHAR8 *Description OPTIONAL
89 )
90{
91 if (Description == NULL) {
95 );
96 } else {
100 Description,
101 AsciiStrSize (Description)
102 );
103 }
104
105 return Value;
106}
107
120BOOLEAN
121EFIAPI
123 VOID
124 )
125{
126 return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);
127}
128
141BOOLEAN
142EFIAPI
144 VOID
145 )
146{
147 return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);
148}
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
Definition: String.c:681
UINT32 EFIAPI PostCode(IN UINT32 Value)
Definition: PostCode.c:35
BOOLEAN EFIAPI PostCodeDescriptionEnabled(VOID)
Definition: PostCode.c:113
UINT32 EFIAPI PostCodeWithDescription(IN UINT32 Value, IN CONST CHAR8 *Description OPTIONAL)
Definition: PostCode.c:69
BOOLEAN EFIAPI PostCodeEnabled(VOID)
Definition: PostCode.c:92
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define REPORT_STATUS_CODE(Type, Value)
#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type, Value, ExtendedData, ExtendedDataSize)
#define PcdGet8(TokenName)
Definition: PcdLib.h:336
#define POST_CODE_TO_STATUS_CODE_VALUE(PostCode)
Definition: PostCode.c:29
#define EFI_PROGRESS_CODE
Definition: PiStatusCode.h:43