arch-arm: Fix Arch detection in FS if there is not bootloader
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 12 Mar 2020 15:45:33 +0000 (15:45 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 13 Mar 2020 10:26:53 +0000 (10:26 +0000)
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 <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26606
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/fs_workload.cc

index befba3a2d98c1f5805862d18f34608538c9f4c3a..ce9c464fed45bc3e38c3623ae5f74203d0ea85a6 100644 (file)
@@ -77,6 +77,8 @@ FsWorkload::FsWorkload(Params *p) : OsKernel(*p)
 
         entry = bootldr->entryPoint();
         _highestELIs64 = (bootldr->getArch() == ObjectFile::Arm64);
+    } else {
+        _highestELIs64 = (obj->getArch() == ObjectFile::Arm64);
     }
 }