+++ /dev/null
-/** @file\r
- Report Status Code Library Post Code functions for PEI Phase.\r
-\r
- Copyright (c) 2006, 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
- http://opensource.org/licenses/bsd-license.php \r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-**/\r
-\r
-\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
- 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
- PostCode() must return Value immediately.\r
-\r
- @param Value The 32-bit value to write to the POST card.\r
-\r
- @return Value\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-PostCode (\r
- IN UINT32 Value\r
- )\r
-{\r
- DEBUG((EFI_D_INFO, "POST %08x\n", Value));\r
- IoWrite8 (0x80, (UINT8)(Value));\r
- return Value;\r
-}\r
-\r
-\r
-/**\r
- 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
- 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
- be NULL.\r
-\r
- @return Value\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-PostCodeWithDescription (\r
- IN UINT32 Value,\r
- IN CONST CHAR8 *Description OPTIONAL\r
- )\r
-{\r
- DEBUG((EFI_D_INFO, "POST %08x - %s\n", Value, Description));\r
- IoWrite8 (0x80, (UINT8)(Value));\r
- return Value;\r
-}\r
-\r
-\r
-/**\r
- Returns TRUE if POST Codes are enabled.\r
-\r
- This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_POST_CODE_ENABLED \r
- bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
-\r
- @retval TRUE The REPORT_STATUS_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
- PcdReportStatusCodeProperyMask is set.\r
- @retval FALSE The REPORT_STATUS_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
- PcdReportStatusCodeProperyMask is clear.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-ReportPostCodeEnabled (\r
- VOID\r
- )\r
-{\r
- return ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
-}\r
-\r
-\r
-/**\r
- Returns TRUE if POST code descriptions are enabled.\r
-\r
- This function returns TRUE if the \r
- REPORT_STATUS_CODE_PROPERTY_POST_CODE_DESCRIPTIONS_ENABLED bit of \r
- PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
-\r
- @retval TRUE The REPORT_STATUS_CODE_PROPERTY_POST_CODE_DESCRIPTIONS_ENABLED \r
- bit of PcdReportStatusCodeProperyMask is set.\r
- @retval FALSE The REPORT_STATUS_CODE_PROPERTY_POST_CODE_DESCRIPTIONS_ENABLED \r
- bit of PcdReportStatusCodeProperyMask is clear.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-ReportPostCodeDescriptionEnabled (\r
- VOID\r
- )\r
-{\r
- return ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);\r
-}\r