1 #ifndef APIC_H 2 #define APIC_H 3 4 5 /* apic.c */ 6 void apic_set_max_apic_id(uint32_t max_apic_id); 7 int apic_accept_pic_intr(DeviceState *s); 8 void apic_deliver_pic_intr(DeviceState *s, int level); 9 void apic_deliver_nmi(DeviceState *d); 10 int apic_get_interrupt(DeviceState *s); 11 int cpu_set_apic_base(DeviceState *s, uint64_t val); 12 uint64_t cpu_get_apic_base(DeviceState *s); 13 bool cpu_is_apic_enabled(DeviceState *s); 14 void cpu_set_apic_tpr(DeviceState *s, uint8_t val); 15 uint8_t cpu_get_apic_tpr(DeviceState *s); 16 void apic_init_reset(DeviceState *s); 17 void apic_sipi(DeviceState *s); 18 void apic_poll_irq(DeviceState *d); 19 void apic_designate_bsp(DeviceState *d, bool bsp); 20 int apic_get_highest_priority_irr(DeviceState *dev); 21 int apic_msr_read(int index, uint64_t *val); 22 int apic_msr_write(int index, uint64_t val); 23 bool is_x2apic_mode(DeviceState *d); 24 25 /* pc.c */ 26 DeviceState *cpu_get_current_apic(void); 27 28 #endif 29