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.
26 IN OUT UINTN
*ReadSize
,
33 Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file
37 FileHandle - The handle to the PE/COFF file
39 FileOffset - The offset, in bytes, into the file to read
41 ReadSize - The number of bytes to read from the file starting at FileOffset
43 Buffer - A pointer to the buffer to read the data into.
47 EFI_SUCCESS - ReadSize bytes of data were read into Buffer from the PE/COFF file starting at FileOffset
55 Destination8
= Buffer
;
56 Source8
= (CHAR8
*) ((UINTN
) FileHandle
+ FileOffset
);
59 *(Destination8
++) = *(Source8
++);
66 GetImageReadFunction (
67 IN PE_COFF_LOADER_IMAGE_CONTEXT
*ImageContext
70 ImageContext
->ImageRead
= PeiImageRead
;