blob: 2c76379a91bfd45786ee9805e5a89082698d8fdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/**
* @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 <stdint.h>
#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
* @dest destination apic
* @addy entrypoint (example 0x7->0x7000 etc..)
* */
void apic_sipi(uint32_t dest,uint32_t addy);
|