/** @file\r
This module loads an image to memory for IA32 Cpu architecture.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
PeiImageRead (\r
IN VOID *FileHandle,\r
IN UINTN FileOffset,\r
\r
return EFI_SUCCESS;\r
}\r
-\r
-\r
-\r
-\r
-\r
-/**\r
- This function simply retrieves the function pointer of ImageRead in\r
- ImageContext structure.\r
- \r
- @param ImageContext A pointer to the structure of \r
- PE_COFF_LOADER_IMAGE_CONTEXT\r
- \r
- @retval EFI_SUCCESS This function always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-GetImageReadFunction (\r
- IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
- )\r
-{\r
- VOID *MemoryBuffer;\r
-\r
- if (gInMemory) {\r
- ImageContext->ImageRead = PeiImageRead;\r
- return EFI_SUCCESS;\r
- }\r
-\r
- //\r
- // BugBug; This code assumes PeiImageRead() is less than a page in size!\r
- // Allocate a page so we can shaddow the read function from FLASH into \r
- // memory to increase performance. \r
- //\r
- \r
- MemoryBuffer = AllocateCopyPool (0x400, (VOID *)(UINTN) PeiImageRead);\r
- ASSERT (MemoryBuffer != NULL);\r
-\r
- ImageContext->ImageRead = (PE_COFF_LOADER_READ_FILE) (UINTN) MemoryBuffer;\r
-\r
- return EFI_SUCCESS;\r
-}\r