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 void cpu_set_apic_tpr(DeviceState *s, uint8_t val); 14 uint8_t cpu_get_apic_tpr(DeviceState *s); 15 void apic_init_reset(DeviceState *s); 16 void apic_sipi(DeviceState *s); 17 void apic_poll_irq(DeviceState *d); 18 void apic_designate_bsp(DeviceState *d, bool bsp); 19 int apic_get_highest_priority_irr(DeviceState *dev); 20 int apic_msr_read(int index, uint64_t *val); 21 int apic_msr_write(int index, uint64_t val); 22 bool is_x2apic_mode(DeviceState *d); 23 24 /* pc.c */ 25 DeviceState *cpu_get_current_apic(void); 26 27 #endif 28