diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-12 15:25:51 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-12 15:25:51 -0400 |
commit | 23b28e59e8a4922252415f0a44497d7471fce942 (patch) | |
tree | 774988aba8d4a8a1ffabcce03b7893e7d9d214b9 /src/sys/include/arch/amd64 | |
parent | ddd6a604857e3d2501fdc7cdef0b722d5520e4dd (diff) |
kern/amd64: Identify processor vendor in mdcore
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/arch/amd64')
-rw-r--r-- | src/sys/include/arch/amd64/mdcpu.h | 6 |
1 files changed, 6 insertions, 0 deletions
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<n> 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; |