10 #ifndef XTF_X86_APIC_H 11 #define XTF_X86_APIC_H 20 #define APIC_LVR 0x030 21 #define APIC_SPIV 0x0f0 22 #define APIC_SPIV_APIC_ENABLED 0x00100 24 #define APIC_ICR 0x300 25 #define APIC_DM_NMI 0x00400 26 #define APIC_ICR_BUSY 0x01000 27 #define APIC_DEST_SELF 0x40000 29 #define APIC_ICR2 0x310 31 #define APIC_DEFAULT_BASE 0xfee00000ul 69 asm volatile (
"rdmsr" :
"=a" (val)
77 asm volatile (
"wrmsr" ::
84 asm volatile (
"wrmsr" ::
Common declarations for all tests.
static uint32_t apic_mmio_read(unsigned int reg)
enum apic_mode cur_apic_mode
static void apic_msr_write(unsigned int reg, uint32_t val)
static void apic_write(unsigned int reg, uint32_t val)
static void apic_mmio_icr_write(uint64_t val)
static void apic_mmio_write(unsigned int reg, uint32_t val)
int apic_init(enum apic_mode mode)
Discover and initialise the local APIC to the requested mode.
static uint32_t apic_msr_read(unsigned int reg)
static void apic_icr_write(uint64_t val)
#define _p(v)
Express an abitrary integer v as void *.
static void apic_msr_icr_write(uint64_t val)
#define APIC_DEFAULT_BASE
static uint32_t apic_read(unsigned int reg)