]> git.proxmox.com Git - mirror_edk2.git/blame - Nt32Pkg/WinNtOemHookStatusCodeHandlerDxe/WinNtOemHookStatusCodeHandlerDxe.c
Nt32Pkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Nt32Pkg / WinNtOemHookStatusCodeHandlerDxe / WinNtOemHookStatusCodeHandlerDxe.c
CommitLineData
25126a05 1/** @file\r
2 OEM hook status code handler driver which produces general handler and hook it\r
3 onto the DXE status code router.\r
4\r
8f2a5f80 5 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
9d2eedba 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
25126a05 7\r
8**/\r
9\r
10//\r
11// The package level header files this module uses\r
12//\r
13#include <WinNtDxe.h>\r
14\r
15//\r
16// The protocols, PPI and GUID defintions for this module\r
17//\r
18#include <Protocol/ReportStatusCodeHandler.h>\r
19\r
20//\r
21// The Library classes this module consumes\r
22//\r
23#include <Library/DebugLib.h>\r
24#include <Library/UefiDriverEntryPoint.h>\r
25#include <Library/UefiBootServicesTableLib.h>\r
26#include <Library/OemHookStatusCodeLib.h>\r
27\r
28/**\r
29 Entry point of OEM hook status code handler driver.\r
30\r
31 This function is the entry point of this OEM hook status code handler driver.\r
32 It initializes registers OEM status code handler.\r
33\r
34 @param ImageHandle The firmware allocated handle for the EFI image.\r
35 @param SystemTable A pointer to the EFI System Table.\r
36 \r
37 @retval EFI_SUCCESS The entry point is executed successfully.\r
38\r
39**/\r
40EFI_STATUS\r
41EFIAPI\r
42WinNtOemHookStatusCodeHandlerDxeEntry (\r
43 IN EFI_HANDLE ImageHandle,\r
44 IN EFI_SYSTEM_TABLE *SystemTable\r
45 )\r
46{\r
47 EFI_STATUS Status;\r
48 EFI_RSC_HANDLER_PROTOCOL *RscHandlerProtocol;\r
49\r
50 Status = gBS->LocateProtocol (\r
51 &gEfiRscHandlerProtocolGuid,\r
52 NULL,\r
53 (VOID **) &RscHandlerProtocol\r
54 );\r
55 ASSERT_EFI_ERROR (Status);\r
56\r
57 OemHookStatusCodeInitialize ();\r
58\r
59 RscHandlerProtocol->Register (OemHookStatusCodeReport, TPL_HIGH_LEVEL);\r
60\r
61 return EFI_SUCCESS;\r
62}\r