X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FPeiDxePostCodeLibReportStatusCode%2FPostCode.c;h=9714b8c17dc6347bb9163f6996a5c3d30596798b;hb=6bfbb5f0e09c3fd70e0df5300dfed2e734c4a230;hp=408ede45c72b143c75e756c2ed9e57c178173c79;hpb=cdffda11f4d37bdf3ab09161a5e679b514cd030e;p=mirror_edk2.git
diff --git a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c
index 408ede45c7..9714b8c17d 100644
--- a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c
+++ b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c
@@ -1,25 +1,34 @@
/** @file
- Report Status Code Library Post Code functions for DXE Phase.
+ Post code library instace bases on report status code library
+ PostCode Library for PEIMs and DXE drivers that send PostCode to ReportStatusCode
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2006 - 2008, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
+
+#include
+
+#include
+#include
+#include
+#include
+
/**
Converts POST code value to status code value.
- This macro converts the post code to status code value. Bits 0..4 of PostCode
- are mapped to bits 16..20 of status code value, and bits 5..7 of PostCode are mapped to bits
- 24..26 of status code value.
+ This macro converts the post code to status code value. Bits 0..4 of PostCode
+ are mapped to bits 16..20 of status code value, and bits 5..7 of PostCode are mapped to bits
+ 24..26 of status code value.
- @param PostCode POST code value.
+ @param PostCode POST code value.
@return The converted status code value.
@@ -37,12 +46,12 @@
display the 32-bit value on the status reporting device.
PostCode() must actively prevent recursion. If PostCode() is called while
- processing another any other Report Status Code Library function, then
+ processing another any other Post Code Library function, then
PostCode() must return Value immediately.
@param Value The 32-bit value to write to the POST card.
- @return Value
+ @return The 32-bit value to write to the POST card.
**/
UINT32
@@ -68,8 +77,8 @@ PostCode (
value on the status reporting device.
PostCodeWithDescription()must actively prevent recursion. If
- PostCodeWithDescription() is called while processing another any other Report
- Status Code Library function, then PostCodeWithDescription() must return Value
+ PostCodeWithDescription() is called while processing another any other Post
+ Code Library function, then PostCodeWithDescription() must return Value
immediately.
@param Value The 32-bit value to write to the POST card.
@@ -77,7 +86,7 @@ PostCode (
POST code value. This is an optional parameter that may
be NULL.
- @return Value
+ @return The 32-bit value to write to the POST card.
**/
UINT32
@@ -87,7 +96,7 @@ PostCodeWithDescription (
IN CONST CHAR8 *Description OPTIONAL
)
{
- if (Description == NULL) {
+ if (Description == NULL) {
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
POST_CODE_TO_STATUS_CODE_VALUE (Value)
@@ -130,14 +139,13 @@ PostCodeEnabled (
/**
Returns TRUE if POST code descriptions are enabled.
- This function returns TRUE if the
- POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
- PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
+ This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED
+ bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned.
- @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED
- bit of PcdPostCodeProperyMask is set.
- @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED
- bit of PcdPostCodeProperyMask is clear.
+ @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of
+ PcdPostCodeProperyMask is set.
+ @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of
+ PcdPostCodeProperyMask is clear.
**/
BOOLEAN
@@ -146,5 +154,6 @@ PostCodeDescriptionEnabled (
VOID
)
{
- return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);
+ return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);
}
+