From a6714dabc7277855aeada5ca842522b32a32e814 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Fri, 30 Apr 2021 22:57:15 +0200 Subject: [PATCH] [0.97] Do not count "L4" cache when computing the max cache level --- src/x86/apic.c | 1 + src/x86/cpuid.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/x86/apic.c b/src/x86/apic.c index 12c4a62..186b236 100644 --- a/src/x86/apic.c +++ b/src/x86/apic.c @@ -232,6 +232,7 @@ bool build_topo_from_apic(uint32_t* apic_pkg, uint32_t* apic_smt, uint32_t** cac if(apic_id[c] > 0) num_caches++; } + printf("[i=%d]: %p\n", i, (void *) topo->cach->cach_arr[i]); topo->cach->cach_arr[i]->num_caches = num_caches; } diff --git a/src/x86/cpuid.c b/src/x86/cpuid.c index e2ba364..cc16cb3 100644 --- a/src/x86/cpuid.c +++ b/src/x86/cpuid.c @@ -581,6 +581,7 @@ struct cache* get_cache_info_general(struct cache* cach, uint32_t level) { } else { printWarn("Found unknown unified cache at level %d (size is %d bytes)", cache_level, cache_total_size); + cach->max_cache_level--; } break;