sim-se: Different HWCAP for ArmProcess32/64
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 20 Sep 2018 11:39:36 +0000 (12:39 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 2 Oct 2018 21:12:01 +0000 (21:12 +0000)
commit6efe7e1abf9d289859eb23b52b3a319f15f2736a
treeea1e35d7cffd54255c905d9c0e83520ef14eaf1a
parent352d666fa1e9b5ae960127c95d19cf63c8ff0df7
sim-se: Different HWCAP for ArmProcess32/64

AArch32 and AArch64 have different HWCAP flags in Linux, but we are
currently using AArch32 HWCAP flags to initialize the aux vector of both
AArch32 and AArch64 binaries.

This patch also fixes a bug that was introduced by running in SE mode a
target binary compiled with glibc > 2.18. Using AArch32 flags
resulted on CPUID flag being set for AArch64. This incorrectly tells
libc that emulation of the midr_el1 is supported.
In FullSystem this might work, but since we are in Syscall Emulation
there is no OS behind emulating the mrs midr_el1 instruction.

By separating AArch32 flags from AArch64 flags we are turning off the
CPUID hwcap flag in SE mode.

Change-Id: I9f651957ba9d19dc2bc06606de070c6586f0f9fa
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/12884
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
src/arch/arm/process.cc
src/arch/arm/process.hh