]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/Ia32/ImageRead.c
Replace .globl with ASM_GLOBAL
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / Ia32 / ImageRead.c
index bca3180aada568c6b6908f7c571032755a498dfe..9eca493c52fc23277b6bf7a428f35b55c3d169f6 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
@@ -14,10 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "DxeIpl.h"\r
 \r
-\r
-\r
-\r
-\r
 /**\r
   Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file\r
 \r
@@ -32,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 PeiImageRead (\r
   IN     VOID    *FileHandle,\r
   IN     UINTN   FileOffset,\r
@@ -50,8 +47,6 @@ PeiImageRead (
   //\r
   // This function assumes 32-bit alignment to increase performance\r
   //\r
-//  ASSERT (ALIGN_POINTER (Destination32, sizeof (UINT32)) == Destination32);\r
-//  ASSERT (ALIGN_POINTER (Source32, sizeof (UINT32)) == Source32);\r
 \r
   Length = *ReadSize;\r
   while (Length-- != 0) {\r
@@ -60,43 +55,3 @@ PeiImageRead (
 \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 return 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