Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57305 )
Change subject: arch/x86: Skip returning default leaf value as `0` ......................................................................
arch/x86: Skip returning default leaf value as `0`
`cpu_get_cache_info_leaf()` function is responsible to report leaf value for CPU that have support for deterministic cache cpuid. As per available datasheets from AMD and Intel the supported CPUID leaf are 0x8000_001d for AMD and 0x04 for Intel. Hence, this CL skip returning default leaf value as `0`.
Change-Id: Iee33b39298e7821ac5280d998172b58a70c8715b Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/arch/x86/cpu_common.c 1 file changed, 2 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/57305/1
diff --git a/src/arch/x86/cpu_common.c b/src/arch/x86/cpu_common.c index 835cddd6..390dbef 100644 --- a/src/arch/x86/cpu_common.c +++ b/src/arch/x86/cpu_common.c @@ -109,14 +109,10 @@
static uint32_t cpu_get_cache_info_leaf(void) { - switch (cpu_check_deterministic_cache_cpuid_supported()) { - case CPUID_TYPE_AMD: + if (cpu_check_deterministic_cache_cpuid_supported() == CPUID_TYPE_AMD) return DETERMINISTIC_CACHE_PARAMETERS_CPUID_AMD; - case CPUID_TYPE_INTEL: + else return DETERMINISTIC_CACHE_PARAMETERS_CPUID_IA; - default: - return 0; - } }
size_t cpu_get_cache_ways_assoc_info(const struct cpu_cache_info *info)