]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c
INF extension reviewed
[mirror_edk2.git] / MdePkg / Library / PeiDxePostCodeLibReportStatusCode / PostCode.c
index fb0de3f6bf64af226f0602b1a64ca1413f9b7fed..9714b8c17dc6347bb9163f6996a5c3d30596798b 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
-  Report Status Code Library Post Code functions for DXE Phase.\r
+  Post code library instace bases on report status code library\r
+  PostCode Library for PEIMs and DXE drivers that send PostCode to ReportStatusCode\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
 **/\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
+\r
 #include <PiPei.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
+\r
 #include <Library/PostCodeLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
 #include <Library/PcdLib.h>\r
 /**\r
   Sends an 32-bit value to a POST card.\r
 \r
-  Sends the 32-bit value specified by Value to a POST card, and returns Value.\r
-  Some implementations of this library function may perform I/O operations\r
-  directly to a POST card device.  Other implementations may send Value to\r
-  ReportStatusCode(), and the status code reporting mechanism will eventually\r
+  Sends the 32-bit value specified by Value to a POST card, and returns Value.  \r
+  Some implementations of this library function may perform I/O operations \r
+  directly to a POST card device.  Other implementations may send Value to \r
+  ReportStatusCode(), and the status code reporting mechanism will eventually \r
   display the 32-bit value on the status reporting device.\r
-\r
-  PostCode() must actively prevent recursion.  If PostCode() is called while\r
-  processing another any other Report Status Code Library function, then\r
+  \r
+  PostCode() must actively prevent recursion.  If PostCode() is called while \r
+  processing another any other Post Code Library function, then \r
   PostCode() must return Value immediately.\r
 \r
   @param  Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value\r
+  @return The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -72,24 +69,24 @@ PostCode (
   Sends an 32-bit value to a POST and associated ASCII string.\r
 \r
   Sends the 32-bit value specified by Value to a POST card, and returns Value.\r
-  If Description is not NULL, then the ASCII string specified by Description is\r
-  also passed to the handler that displays the POST card value.  Some\r
-  implementations of this library function may perform I/O operations directly\r
-  to a POST card device.  Other implementations may send Value to ReportStatusCode(),\r
-  and the status code reporting mechanism will eventually display the 32-bit\r
-  value on the status reporting device.\r
-\r
-  PostCodeWithDescription()must actively prevent recursion.  If\r
-  PostCodeWithDescription() is called while processing another any other Report\r
-  Status Code Library function, then PostCodeWithDescription() must return Value\r
+  If Description is not NULL, then the ASCII string specified by Description is \r
+  also passed to the handler that displays the POST card value.  Some \r
+  implementations of this library function may perform I/O operations directly \r
+  to a POST card device.  Other implementations may send Value to ReportStatusCode(), \r
+  and the status code reporting mechanism will eventually display the 32-bit \r
+  value on the status reporting device.  \r
+\r
+  PostCodeWithDescription()must actively prevent recursion.  If \r
+  PostCodeWithDescription() is called while processing another any other Post \r
+  Code Library function, then PostCodeWithDescription() must return Value \r
   immediately.\r
 \r
   @param  Value        The 32-bit value to write to the POST card.\r
-  @param  Description  Pointer to an ASCII string that is a description of the\r
-                       POST code value.  This is an optional parameter that may\r
+  @param  Description  Pointer to an ASCII string that is a description of the \r
+                       POST code value.  This is an optional parameter that may \r
                        be NULL.\r
 \r
-  @return  Value\r
+  @return The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -120,12 +117,12 @@ PostCodeWithDescription (
 /**\r
   Returns TRUE if POST Codes are enabled.\r
 \r
-  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED\r
+  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED \r
   bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
+  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
                   PcdPostCodeProperyMask is set.\r
-  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
+  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
                   PcdPostCodeProperyMask is clear.\r
 \r
 **/\r
@@ -142,14 +139,13 @@ PostCodeEnabled (
 /**\r
   Returns TRUE if POST code descriptions are enabled.\r
 \r
-  This function returns TRUE if the\r
-  POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
-  PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
+  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED\r
+  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED\r
-                  bit of PcdPostCodeProperyMask is set.\r
-  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED\r
-                  bit of PcdPostCodeProperyMask is clear.\r
+  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is set.\r
+  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
@@ -158,5 +154,6 @@ PostCodeDescriptionEnabled (
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);\r
 }\r
+\r