diff options
Diffstat (limited to 'src/arch/x86/ioapic.c')
-rw-r--r-- | src/arch/x86/ioapic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c index c148534351..dc88de1a8e 100644 --- a/src/arch/x86/ioapic.c +++ b/src/arch/x86/ioapic.c @@ -109,6 +109,16 @@ void set_ioapic_id(void *ioapic_base, u8 ioapic_id) } +u8 get_ioapic_id(void *ioapic_base) +{ + return (io_apic_read(ioapic_base, 0x00) >> 24) & 0x0f; +} + +u8 get_ioapic_version(void *ioapic_base) +{ + return io_apic_read(ioapic_base, 0x01) & 0xff; +} + void setup_ioapic_helper(void *ioapic_base, u8 ioapic_id, bool irq_on_fsb, bool enable_virtual_wire) { |