2 OEM hook status code handler PEIM which produces general handler and hook it
3 onto the PEI status code router.
5 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
11 // The package level header files this module uses
13 #include <WinNtPeim.h>
16 // The protocols, PPI and GUID defintions for this module
18 #include <Ppi/ReportStatusCodeHandler.h>
20 // The Library classes this module consumes
22 #include <Library/DebugLib.h>
23 #include <Library/PeiServicesLib.h>
24 #include <Library/PeimEntryPoint.h>
25 #include <Library/OemHookStatusCodeLib.h>
29 OemHookStatusCodeReportWrapper (
30 IN CONST EFI_PEI_SERVICES
**PeiServices
,
31 IN EFI_STATUS_CODE_TYPE CodeType
,
32 IN EFI_STATUS_CODE_VALUE Value
,
34 IN CONST EFI_GUID
*CallerId
, OPTIONAL
35 IN CONST EFI_STATUS_CODE_DATA
*Data OPTIONAL
38 return OemHookStatusCodeReport (
42 (EFI_GUID
*) CallerId
,
43 (EFI_STATUS_CODE_DATA
*) Data
48 Entry point of OEM hook status code handler PEIM.
50 This function is the entry point of this OEM hook status code handler PEIM.
51 It initializes and registers OEM status code handler.
53 @param FileHandle Handle of the file being invoked.
54 @param PeiServices Describes the list of possible PEI Services.
56 @retval EFI_SUCESS The entry point executes successfully.
61 WinNtOemHookStatusCodeHandlerPeiEntry (
62 IN EFI_PEI_FILE_HANDLE FileHandle
,
63 IN CONST EFI_PEI_SERVICES
**PeiServices
67 EFI_PEI_RSC_HANDLER_PPI
*RscHandlerPpi
;
69 Status
= PeiServicesLocatePpi (
70 &gEfiPeiRscHandlerPpiGuid
,
73 (VOID
**) &RscHandlerPpi
75 ASSERT_EFI_ERROR (Status
);
77 OemHookStatusCodeInitialize ();
79 Status
= RscHandlerPpi
->Register (OemHookStatusCodeReportWrapper
);
80 ASSERT_EFI_ERROR (Status
);