Details
- Reviewers
kib - Commits
- rG2358492b0347: x86: Add zen identifier helper function
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/x86/include/x86_var.h | ||
|---|---|---|
| 135 ↗ | (On Diff #175179) | Will fix it before commit |
| sys/x86/x86/identcpu.c | ||
|---|---|---|
| 2730 | Can this be a table of {family, model_min, model_max} ? | |
| sys/x86/include/specialreg.h | ||
|---|---|---|
| 307 ↗ | (On Diff #175219) | The constants are not from CPUID. Pleae use some different namespace for them. I think just CPU_AMD_ZENx is fine. Also, specialreg.h is for the hardware registers definitions. Better to place them in some other place, might be machine/cpu.h. |
| sys/x86/x86/identcpu.c | ||
| 2730 | This requires the table to be sorted. At least, a comment is needed in the table herald. Can we scan the whole table? | |
This was also a requirement for https://reviews.freebsd.org/D56332 and should be useless now. However, amdtemp driver now hardcode this zen detection logic in the amdtemp.c file, we can use ident_zen_cpu to refactor the amdtemp code.
| sys/x86/include/specialreg.h | ||
|---|---|---|
| 307 ↗ | (On Diff #175219) | machine/cpu.h has i386 and amd64 variant. Can we put in x86/cputypes.h? |
| sys/x86/include/specialreg.h | ||
|---|---|---|
| 307 ↗ | (On Diff #175219) | Yes, and it looks even more appropriate than what I proposed. |
| sys/x86/include/x86_var.h | ||
|---|---|---|
| 135 ↗ | (On Diff #175179) | I still suggest to move the prototype to cputypes.h, perhaps under #ifdef _KERNEL. |
| sys/x86/include/cputypes.h | ||
|---|---|---|
| 54 | Emm, It breaks again. I will fix it before merging. | |