From 7b392afb14358649173437fe435859ce7887cba6 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 6 May 2023 15:32:04 +0200 Subject: x86_64: Add CPU_TYPE_X86_64 CPU type --- i386/i386at/model_dep.c | 4 ++++ include/mach/machine.h | 1 + 2 files changed, 5 insertions(+) diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index f40a6169..491915da 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -549,6 +549,9 @@ void c_boot_entry(vm_offset_t bi) machine_slot[0].is_cpu = TRUE; machine_slot[0].cpu_subtype = CPU_SUBTYPE_AT386; +#ifdef __x86_64__ + machine_slot[0].cpu_type = CPU_TYPE_X86_64; +#else switch (cpu_type) { default: @@ -567,6 +570,7 @@ void c_boot_entry(vm_offset_t bi) machine_slot[0].cpu_type = CPU_TYPE_PENTIUMPRO; break; } +#endif /* * Start the system. diff --git a/include/mach/machine.h b/include/mach/machine.h index b696d4b5..9a176e8c 100644 --- a/include/mach/machine.h +++ b/include/mach/machine.h @@ -109,6 +109,7 @@ extern struct machine_slot machine_slot[NCPUS]; #define CPU_TYPE_PENTIUM ((cpu_type_t) 18) #define CPU_TYPE_PENTIUMPRO ((cpu_type_t) 19) #define CPU_TYPE_POWERPC ((cpu_type_t) 20) +#define CPU_TYPE_X86_64 ((cpu_type_t) 21) /* * Machine subtypes (these are defined here, instead of in a machine -- cgit v1.2.3