From c0bf5aa9ab8205c5cf74356c3af6cbeb016765e6 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Fri, 18 Oct 2024 22:40:38 +0200 Subject: [PATCH 2/6] Do not error on unkown CPU Type and add Zen5 support Currently the Zen 5 CPU is an unknown CPU and prints an error in dmesg. Fix this with adding Zen5 support as well as change the print to a warning. Signed-off-by: Peter Jung --- src/nvidia/src/kernel/platform/cpu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nvidia/src/kernel/platform/cpu.c b/src/nvidia/src/kernel/platform/cpu.c index bb76a9c2..6832e77c 100644 --- a/src/nvidia/src/kernel/platform/cpu.c +++ b/src/nvidia/src/kernel/platform/cpu.c @@ -1401,12 +1401,14 @@ static void cpuidInfoAMD(OBJSYS *pSys, PCPUIDINFO pCpuidInfo) // Zen, Zen+, Zen 2 case 0x0A0: // Zen 3, Zen 4 + case 0x0B0: + // Zen 5 pSys->cpuInfo.type = NV0000_CTRL_SYSTEM_CPU_TYPE_RYZEN; break; default: - NV_PRINTF(LEVEL_ERROR, - "Unrecognized AMD processor in cpuidInfoAMD\n"); - pSys->cpuInfo.type = NV0000_CTRL_SYSTEM_CPU_TYPE_K8; + NV_PRINTF(LEVEL_NOTICE, + "Unrecognized AMD processor 0x%x in cpuidInfoAMD. Assuming new Ryzen\n", pCpuidInfo->Family); + pSys->cpuInfo.type = NV0000_CTRL_SYSTEM_CPU_TYPE_RYZEN; break; } } -- 2.47.0