From: Giacomo Travaglini Date: Thu, 12 Mar 2020 15:45:33 +0000 (+0000) Subject: arch-arm: Fix Arch detection in FS if there is not bootloader X-Git-Tag: v20.0.0.0~350 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3740b3bf98ca156b9252544aa30cf57d3e145a0;p=gem5.git arch-arm: Fix Arch detection in FS if there is not bootloader In case a workload is run with no bootloader we still want to be able to provide the simulation with the correct arch version. Without this patch every baremetal simulation will default to AArch64, which is the default value of ArmFsWorkload. Change-Id: I0f766167d8983cafc1fd30d054862339eb21f73f Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26606 Reviewed-by: Gabe Black Tested-by: kokoro --- diff --git a/src/arch/arm/fs_workload.cc b/src/arch/arm/fs_workload.cc index befba3a2d..ce9c464fe 100644 --- a/src/arch/arm/fs_workload.cc +++ b/src/arch/arm/fs_workload.cc @@ -77,6 +77,8 @@ FsWorkload::FsWorkload(Params *p) : OsKernel(*p) entry = bootldr->entryPoint(); _highestELIs64 = (bootldr->getArch() == ObjectFile::Arm64); + } else { + _highestELIs64 = (obj->getArch() == ObjectFile::Arm64); } }