mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Fix for the HWCAP2 aux vector.
The support assumed that if HWCAP2 is present that the system also supports ISA2.07. That assumption is not correct as we have found a few systems (OS) where the HWCAP2 entry is present but the ISA2.07 bit is not set. This patch fixes the assertion test to specifically check the ISA2.07 support bit setting in the HWCAP2 and vex_archinfo->hwcaps variable. The setting for the ISA2.07 support must be the same in both variables if the HWCAP2 entry exists. This patch updates Vagrind bugzilla 345695. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15257
This commit is contained in:
parent
9f67c29f8b
commit
d6beff654c
@ -704,10 +704,12 @@ Addr setup_client_stack( void* init_sp,
|
||||
# endif
|
||||
break;
|
||||
# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
||||
case AT_HWCAP2:
|
||||
/* The HWCAP2 value has the entry arch_2_07 which indicates the
|
||||
* processor is a Power 8 or beyond. The Valgrind vai.hwcaps
|
||||
* value (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
|
||||
case AT_HWCAP2: {
|
||||
Bool auxv_2_07, hw_caps_2_07;
|
||||
/* The HWCAP2 field may contain an arch_2_07 entry that indicates
|
||||
* if the processor is compliant with the 2.07 ISA. (i.e. Power 8
|
||||
* or beyond). The Valgrind vai.hwcaps value
|
||||
* (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
|
||||
* flag set so Valgrind knows about Power8. Need to pass the
|
||||
* HWCAP2 value along so the user level programs can detect that
|
||||
* the processor supports ISA 2.07 and beyond.
|
||||
@ -728,13 +730,15 @@ Addr setup_client_stack( void* init_sp,
|
||||
PPC_FEATURE2_HAS_TAR 0x04000000
|
||||
PPC_FEATURE2_HAS_VCRYPTO 0x02000000
|
||||
*/
|
||||
auxv_2_07 = (auxv->u.a_val & 0x80000000ULL) == 0x80000000ULL;
|
||||
hw_caps_2_07 = (vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07)
|
||||
== VEX_HWCAPS_PPC64_ISA2_07;
|
||||
|
||||
if ((auxv->u.a_val & ~(0x80000000ULL)) != 0) {
|
||||
/* Verify if PPC_FEATURE2_ARCH_2_07 is set in HWCAP2
|
||||
* that arch_2_07 is also set in VEX HWCAPS
|
||||
*/
|
||||
vg_assert((vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
|
||||
}
|
||||
/* Verify the PPC_FEATURE2_ARCH_2_07 setting in HWCAP2
|
||||
* matches the setting in VEX HWCAPS.
|
||||
*/
|
||||
vg_assert(auxv_2_07 == hw_caps_2_07);
|
||||
}
|
||||
|
||||
break;
|
||||
# endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user