]> git.proxmox.com Git - mirror_edk2.git/blame - Nt32Pkg/WinNtThunkPPIToProtocolPei/WinNtThunkPPIToProtocol.c
Remove the EDK prefix from library instance folder's name
[mirror_edk2.git] / Nt32Pkg / WinNtThunkPPIToProtocolPei / WinNtThunkPPIToProtocol.c
CommitLineData
66f0059f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 WinNtStuff.c\r
15 \r
16Abstract:\r
17\r
18 Tiano PEIM to abstract construction of firmware volume in a Windows NT environment.\r
19\r
20Revision History\r
21\r
22--*/\r
23\r
24//\r
25// The package level header files this module uses\r
26//\r
27#include <PiPei.h>\r
28#include <WinNtPeim.h>\r
29//\r
30// The protocols, PPI and GUID defintions for this module\r
31//\r
32#include <Protocol/WinNtThunk.h>\r
33#include <Ppi/NtThunk.h>\r
34//\r
35// The Library classes this module consumes\r
36//\r
37#include <Library/DebugLib.h>\r
38#include <Library/PeimEntryPoint.h>\r
39#include <Library/HobLib.h>\r
40\r
41EFI_STATUS\r
42EFIAPI\r
43PeimInitializeWinNtThunkPPIToProtocolPeim (\r
44 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
45 IN EFI_PEI_SERVICES **PeiServices\r
46 )\r
47/*++\r
48\r
49Routine Description:\r
50\r
51 Perform a call-back into the SEC simulator to get NT Stuff\r
52\r
53Arguments:\r
54\r
55 PeiServices - General purpose services available to every PEIM.\r
56 \r
57Returns:\r
58\r
59 None\r
60\r
61--*/\r
62// TODO: FfsHeader - add argument and description to function comment\r
63{\r
64 EFI_STATUS Status;\r
65 EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r
66 PEI_NT_THUNK_PPI *PeiNtService;\r
67 VOID *Ptr;\r
68\r
69 DEBUG ((EFI_D_ERROR, "NT 32 WinNT Stuff PEIM Loaded\n"));\r
70\r
71 Status = (**PeiServices).LocatePpi (\r
72 PeiServices,\r
73 &gPeiNtThunkPpiGuid, // GUID\r
74 0, // INSTANCE\r
75 &PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR\r
76 &PeiNtService // PPI\r
77 );\r
78 ASSERT_EFI_ERROR (Status);\r
79\r
80 Ptr = PeiNtService->NtThunk ();\r
81\r
82 BuildGuidDataHob (\r
83 &gEfiWinNtThunkProtocolGuid, // Guid\r
84 &Ptr, // Buffer\r
85 sizeof (VOID *) // Sizeof Buffer\r
86 );\r
87 return Status;\r
88}\r