summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorJose Marinho <jose.marinho@arm.com>2021-10-29 17:48:26 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-08-08 22:43:51 +0000
commit1ee162281710650d444c554f9fdbbd404abd9677 (patch)
treedd611b5276a4c1b13543211eac2cdd57e48458ad /BaseTools/Source
parentcf02322c984a16fc2af252124df96564e574f3a7 (diff)
downloadedk2-1ee162281710650d444c554f9fdbbd404abd9677.tar.gz
edk2-1ee162281710650d444c554f9fdbbd404abd9677.tar.bz2
edk2-1ee162281710650d444c554f9fdbbd404abd9677.zip
Basetools/GenFw: Allow AARCH64 builds to use the --prm flag
The GenFw invocation with the --prm flag was previously reserved for X64. AArch64 platforms, built with GCC5, can also deploy PRM modules, hence the --prm flag is also applicable in builds targeting the AARCH64 architecture. This commit enables the --prm flag to be used for EDK2 builds targeting AARCH64. Signed-off-by: Jose Marinho <jose.marinho@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/C/GenFw/Elf64Convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2aa9bfcc94..35e96dd05b 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -2,7 +2,7 @@
Elf64 convert solution
Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
+Portions copyright (c) 2013-2022, ARM Ltd. All rights reserved.<BR>
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -186,8 +186,8 @@ InitializeElf64 (
}
if (mExportFlag) {
- if (mEhdr->e_machine != EM_X86_64) {
- Error (NULL, 0, 3000, "Unsupported", "--prm option currently only supports X64 arch.");
+ if ((mEhdr->e_machine != EM_X86_64) && (mEhdr->e_machine != EM_AARCH64)) {
+ Error (NULL, 0, 3000, "Unsupported", "--prm option currently only supports X64 and AArch64 archs.");
return FALSE;
}
}