summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/GenFv/GenFvInternalLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/C/GenFv/GenFvInternalLib.c')
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index c8d5cac8e2..f466324d61 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -1655,8 +1655,8 @@ Returns:
if (
Vtf0Detected &&
- (MachineType == EFI_IMAGE_MACHINE_IA32 ||
- MachineType == EFI_IMAGE_MACHINE_X64)
+ (MachineType == IMAGE_FILE_MACHINE_I386 ||
+ MachineType == IMAGE_FILE_MACHINE_X64)
) {
//
// If the SEC core code is IA32 or X64 and the VTF-0 signature
@@ -1714,7 +1714,7 @@ Returns:
DebugMsg (NULL, 0, 9, "PeiCore physical entry point address", "Address = 0x%llX", (unsigned long long) PeiCorePhysicalAddress);
}
-if (MachineType == EFI_IMAGE_MACHINE_IA32 || MachineType == EFI_IMAGE_MACHINE_X64) {
+if (MachineType == IMAGE_FILE_MACHINE_I386 || MachineType == IMAGE_FILE_MACHINE_X64) {
if (PeiCorePhysicalAddress != 0) {
//
// Get the location to update
@@ -1804,12 +1804,12 @@ if (MachineType == EFI_IMAGE_MACHINE_IA32 || MachineType == EFI_IMAGE_MACHINE_X6
//
Ia32ResetAddressPtr = (UINT32 *) ((UINTN) FvImage->Eof - 8);
*Ia32ResetAddressPtr = IpiVector;
- } else if (MachineType == EFI_IMAGE_MACHINE_ARMT) {
+ } else if (MachineType == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) {
//
// Since the ARM reset vector is in the FV Header you really don't need a
// Volume Top File, but if you have one for some reason don't crash...
//
- } else if (MachineType == EFI_IMAGE_MACHINE_AARCH64) {
+ } else if (MachineType == IMAGE_FILE_MACHINE_ARM64) {
//
// Since the AArch64 reset vector is in the FV Header you really don't need a
// Volume Top File, but if you have one for some reason don't crash...
@@ -2204,7 +2204,7 @@ Returns:
return EFI_SUCCESS;
}
- if (MachineType == EFI_IMAGE_MACHINE_ARMT) {
+ if (MachineType == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) {
// ARM: Array of 4 UINT32s:
// 0 - is branch relative to SEC entry point
// 1 - PEI Entry Point
@@ -2258,7 +2258,7 @@ Returns:
//
memcpy(FvImage->FileImage, ResetVector, sizeof (ResetVector));
- } else if (MachineType == EFI_IMAGE_MACHINE_AARCH64) {
+ } else if (MachineType == IMAGE_FILE_MACHINE_ARM64) {
// AArch64: Used as UINT64 ResetVector[2]
// 0 - is branch relative to SEC entry point
// 1 - PEI Entry Point
@@ -2377,7 +2377,7 @@ Returns:
return EFI_ABORTED;
}
- if (MachineType != EFI_IMAGE_MACHINE_RISCV64) {
+ if (MachineType != IMAGE_FILE_MACHINE_RISCV64) {
Error(NULL, 0, 3000, "Invalid", "Could not update SEC core because Machine type is not RiscV.");
return EFI_ABORTED;
}
@@ -2478,7 +2478,7 @@ Returns:
if (!UpdateVectorSec)
return EFI_SUCCESS;
- if (MachineType == EFI_IMAGE_MACHINE_LOONGARCH64) {
+ if (MachineType == IMAGE_FILE_MACHINE_LOONGARCH64) {
UINT32 ResetVector[1];
memset(ResetVector, 0, sizeof (ResetVector));
@@ -2595,9 +2595,9 @@ Returns:
//
// Verify machine type is supported
//
- if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) &&
- (*MachineType != EFI_IMAGE_MACHINE_ARMT) && (*MachineType != EFI_IMAGE_MACHINE_AARCH64) &&
- (*MachineType != EFI_IMAGE_MACHINE_RISCV64) && (*MachineType != EFI_IMAGE_MACHINE_LOONGARCH64)) {
+ if ((*MachineType != IMAGE_FILE_MACHINE_I386) && (*MachineType != IMAGE_FILE_MACHINE_X64) && (*MachineType != IMAGE_FILE_MACHINE_EBC) &&
+ (*MachineType != IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) && (*MachineType != IMAGE_FILE_MACHINE_ARM64) &&
+ (*MachineType != IMAGE_FILE_MACHINE_RISCV64) && (*MachineType != IMAGE_FILE_MACHINE_LOONGARCH64)) {
Error (NULL, 0, 3000, "Invalid", "Unrecognized machine type in the PE32 file.");
return EFI_UNSUPPORTED;
}
@@ -3547,13 +3547,13 @@ Returns:
}
// machine type is ARM, set a flag so ARM reset vector processing occurs
- if ((MachineType == EFI_IMAGE_MACHINE_ARMT) || (MachineType == EFI_IMAGE_MACHINE_AARCH64)) {
+ if ((MachineType == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) || (MachineType == IMAGE_FILE_MACHINE_ARM64)) {
VerboseMsg("Located ARM/AArch64 SEC/PEI core in child FV");
mArm = TRUE;
}
// Machine type is LOONGARCH64, set a flag so LoongArch64 reset vector processed.
- if (MachineType == EFI_IMAGE_MACHINE_LOONGARCH64) {
+ if (MachineType == IMAGE_FILE_MACHINE_LOONGARCH64) {
VerboseMsg("Located LoongArch64 SEC core in child FV");
mLoongArch = TRUE;
}
@@ -3706,16 +3706,16 @@ Returns:
return Status;
}
- if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_ARMT) ||
- (ImageContext.Machine == EFI_IMAGE_MACHINE_AARCH64) ) {
+ if ( (ImageContext.Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) ||
+ (ImageContext.Machine == IMAGE_FILE_MACHINE_ARM64) ) {
mArm = TRUE;
}
- if (ImageContext.Machine == EFI_IMAGE_MACHINE_RISCV64) {
+ if (ImageContext.Machine == IMAGE_FILE_MACHINE_RISCV64) {
mRiscV = TRUE;
}
- if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {
+ if (ImageContext.Machine == IMAGE_FILE_MACHINE_LOONGARCH64) {
mLoongArch = TRUE;
}
@@ -3991,12 +3991,12 @@ Returns:
return Status;
}
- if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_ARMT) ||
- (ImageContext.Machine == EFI_IMAGE_MACHINE_AARCH64) ) {
+ if ( (ImageContext.Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) ||
+ (ImageContext.Machine == IMAGE_FILE_MACHINE_ARM64) ) {
mArm = TRUE;
}
- if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {
+ if (ImageContext.Machine == IMAGE_FILE_MACHINE_LOONGARCH64) {
mLoongArch = TRUE;
}