Print this page
XXXX pcplusmp & apix should use x2apic feature flag

*** 20,29 **** --- 20,32 ---- */ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + /* + * Copyright 2014 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + */ #include <sys/cpuvar.h> #include <sys/psm.h> #include <sys/archsystm.h> #include <sys/apic.h>
*** 92,102 **** * APIC register ops related data sturctures and functions. */ void apic_send_EOI(); void apic_send_directed_EOI(uint32_t irq); - #define X2APIC_CPUID_BIT 21 #define X2APIC_ENABLE_BIT 10 /* * Local APIC Implementation */ --- 95,104 ----
*** 231,249 **** } int apic_detect_x2apic(void) { - struct cpuid_regs cp; - if (x2apic_enable == 0) return (0); ! cp.cp_eax = 1; ! (void) __cpuid_insn(&cp); ! ! return ((cp.cp_ecx & (0x1 << X2APIC_CPUID_BIT)) ? 1 : 0); } void apic_enable_x2apic(void) { --- 233,246 ---- } int apic_detect_x2apic(void) { if (x2apic_enable == 0) return (0); ! return (is_x86_feature(x86_featureset, X86FSET_X2APIC)); } void apic_enable_x2apic(void) {