3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
27 PeCoffLoaderGetEntryPoint (
29 IN OUT VOID
**EntryPoint
35 Loads a PE/COFF image into memory
39 Pe32Data - Pointer to a PE/COFF Image
41 EntryPoint - Pointer to the entry point of the PE/COFF image
45 EFI_SUCCESS if the EntryPoint was returned
46 EFI_INVALID_PARAMETER if the EntryPoint could not be found from Pe32Data
51 EFI_PEI_PPI_DESCRIPTOR
*PpiDescriptor
;
52 NT_PEI_LOAD_FILE_PPI
*PeiNtService
;
53 EFI_PHYSICAL_ADDRESS ImageAddress
;
55 EFI_PHYSICAL_ADDRESS ImageEntryPoint
;
57 Status
= PeiServicesLocatePpi (
58 &gNtPeiLoadFilePpiGuid
,
63 if (EFI_ERROR (Status
)) {
67 Status
= PeiNtService
->PeiLoadFileService (
73 *EntryPoint
= (VOID
*)(UINTN
)ImageEntryPoint
;