arch-x86: Fix CPUID for most recent GLIBC
This change makes the default vendor string AuthenticAMD. GLIBC now is much more strict about checking for the current system's supported features. In Ubuntu 22.04, when trying to load a dynamically linked file, the CPUID is checked for the required features. If they are not there, an error saying ISA level too low is returned and the program crashes. The underlying issue is that GLIBC does not check and populate the cpu_feature data structure if it does not detect a *known* CPU model. The options are hardcoded. See the following file for the glibc code. glibc/sysdeps/x86/cpu-features.c Note that the cpu_features is not populated with the COMMON_CPUID_INDEX_1 unless there is a known family, which is only set if the vendor string matches a known vendor. This change uses AuthenticAMD instead of the alternatives because the checks in glibc are most simple (no special cases) for AuthenticAMD in the init_cpu_features functions. GLIBC has been unable to populate the cpu_features datastructure correctly with gem5 for a long time. However, this has just now become a problem for us because the library now is more strict on not allowing code to execute unless the processor meets certain minimum requirements. I believe the commit for GLIBC which caused this breakage is ecce11aa0752735c4fd730da6e7c9e0b98e12fb8 See https://sourceware.org/pipermail/binutils/2020-October/113593.html for more details on that commit. Change-Id: I8eedb46f577361e749ad8d0adda4fd0753e99960 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64831 Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu> Maintainer: Bobby Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Bobby Bruce
parent
ebc2ad4165
commit
042d1433b9
@@ -43,5 +43,5 @@ class X86ISA(BaseISA):
|
||||
cxx_header = "arch/x86/isa.hh"
|
||||
|
||||
vendor_string = Param.String(
|
||||
"M5 Simulator", "Vendor string for CPUID instruction"
|
||||
"AuthenticAMD", "Vendor string for CPUID instruction"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user