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 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include <Library/DebugLib.h>
19 #include <Library/PeimEntryPoint.h>
20 #include <Library/HobLib.h>
21 #include <Library/PeiServicesLib.h>
22 #include <Library/PeiServicesTablePointerLib.h>
24 #include <Ppi/EmuThunk.h>
25 #include <Protocol/EmuThunk.h>
31 PeiInitialzeThunkPpiToProtocolPei (
32 IN EFI_PEI_FILE_HANDLE FileHandle
,
33 IN CONST EFI_PEI_SERVICES
**PeiServices
39 Perform a call-back into the SEC simulator to get Unix Stuff
43 PeiServices - General purpose services available to every PEIM.
52 EFI_PEI_PPI_DESCRIPTOR
*PpiDescriptor
;
56 DEBUG ((EFI_D_ERROR
, "Emu Thunk PEIM Loaded\n"));
58 Status
= PeiServicesLocatePpi (
59 &gEmuThunkPpiGuid
, // GUID
61 &PpiDescriptor
, // EFI_PEI_PPI_DESCRIPTOR
62 (VOID
**)&Thunk
// PPI
64 ASSERT_EFI_ERROR (Status
);
66 Ptr
= Thunk
->Thunk ();
69 &gEmuThunkProtocolGuid
, // Guid
71 sizeof (VOID
*) // Sizeof Buffer