]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenFv/GenFvInternalLib.c
BaseTools: Remove unused logic from C tools
[mirror_edk2.git] / BaseTools / Source / C / GenFv / GenFvInternalLib.c
index 32bbcce0a6469f7832960e34cff0322686ce0db3..4d0339e1f9c0e64720164df33264c62deb6eb47f 100644 (file)
@@ -905,15 +905,7 @@ Returns:
     fprintf (FvMapFile, "BaseAddress=0x%010llx, ", (unsigned long long) (ImageBaseAddress + Offset));\r
   }\r
 \r
-  if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE && pImageContext->Machine == EFI_IMAGE_MACHINE_IA64) {\r
-    //\r
-    // Process IPF PLABEL to get the real address after the image has been rebased.\r
-    // PLABEL structure is got by AddressOfEntryPoint offset to ImageBuffer stored in pImageContext->Handle.\r
-    //\r
-    fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (*(UINT64 *)((UINTN) pImageContext->Handle + (UINTN) AddressOfEntryPoint)));\r
-  } else {\r
-    fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));\r
-  }\r
+  fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));\r
   fprintf (FvMapFile, ")\n");\r
 \r
   fprintf (FvMapFile, "(GUID=%s", FileGuidName);\r
@@ -1541,7 +1533,6 @@ Returns:
   UINT16                    MachineType;\r
   EFI_PHYSICAL_ADDRESS      PeiCorePhysicalAddress;\r
   EFI_PHYSICAL_ADDRESS      SecCorePhysicalAddress;\r
-  EFI_PHYSICAL_ADDRESS      *SecCoreEntryAddressPtr;\r
   INT32                     Ia32SecEntryOffset;\r
   UINT32                    *Ia32ResetAddressPtr;\r
   UINT8                     *BytePointer;\r
@@ -1551,8 +1542,6 @@ Returns:
   UINT32                    IpiVector;\r
   UINTN                     Index;\r
   EFI_FFS_FILE_STATE        SavedState;\r
-  UINT64                    FitAddress;\r
-  FIT_TABLE                 *FitTablePtr;\r
   BOOLEAN                   Vtf0Detected;\r
   UINT32                    FfsHeaderSize;\r
   UINT32                    SecHeaderSize;\r
@@ -1692,62 +1681,7 @@ Returns:
     DebugMsg (NULL, 0, 9, "PeiCore physical entry point address", "Address = 0x%llX", (unsigned long long) PeiCorePhysicalAddress);\r
   }\r
 \r
-  if (MachineType == EFI_IMAGE_MACHINE_IA64) {\r
-    //\r
-    // Update PEI_CORE address\r
-    //\r
-    //\r
-    // Set the uncached attribute bit in the physical address\r
-    //\r
-    PeiCorePhysicalAddress |= 0x8000000000000000ULL;\r
-\r
-    //\r
-    // Check if address is aligned on a 16 byte boundary\r
-    //\r
-    if (PeiCorePhysicalAddress & 0xF) {\r
-      Error (NULL, 0, 3000, "Invalid",\r
-        "PEI_CORE entry point is not aligned on a 16 byte boundary, address specified is %llXh.",\r
-        (unsigned long long) PeiCorePhysicalAddress\r
-        );\r
-      return EFI_ABORTED;\r
-    }\r
-    //\r
-    // First Get the FIT table address\r
-    //\r
-    FitAddress  = (*(UINT64 *) (FvImage->Eof - IPF_FIT_ADDRESS_OFFSET)) & 0xFFFFFFFF;\r
-\r
-    FitTablePtr = (FIT_TABLE *) (FvImage->FileImage + (FitAddress - FvInfo->BaseAddress));\r
-\r
-    Status      = UpdatePeiCoreEntryInFit (FitTablePtr, PeiCorePhysicalAddress);\r
-\r
-    if (!EFI_ERROR (Status)) {\r
-      UpdateFitCheckSum (FitTablePtr);\r
-    }\r
-\r
-    //\r
-    // Update SEC_CORE address\r
-    //\r
-    //\r
-    // Set the uncached attribute bit in the physical address\r
-    //\r
-    SecCorePhysicalAddress |= 0x8000000000000000ULL;\r
-    //\r
-    // Check if address is aligned on a 16 byte boundary\r
-    //\r
-    if (SecCorePhysicalAddress & 0xF) {\r
-      Error (NULL, 0, 3000, "Invalid",\r
-        "SALE_ENTRY entry point is not aligned on a 16 byte boundary, address specified is %llXh.",\r
-        (unsigned long long) SecCorePhysicalAddress\r
-        );\r
-      return EFI_ABORTED;\r
-    }\r
-    //\r
-    // Update the address\r
-    //\r
-    SecCoreEntryAddressPtr  = (EFI_PHYSICAL_ADDRESS *) ((UINTN) FvImage->Eof - IPF_SALE_ENTRY_ADDRESS_OFFSET);\r
-    *SecCoreEntryAddressPtr = SecCorePhysicalAddress;\r
-\r
-  } else if (MachineType == EFI_IMAGE_MACHINE_IA32 || MachineType == EFI_IMAGE_MACHINE_X64) {\r
+if (MachineType == EFI_IMAGE_MACHINE_IA32 || MachineType == EFI_IMAGE_MACHINE_X64) {\r
     if (PeiCorePhysicalAddress != 0) {\r
       //\r
       // Get the location to update\r
@@ -2436,7 +2370,7 @@ Returns:
   //\r
   // Verify machine type is supported\r
   //\r
-  if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != EFI_IMAGE_MACHINE_IA64) && (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) &&\r
+  if ((*MachineType != EFI_IMAGE_MACHINE_IA32) &&  (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) &&\r
       (*MachineType != EFI_IMAGE_MACHINE_ARMT) && (*MachineType != EFI_IMAGE_MACHINE_AARCH64)) {\r
     Error (NULL, 0, 3000, "Invalid", "Unrecognized machine type in the PE32 file.");\r
     return EFI_UNSUPPORTED;\r