3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
12 Tiano PEIM to abstract construction of firmware volume in a Windows NT environment.
19 // The package level header files this module uses
22 #include <WinNtPeim.h>
24 // The protocols, PPI and GUID defintions for this module
26 #include <Protocol/WinNtThunk.h>
27 #include <Ppi/NtThunk.h>
29 // The Library classes this module consumes
31 #include <Library/DebugLib.h>
32 #include <Library/PeimEntryPoint.h>
33 #include <Library/HobLib.h>
37 PeimInitializeWinNtThunkPPIToProtocolPeim (
38 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
39 IN EFI_PEI_SERVICES
**PeiServices
45 Perform a call-back into the SEC simulator to get NT Stuff
49 PeiServices - General purpose services available to every PEIM.
56 // TODO: FfsHeader - add argument and description to function comment
59 EFI_PEI_PPI_DESCRIPTOR
*PpiDescriptor
;
60 PEI_NT_THUNK_PPI
*PeiNtService
;
63 DEBUG ((EFI_D_ERROR
, "NT 32 WinNT Stuff PEIM Loaded\n"));
65 Status
= (**PeiServices
).LocatePpi (
66 (const EFI_PEI_SERVICES
**)PeiServices
,
67 &gPeiNtThunkPpiGuid
, // GUID
69 &PpiDescriptor
, // EFI_PEI_PPI_DESCRIPTOR
70 (VOID
**)&PeiNtService
// PPI
72 ASSERT_EFI_ERROR (Status
);
74 Ptr
= PeiNtService
->NtThunk ();
77 &gEfiWinNtThunkProtocolGuid
, // Guid
79 sizeof (VOID
*) // Sizeof Buffer