/** * @file * Advanced Programmable Interrupt Controller * ========================================== * * The APIC consists of one (or more) IO-APIC and one LAPIC (Local APIC) * for each core. Currently we only support the, by far, most popular and * prevalent setup with a single IO-APIC. * * Please Call apic_init() once, providing an acpi_information structure, * before using the other functions. */ #include #include "acpi.h" /** run this before anything else */ void apic_init(acpi_information *info); /** setup io apic */ void ioapic_config(); /** get local apic id */ uint32_t apic_id(); /** send end-of-interrupt to local apic * It seems we need this for hardware interrupts and IPIs as well */ void apic_eoi(); /** send inter processor interrupt to destination and number */ void apic_ipi(uint8_t dest, uint8_t number); /** enable local apic */ void apic_enable(); /** set ticks per second for timer interrupt*/ void apic_init_timer(uint32_t ticks_per_second); /** startup other cpu * @param dest destination apic * @param addy entrypoint (example 0x7->0x7000 etc..) * */ void apic_sipi(uint32_t dest,uint32_t addy);