about summary refs log tree commit diff stats
path: root/src/tools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-06-22 11:40:35 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-06-22 11:40:35 +0200
commitce30c1179ecfef615472f55561decc1df2696b1d (patch)
tree3d0b4ad6eb9357a20523956c02d4041ec65225cf /src/tools
parentcbb3126b28d2987fd1c2aeaf963a86ecb1ffcf4b (diff)
downloadbox64-ce30c1179ecfef615472f55561decc1df2696b1d.tar.gz
box64-ce30c1179ecfef615472f55561decc1df2696b1d.zip
Improved handling of cpuid leaf 0x80000006
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/my_cpuid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c
index 1656e269..6bbc6ab0 100644
--- a/src/tools/my_cpuid.c
+++ b/src/tools/my_cpuid.c
@@ -451,7 +451,7 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u)
         case 0x80000006:    // L2 cache line size and associativity
             R_EAX = 0;
             R_EBX = 0;
-            R_ECX = 0;
+            R_ECX = 64 | (0x6<<12) | (256<<16); // bits: 0-7 line size, 15-12: assoc (using special encoding), 31-16: size in K    //TODO: read info from /sys/devices/system/cpu/cpuX/cache/index2
             R_EDX = 0;
             break;
         case 0x80000007:    // Invariant TSC