]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePostCodeLibDebug/PostCode.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BasePostCodeLibDebug / PostCode.c
CommitLineData
3eb9473e 1/*++\r
2 \r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 PostCode.c\r
16 \r
17Abstract: \r
18\r
19 Post Code functions\r
20\r
21--*/\r
22\r
23#include "EdkIIGlueBase.h"\r
24\r
25/**\r
26 Sends an 32-bit value to a POST card.\r
27\r
28 Sends the 32-bit value specified by Value to a POST card, and returns Value. \r
29 Some implementations of this library function may perform I/O operations \r
30 directly to a POST card device. Other implementations may send Value to \r
31 ReportStatusCode(), and the status code reporting mechanism will eventually \r
32 display the 32-bit value on the status reporting device.\r
33 \r
34 PostCode() must actively prevent recursion. If PostCode() is called while \r
35 processing another any other Report Status Code Library function, then \r
36 PostCode() must return Value immediately.\r
37\r
38 @param Value The 32-bit value to write to the POST card.\r
39\r
40 @return Value\r
41\r
42**/\r
43UINT32\r
44EFIAPI\r
45GluePostCode (\r
46 IN UINT32 Value\r
47 )\r
48{\r
49 DEBUG((EFI_D_INFO, "POST %08x\n", Value));\r
50 return Value;\r
51}\r
52\r
53\r
54/**\r
55 Sends an 32-bit value to a POST and associated ASCII string.\r
56\r
57 Sends the 32-bit value specified by Value to a POST card, and returns Value.\r
58 If Description is not NULL, then the ASCII string specified by Description is \r
59 also passed to the handler that displays the POST card value. Some \r
60 implementations of this library function may perform I/O operations directly \r
61 to a POST card device. Other implementations may send Value to ReportStatusCode(), \r
62 and the status code reporting mechanism will eventually display the 32-bit \r
63 value on the status reporting device. \r
64\r
65 PostCodeWithDescription()must actively prevent recursion. If \r
66 PostCodeWithDescription() is called while processing another any other Report \r
67 Status Code Library function, then PostCodeWithDescription() must return Value \r
68 immediately.\r
69\r
70 @param Value The 32-bit value to write to the POST card.\r
71 @param Description Pointer to an ASCII string that is a description of the \r
72 POST code value. This is an optional parameter that may \r
73 be NULL.\r
74\r
75 @return Value\r
76\r
77**/\r
78UINT32\r
79EFIAPI\r
80GluePostCodeWithDescription (\r
81 IN UINT32 Value,\r
82 IN CONST CHAR8 *Description OPTIONAL\r
83 )\r
84{\r
85 DEBUG((EFI_D_INFO, "POST %08x - %s\n", Value, Description));\r
86 return Value;\r
87}\r
88\r
89\r
90/**\r
91 Returns TRUE if POST Codes are enabled.\r
92\r
93 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED \r
94 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.\r
95\r
96 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
97 PcdPostCodeProperyMask is set.\r
98 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
99 PcdPostCodeProperyMask is clear.\r
100\r
101**/\r
102BOOLEAN\r
103EFIAPI\r
104GluePostCodeEnabled (\r
105 VOID\r
106 )\r
107{\r
108 return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
109}\r
110\r
111\r
112/**\r
113 Returns TRUE if POST code descriptions are enabled.\r
114\r
115 This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED\r
116 bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.\r
117\r
118 @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
119 PcdPostCodeProperyMask is set.\r
120 @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
121 PcdPostCodeProperyMask is clear.\r
122\r
123**/\r
124BOOLEAN\r
125EFIAPI\r
126GluePostCodeDescriptionEnabled (\r
127 VOID\r
128 )\r
129{\r
130 return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
131}\r