Skip to content

Commit

Permalink
nvidia: Add patch to fix Zen5 Error Printing
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Jung <[email protected]>
  • Loading branch information
ptr1337 committed Aug 21, 2024
1 parent ff75efb commit 9200ed5
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 6.10/misc/nvidia/fix-zen5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- /src/nvidia/src/kernel/platform/cpu.c Thu Aug 1 16:06:02 2024
+++ /src/nvidia/src/kernel/platform/cpu.c Mon Aug 19 18:26:55 2024
@@ -1400,12 +1400,14 @@
// 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;
}
}
20 changes: 20 additions & 0 deletions 6.11/misc/nvidia/fix-zen5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- /src/nvidia/src/kernel/platform/cpu.c Thu Aug 1 16:06:02 2024
+++ /src/nvidia/src/kernel/platform/cpu.c Mon Aug 19 18:26:55 2024
@@ -1400,12 +1400,14 @@
// 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;
}
}
20 changes: 20 additions & 0 deletions 6.6/misc/nvidia/fix-zen5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- /src/nvidia/src/kernel/platform/cpu.c Thu Aug 1 16:06:02 2024
+++ /src/nvidia/src/kernel/platform/cpu.c Mon Aug 19 18:26:55 2024
@@ -1400,12 +1400,14 @@
// 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;
}
}
20 changes: 20 additions & 0 deletions 6.9/misc/nvidia/fix-zen5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- /src/nvidia/src/kernel/platform/cpu.c Thu Aug 1 16:06:02 2024
+++ /src/nvidia/src/kernel/platform/cpu.c Mon Aug 19 18:26:55 2024
@@ -1400,12 +1400,14 @@
// 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;
}
}

0 comments on commit 9200ed5

Please sign in to comment.