+++ /dev/null
-/** @file\r
- Internal include file of Status Code Runtime DXE Driver.\r
-\r
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef __STATUS_CODE_RUNTIME_DXE_H__\r
-#define __STATUS_CODE_RUNTIME_DXE_H__\r
-\r
-\r
-#include <FrameworkDxe.h>\r
-#include <Guid/DataHubStatusCodeRecord.h>\r
-#include <Protocol/DataHub.h>\r
-#include <Guid/MemoryStatusCodeRecord.h>\r
-#include <Protocol/StatusCode.h>\r
-#include <Guid/StatusCodeDataTypeId.h>\r
-#include <Guid/StatusCodeDataTypeDebug.h>\r
-#include <Guid/EventGroup.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/SynchronizationLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiRuntimeLib.h>\r
-#include <Library/SerialPortLib.h>\r
-#include <Library/OemHookStatusCodeLib.h>\r
-\r
-//\r
-// Data hub worker definition\r
-//\r
-#define DATAHUB_STATUS_CODE_SIGNATURE SIGNATURE_32 ('B', 'D', 'H', 'S')\r
-\r
-typedef struct {\r
- UINTN Signature;\r
- LIST_ENTRY Node;\r
- UINT8 Data[sizeof(DATA_HUB_STATUS_CODE_DATA_RECORD) + EFI_STATUS_CODE_DATA_MAX_SIZE];\r
-} DATAHUB_STATUSCODE_RECORD;\r
-\r
-\r
-extern RUNTIME_MEMORY_STATUSCODE_HEADER *mRtMemoryStatusCodeTable;\r
-\r
-/**\r
- Report status code to all supported device.\r
-\r
- This function implements EFI_STATUS_CODE_PROTOCOL.ReportStatusCode().\r
- It calls into the workers which dispatches the platform specific listeners.\r
-\r
- @param CodeType Indicates the type of status code being reported.\r
- @param Value Describes the current status of a hardware or software entity.\r
- This included information about the class and subclass that is used to\r
- classify the entity as well as an operation.\r
- @param Instance The enumeration of a hardware or software entity within\r
- the system. Valid instance numbers start with 1.\r
- @param CallerId This optional parameter may be used to identify the caller.\r
- This parameter allows the status code driver to apply different rules to\r
- different callers.\r
- @param Data This optional parameter may be used to pass additional data.\r
-\r
- @retval EFI_SUCCESS The function completed successfully\r
- @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ReportDispatcher (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
- IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
- );\r
-\r
-/**\r
- Dispatch initialization request to sub status code devices based on\r
- customized feature flags.\r
-\r
-**/\r
-VOID\r
-InitializationDispatcherWorker (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Locates Serial I/O Protocol as initialization for serial status code worker.\r
-\r
- @retval EFI_SUCCESS Serial I/O Protocol is successfully located.\r
-\r
-**/\r
-EFI_STATUS\r
-EfiSerialStatusCodeInitializeWorker (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r
-\r
- @param CodeType Indicates the type of status code being reported.\r
- @param Value Describes the current status of a hardware or software entity.\r
- This included information about the class and subclass that is used to\r
- classify the entity as well as an operation.\r
- @param Instance The enumeration of a hardware or software entity within\r
- the system. Valid instance numbers start with 1.\r
- @param CallerId This optional parameter may be used to identify the caller.\r
- This parameter allows the status code driver to apply different rules to\r
- different callers.\r
- @param Data This optional parameter may be used to pass additional data.\r
-\r
- @retval EFI_SUCCESS Status code reported to serial I/O successfully.\r
- @retval EFI_DEVICE_ERROR EFI serial device cannot work after ExitBootService() is called.\r
- @retval EFI_DEVICE_ERROR EFI serial device cannot work with TPL higher than TPL_CALLBACK.\r
-\r
-**/\r
-EFI_STATUS\r
-SerialStatusCodeReportWorker (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN UINT32 Instance,\r
- IN EFI_GUID *CallerId,\r
- IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
- );\r
-\r
-/**\r
- Initialize runtime memory status code table as initialization for runtime memory status code worker\r
-\r
- @retval EFI_SUCCESS Runtime memory status code table successfully initialized.\r
-\r
-**/\r
-EFI_STATUS\r
-RtMemoryStatusCodeInitializeWorker (\r
- VOID\r
- );\r
-\r
-/**\r
- Report status code into runtime memory. If the runtime pool is full, roll back to the\r
- first record and overwrite it.\r
-\r
- @param CodeType Indicates the type of status code being reported.\r
- @param Value Describes the current status of a hardware or software entity.\r
- This included information about the class and subclass that is used to\r
- classify the entity as well as an operation.\r
- @param Instance The enumeration of a hardware or software entity within\r
- the system. Valid instance numbers start with 1.\r
-\r
- @retval EFI_SUCCESS Status code successfully recorded in runtime memory status code table.\r
-\r
-**/\r
-EFI_STATUS\r
-RtMemoryStatusCodeReportWorker (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN UINT32 Instance\r
- );\r
-\r
-/**\r
- Locate Data Hub Protocol and create event for logging data\r
- as initialization for data hub status code worker.\r
-\r
- @retval EFI_SUCCESS Initialization is successful.\r
-\r
-**/\r
-EFI_STATUS\r
-DataHubStatusCodeInitializeWorker (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Report status code into DataHub.\r
-\r
- @param CodeType Indicates the type of status code being reported.\r
- @param Value Describes the current status of a hardware or software entity.\r
- This included information about the class and subclass that is used to\r
- classify the entity as well as an operation.\r
- @param Instance The enumeration of a hardware or software entity within\r
- the system. Valid instance numbers start with 1.\r
- @param CallerId This optional parameter may be used to identify the caller.\r
- This parameter allows the status code driver to apply different rules to\r
- different callers.\r
- @param Data This optional parameter may be used to pass additional data.\r
-\r
- @retval EFI_SUCCESS The function completed successfully.\r
- @retval EFI_DEVICE_ERROR Function is reentered.\r
- @retval EFI_DEVICE_ERROR Function is called at runtime.\r
- @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for free record buffer.\r
-\r
-**/\r
-EFI_STATUS\r
-DataHubStatusCodeReportWorker (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN UINT32 Instance,\r
- IN EFI_GUID *CallerId,\r
- IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
- );\r
-\r
-\r
-/**\r
- Virtual address change notification call back. It converts global pointer\r
- to virtual address.\r
-\r
- @param Event Event whose notification function is being invoked.\r
- @param Context Pointer to the notification function's context, which is\r
- always zero in current implementation.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-VirtualAddressChangeCallBack (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- );\r
-\r
-#endif\r