2 Status Code Handler Driver which produces datahub handler and hook it
3 onto the DXE status code router.
5 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "DatahubStatusCodeHandlerDxe.h"
18 EFI_EVENT mExitBootServicesEvent
= NULL
;
19 EFI_RSC_HANDLER_PROTOCOL
*mRscHandlerProtocol
= NULL
;
22 Unregister status code callback functions only available at boot time from
23 report status code router when exiting boot services.
25 @param Event Event whose notification function is being invoked.
26 @param Context Pointer to the notification function's context, which is
27 always zero in current implementation.
32 UnregisterBootTimeHandlers (
37 mRscHandlerProtocol
->Unregister (DataHubStatusCodeReportWorker
);
41 Entry point of DXE Status Code Driver.
43 This function is the entry point of this DXE Status Code Driver.
44 It initializes registers status code handlers, and registers event for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE.
46 @param ImageHandle The firmware allocated handle for the EFI image.
47 @param SystemTable A pointer to the EFI System Table.
49 @retval EFI_SUCCESS The entry point is executed successfully.
54 DatahubStatusCodeHandlerDxeEntry (
55 IN EFI_HANDLE ImageHandle
,
56 IN EFI_SYSTEM_TABLE
*SystemTable
61 if (FeaturePcdGet (PcdStatusCodeUseDataHub
)) {
62 Status
= gBS
->LocateProtocol (
63 &gEfiRscHandlerProtocolGuid
,
65 (VOID
**) &mRscHandlerProtocol
67 ASSERT_EFI_ERROR (Status
);
70 // Dispatch initialization request to supported devices
72 DataHubStatusCodeInitializeWorker ();
74 mRscHandlerProtocol
->Register (DataHubStatusCodeReportWorker
, TPL_HIGH_LEVEL
);
76 Status
= gBS
->CreateEventEx (
79 UnregisterBootTimeHandlers
,
81 &gEfiEventExitBootServicesGuid
,
82 &mExitBootServicesEvent
84 ASSERT_EFI_ERROR (Status
);