]>
Commit | Line | Data |
---|---|---|
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 HT |
5 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r |
6 | This program and the accompanying materials\r | |
25126a05 | 7 | are licensed and made available under the terms and conditions of the BSD License\r |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | //\r | |
17 | // The package level header files this module uses\r | |
18 | //\r | |
19 | #include <WinNtDxe.h>\r | |
20 | \r | |
21 | //\r | |
22 | // The protocols, PPI and GUID defintions for this module\r | |
23 | //\r | |
24 | #include <Protocol/ReportStatusCodeHandler.h>\r | |
25 | \r | |
26 | //\r | |
27 | // The Library classes this module consumes\r | |
28 | //\r | |
29 | #include <Library/DebugLib.h>\r | |
30 | #include <Library/UefiDriverEntryPoint.h>\r | |
31 | #include <Library/UefiBootServicesTableLib.h>\r | |
32 | #include <Library/OemHookStatusCodeLib.h>\r | |
33 | \r | |
34 | /**\r | |
35 | Entry point of OEM hook status code handler driver.\r | |
36 | \r | |
37 | This function is the entry point of this OEM hook status code handler driver.\r | |
38 | It initializes registers OEM status code handler.\r | |
39 | \r | |
40 | @param ImageHandle The firmware allocated handle for the EFI image.\r | |
41 | @param SystemTable A pointer to the EFI System Table.\r | |
42 | \r | |
43 | @retval EFI_SUCCESS The entry point is executed successfully.\r | |
44 | \r | |
45 | **/\r | |
46 | EFI_STATUS\r | |
47 | EFIAPI\r | |
48 | WinNtOemHookStatusCodeHandlerDxeEntry (\r | |
49 | IN EFI_HANDLE ImageHandle,\r | |
50 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
51 | )\r | |
52 | {\r | |
53 | EFI_STATUS Status;\r | |
54 | EFI_RSC_HANDLER_PROTOCOL *RscHandlerProtocol;\r | |
55 | \r | |
56 | Status = gBS->LocateProtocol (\r | |
57 | &gEfiRscHandlerProtocolGuid,\r | |
58 | NULL,\r | |
59 | (VOID **) &RscHandlerProtocol\r | |
60 | );\r | |
61 | ASSERT_EFI_ERROR (Status);\r | |
62 | \r | |
63 | OemHookStatusCodeInitialize ();\r | |
64 | \r | |
65 | RscHandlerProtocol->Register (OemHookStatusCodeReport, TPL_HIGH_LEVEL);\r | |
66 | \r | |
67 | return EFI_SUCCESS;\r | |
68 | }\r |