gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: arch-x86: Fix CPUID function 0

MP
Matthew Poremba (Gerrit)
Fri, May 19, 2023 6:42 PM

Matthew Poremba has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/70778?usp=email )

Change subject: arch-x86: Fix CPUID function 0
......................................................................

arch-x86: Fix CPUID function 0

This should return the number of standard features, not the number of
extended features.

Change-Id: Ieb3a36d832cee603f1efd39b4f430b5ac0478561

M src/arch/x86/cpuid.cc
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/arch/x86/cpuid.cc b/src/arch/x86/cpuid.cc
index 4ce66df..ac4709c 100644
--- a/src/arch/x86/cpuid.cc
+++ b/src/arch/x86/cpuid.cc
@@ -162,7 +162,7 @@
ISA *isa = dynamic_cast<ISA *>(tc->getIsaPtr());
auto vendor_string = isa->getVendorString();
result = CpuidResult(

  •                      NumExtendedCpuidFuncs - 1,
    
  •                      NumStandardCpuidFuncs - 1,
                          stringToRegister(vendor_string.c_str()),
                          stringToRegister(vendor_string.c_str() + 4),
                          stringToRegister(vendor_string.c_str() + 8));
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70778?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ieb3a36d832cee603f1efd39b4f430b5ac0478561
Gerrit-Change-Number: 70778
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba matthew.poremba@amd.com

Matthew Poremba has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/70778?usp=email ) Change subject: arch-x86: Fix CPUID function 0 ...................................................................... arch-x86: Fix CPUID function 0 This should return the number of standard features, not the number of extended features. Change-Id: Ieb3a36d832cee603f1efd39b4f430b5ac0478561 --- M src/arch/x86/cpuid.cc 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/cpuid.cc b/src/arch/x86/cpuid.cc index 4ce66df..ac4709c 100644 --- a/src/arch/x86/cpuid.cc +++ b/src/arch/x86/cpuid.cc @@ -162,7 +162,7 @@ ISA *isa = dynamic_cast<ISA *>(tc->getIsaPtr()); auto vendor_string = isa->getVendorString(); result = CpuidResult( - NumExtendedCpuidFuncs - 1, + NumStandardCpuidFuncs - 1, stringToRegister(vendor_string.c_str()), stringToRegister(vendor_string.c_str() + 4), stringToRegister(vendor_string.c_str() + 8)); -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/70778?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ieb3a36d832cee603f1efd39b4f430b5ac0478561 Gerrit-Change-Number: 70778 Gerrit-PatchSet: 1 Gerrit-Owner: Matthew Poremba <matthew.poremba@amd.com>