Introduce a new property INCLUDE_PATHS. This property can used by customized build...
[mirror_edk2.git] / EdkNt32Pkg / Library / Nt32OemHookStatusCodeLib / Nt32OemHookStatusCodeLib.c
Content-type: text/html git.proxmox.com Git - mirror_edk2.git/blame - EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 6) line 1, <$fd> line 170.
CommitLineData
ba53dd4a 1/** @file\r
2 OEM hook status code library functions with no library constructor/destructor\r
3\r
4 Copyright (c) 2006, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Module Name: Nt32OemHookStatusCodeLib.c\r
14\r
15**/\r
16\r
17#include <stdio.h>\r
18\r
19//\r
20// Cache of WinNtThunk protocol \r
21// \r
22EFI_WIN_NT_THUNK_PROTOCOL *mWinNt;\r
23\r
24//\r
25// Cache of standard output handle . \r
26// \r
27HANDLE mStdOut;\r
28\r
29/**\r
30\r
31 Initialize OEM status code device .\r
32\r
33**/\r
34VOID\r
35EFIAPI\r
36OemHookStatusCodeInitialize (\r
37 VOID\r
38 )\r
39{\r
40 PEI_NT_THUNK_PPI *NtThunkPpi;\r
41 EFI_STATUS Status;\r
42\r
43 if (FeaturePcdGet (PcdNt32StatusCodeLibUseForPei)) {\r
44 //\r
45 // Locate NtThunkPpi for retrieving standard output handle\r
46 //\r
47 Status = PeiServicesLocatePpi (\r
48 &gPeiNtThunkPpiGuid,\r
49 0,\r
50 NULL,\r
51 (VOID **) &NtThunkPpi\r
52 );\r
53\r
54 ASSERT_EFI_ERROR (Status);\r
55\r
56 mWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *) NtThunkPpi->NtThunk ();\r
57 } else {\r
58 EFI_HOB_GUID_TYPE *GuidHob;\r
59\r
60 //\r
61 // Retrieve WinNtThunkProtocol from GUID'ed HOB\r
62 //\r
63 GuidHob = GetFirstGuidHob (&gEfiWinNtThunkProtocolGuid);\r
64 ASSERT (GuidHob != NULL);\r
65 mWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));\r
66 ASSERT (mWinNt != NULL);\r
67 }\r
68\r
69 //\r
70 // Cache standard output handle.\r
71 //\r
72 mStdOut = mWinNt->GetStdHandle (STD_OUTPUT_HANDLE);\r
73\r
74 return;\r
75}\r
76\r
77/**\r
78 Report status code to OEM device.\r
79 \r
80