From 2f1902f6e554f6bc36b5a3e4cf8add8c3e5197cc Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 13 Jul 2025 17:32:20 -0400 Subject: kernel/amd64: Get CPU family + model The CPU family ID and model number are sometimes useful in order to detect the presence of certain CPU features as well as detecting CPU specific quirks. Signed-off-by: Ian Moffett --- sys/include/arch/amd64/cpu.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/include') diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index 46e5df7..a5f09fb 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -45,6 +45,8 @@ struct cpu_info { uint32_t apicid; uint32_t feat; + uint8_t model : 4; /* CPU model number */ + uint8_t family : 4; /* CPU family ID */ uint8_t has_x2apic : 1; uint8_t tlb_shootdown : 1; uint8_t ipl; -- cgit v1.2.3