2 UEFI/PI PEIM to abstract construction of firmware volume in a Unix environment.
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include <Library/DebugLib.h>
13 #include <Library/PeimEntryPoint.h>
14 #include <Library/HobLib.h>
15 #include <Library/PeiServicesLib.h>
16 #include <Library/PeiServicesTablePointerLib.h>
18 #include <Ppi/EmuThunk.h>
19 #include <Protocol/EmuThunk.h>
23 PeiInitialzeThunkPpiToProtocolPei (
24 IN EFI_PEI_FILE_HANDLE FileHandle
,
25 IN CONST EFI_PEI_SERVICES
**PeiServices
32 Perform a call-back into the SEC simulator to get Unix Stuff
36 PeiServices - General purpose services available to every PEIM.
45 EFI_PEI_PPI_DESCRIPTOR
*PpiDescriptor
;
49 DEBUG ((DEBUG_ERROR
, "Emu Thunk PEIM Loaded\n"));
51 Status
= PeiServicesLocatePpi (
52 &gEmuThunkPpiGuid
, // GUID
54 &PpiDescriptor
, // EFI_PEI_PPI_DESCRIPTOR
55 (VOID
**)&Thunk
// PPI
57 ASSERT_EFI_ERROR (Status
);
59 Ptr
= Thunk
->Thunk ();
62 &gEmuThunkProtocolGuid
, // Guid
64 sizeof (VOID
*) // Sizeof Buffer