mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 09:19:02 +00:00
8debf8cc3c
Since the BSP bit is writable on real hardware, during reset all the CPUs which were not chosen to be the BSP should have their BSP bit cleared. This fix is required for KVM to work correctly when it changes the BSP bit. An additional fix is required for QEMU tcg to allow software to change the BSP bit. Backports commit 9cb11fd7539b5b787d8fb3834004804a58dd16ae from qemu
29 lines
979 B
C
29 lines
979 B
C
#ifndef APIC_H
|
|
#define APIC_H
|
|
|
|
#include "qemu-common.h"
|
|
|
|
/* apic.c */
|
|
int apic_accept_pic_intr(DeviceState *s);
|
|
int apic_get_interrupt(DeviceState *s);
|
|
void cpu_set_apic_base(struct uc_struct *uc, DeviceState *s, uint64_t val);
|
|
uint64_t cpu_get_apic_base(struct uc_struct *uc, DeviceState *s);
|
|
void cpu_set_apic_tpr(struct uc_struct *uc, DeviceState *s, uint8_t val);
|
|
uint8_t cpu_get_apic_tpr(struct uc_struct *uc, DeviceState *s);
|
|
void apic_init_reset(struct uc_struct *uc, DeviceState *s);
|
|
void apic_sipi(DeviceState *s);
|
|
void apic_handle_tpr_access_report(DeviceState *d, target_ulong ip,
|
|
TPRAccess access);
|
|
void apic_poll_irq(DeviceState *d);
|
|
void apic_designate_bsp(struct uc_struct *uc, DeviceState *d, bool bsp);
|
|
|
|
/* pc.c */
|
|
DeviceState *cpu_get_current_apic(struct uc_struct *uc);
|
|
|
|
/* cpu.c */
|
|
bool cpu_is_bsp(X86CPU *cpu);
|
|
|
|
void apic_register_types(struct uc_struct *uc);
|
|
void apic_common_register_types(struct uc_struct *uc);
|
|
|
|
#endif
|