From 23b28e59e8a4922252415f0a44497d7471fce942 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 12 Oct 2025 15:25:51 -0400 Subject: kern/amd64: Identify processor vendor in mdcore Signed-off-by: Ian Moffett --- src/sys/include/arch/amd64/mdcpu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/sys/include/arch') diff --git a/src/sys/include/arch/amd64/mdcpu.h b/src/sys/include/arch/amd64/mdcpu.h index ddc0da2..8701a61 100644 --- a/src/sys/include/arch/amd64/mdcpu.h +++ b/src/sys/include/arch/amd64/mdcpu.h @@ -42,12 +42,17 @@ #define md_inton() __ASMV("sti") #define md_halt() __ASMV("hlt") +#define CPU_VENDOR_OTHER 0x00 +#define CPU_VENDOR_AMD 0x01 +#define CPU_VENDOR_INTEL 0x02 + /* * Represents the machine dependent information * of a processor core on the machine. * * @apic_id: Local APIC ID * @cr3: CR3 register value (PML phys) + * @vendor: Processor vendor (CPU_VENDOR_*) * @lapic_base: LAPIC register interface base * @x2apic: Has the x2APIC? Is 1 if true * @tss: Task state segment for this core @@ -58,6 +63,7 @@ struct mdcore { uint32_t apic_id; uint64_t cr3; + uint8_t vendor; void *lapic_base; uint8_t x2apic : 1; struct tss_entry tss; -- cgit v1.2.3