]> git.proxmox.com Git - mirror_edk2.git/blame - EdkNt32Pkg/Pei/WinNtStuff/winntstuff.c
add a error macro to prevent this file from included for now #error "UEFI 2.1 HII...
[mirror_edk2.git] / EdkNt32Pkg / Pei / WinNtStuff / winntstuff.c
CommitLineData
878ddf1f 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\r
26EFI_STATUS\r
27EFIAPI\r
28PeimInitializeWinNtStuff (\r
29 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
30 IN EFI_PEI_SERVICES **PeiServices\r
31 )\r
32/*++\r
33\r
34Routine Description:\r
35\r
36 Perform a call-back into the SEC simulator to get NT Stuff\r
37\r
38Arguments:\r
39\r
40 PeiServices - General purpose services available to every PEIM.\r
41 \r
42Returns:\r
43\r
44 None\r
45\r
46--*/\r
47// TODO: FfsHeader - add argument and description to function comment\r
48{\r
49 EFI_STATUS Status;\r
50 EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r
51 PEI_NT_THUNK_PPI *PeiNtService;\r
52 VOID *Ptr;\r
53\r
54 DEBUG ((EFI_D_ERROR, "NT 32 WinNT Stuff PEIM Loaded\n"));\r
55\r
56 Status = (**PeiServices).LocatePpi (\r
57 PeiServices,\r
58 &gPeiNtThunkPpiGuid, // GUID\r
59 0, // INSTANCE\r
60 &PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR\r
61 &PeiNtService // PPI\r
62 );\r
63 ASSERT_EFI_ERROR (Status);\r
64\r
65 Ptr = PeiNtService->NtThunk ();\r
66\r
67 BuildGuidDataHob (\r
68 &gEfiWinNtThunkProtocolGuid, // Guid\r
69 &Ptr, // Buffer\r
70 sizeof (VOID *) // Sizeof Buffer\r
71 );\r
72 return Status;\r
73}\r