Status Code Handler Driver which produces general handlers and hook them\r
onto the DXE status code router.\r
\r
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
#include "StatusCodeHandlerRuntimeDxe.h"\r
\r
EFI_EVENT mVirtualAddressChangeEvent = NULL;\r
-EFI_EVENT mExitBootServicesEvent = NULL;\r
EFI_RSC_HANDLER_PROTOCOL *mRscHandlerProtocol = NULL;\r
\r
/**\r
Unregister status code callback functions only available at boot time from\r
report status code router when exiting boot services.\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
-UnregisterBootTimeHandlers (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
+UnregisterSerialBootTimeHandlers (\r
+ VOID\r
)\r
{\r
- if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
+ if (PcdGetBool (PcdStatusCodeUseSerial)) {\r
mRscHandlerProtocol->Unregister (SerialStatusCodeReportWorker);\r
}\r
}\r
// If enable UseSerial, then initialize serial port.\r
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.\r
//\r
- if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
+ if (PcdGetBool (PcdStatusCodeUseSerial)) {\r
//\r
// Call Serial Port Lib API to initialize serial port.\r
//\r
Status = SerialPortInitialize ();\r
ASSERT_EFI_ERROR (Status);\r
}\r
- if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
+ if (PcdGetBool (PcdStatusCodeUseMemory)) {\r
Status = RtMemoryStatusCodeInitializeWorker ();\r
ASSERT_EFI_ERROR (Status);\r
}\r
//\r
// Dispatch records to devices based on feature flag.\r
//\r
- if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
+ if (PcdGetBool (PcdStatusCodeUseSerial)) {\r
SerialStatusCodeReportWorker (\r
Record[Index].CodeType,\r
Record[Index].Value,\r
NULL\r
);\r
}\r
- if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
+ if (PcdGetBool (PcdStatusCodeUseMemory)) {\r
RtMemoryStatusCodeReportWorker (\r
Record[Index].CodeType,\r
Record[Index].Value,\r
//\r
InitializationDispatcherWorker ();\r
\r
- if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
+ if (PcdGetBool (PcdStatusCodeUseSerial)) {\r
mRscHandlerProtocol->Register (SerialStatusCodeReportWorker, TPL_HIGH_LEVEL);\r
}\r
- if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
+ if (PcdGetBool (PcdStatusCodeUseMemory)) {\r
mRscHandlerProtocol->Register (RtMemoryStatusCodeReportWorker, TPL_HIGH_LEVEL);\r
}\r
\r
- Status = gBS->CreateEventEx (\r
- EVT_NOTIFY_SIGNAL,\r
- TPL_NOTIFY,\r
- UnregisterBootTimeHandlers,\r
- NULL,\r
- &gEfiEventExitBootServicesGuid,\r
- &mExitBootServicesEvent\r
- );\r
-\r
Status = gBS->CreateEventEx (\r
EVT_NOTIFY_SIGNAL,\r
TPL_NOTIFY,\r