coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ioapic.h File Reference
#include <types.h>
Include dependency graph for ioapic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IO_APIC_ADDR   0xfec00000
 
#define VIO_APIC_VADDR   ((u8 *)IO_APIC_ADDR)
 
#define IO_APIC_INTERRUPTS   24
 
#define ALL   (0xff << 24)
 
#define NONE   (0)
 
#define INT_DISABLED   (1 << 16)
 
#define INT_ENABLED   (0 << 16)
 
#define TRIGGER_EDGE   (0 << 15)
 
#define TRIGGER_LEVEL   (1 << 15)
 
#define POLARITY_HIGH   (0 << 13)
 
#define POLARITY_LOW   (1 << 13)
 
#define PHYSICAL_DEST   (0 << 11)
 
#define LOGICAL_DEST   (1 << 11)
 
#define ExtINT   (7 << 8)
 
#define NMI   (4 << 8)
 
#define SMI   (2 << 8)
 
#define INT   (1 << 8)
 

Functions

u32 io_apic_read (void *ioapic_base, u32 reg)
 
void io_apic_write (void *ioapic_base, u32 reg, u32 value)
 
void set_ioapic_id (void *ioapic_base, u8 ioapic_id)
 
u8 get_ioapic_id (void *ioapic_base)
 
u8 get_ioapic_version (void *ioapic_base)
 
unsigned int ioapic_get_max_vectors (void *ioapic_base)
 
void ioapic_set_max_vectors (void *ioapic_base, int mre_count)
 
void ioapic_lock_max_vectors (void *ioapic_base)
 
void setup_ioapic (void *ioapic_base, u8 ioapic_id)
 
void ioapic_set_boot_config (void *ioapic_base, bool irq_on_fsb)
 

Macro Definition Documentation

◆ ALL

#define ALL   (0xff << 24)

Definition at line 14 of file ioapic.h.

◆ ExtINT

#define ExtINT   (7 << 8)

Definition at line 24 of file ioapic.h.

◆ INT

#define INT   (1 << 8)

Definition at line 27 of file ioapic.h.

◆ INT_DISABLED

#define INT_DISABLED   (1 << 16)

Definition at line 16 of file ioapic.h.

◆ INT_ENABLED

#define INT_ENABLED   (0 << 16)

Definition at line 17 of file ioapic.h.

◆ IO_APIC_ADDR

#define IO_APIC_ADDR   0xfec00000

Definition at line 6 of file ioapic.h.

◆ IO_APIC_INTERRUPTS

#define IO_APIC_INTERRUPTS   24

Definition at line 8 of file ioapic.h.

◆ LOGICAL_DEST

#define LOGICAL_DEST   (1 << 11)

Definition at line 23 of file ioapic.h.

◆ NMI

#define NMI   (4 << 8)

Definition at line 25 of file ioapic.h.

◆ NONE

#define NONE   (0)

Definition at line 15 of file ioapic.h.

◆ PHYSICAL_DEST

#define PHYSICAL_DEST   (0 << 11)

Definition at line 22 of file ioapic.h.

◆ POLARITY_HIGH

#define POLARITY_HIGH   (0 << 13)

Definition at line 20 of file ioapic.h.

◆ POLARITY_LOW

#define POLARITY_LOW   (1 << 13)

Definition at line 21 of file ioapic.h.

◆ SMI

#define SMI   (2 << 8)

Definition at line 26 of file ioapic.h.

◆ TRIGGER_EDGE

#define TRIGGER_EDGE   (0 << 15)

Definition at line 18 of file ioapic.h.

◆ TRIGGER_LEVEL

#define TRIGGER_LEVEL   (1 << 15)

Definition at line 19 of file ioapic.h.

◆ VIO_APIC_VADDR

#define VIO_APIC_VADDR   ((u8 *)IO_APIC_ADDR)

Definition at line 7 of file ioapic.h.

Function Documentation

◆ get_ioapic_id()

u8 get_ioapic_id ( void ioapic_base)

Definition at line 133 of file ioapic.c.

References io_apic_read().

Referenced by isa_init(), and smp_write_ioapic_from_hw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ioapic_version()

u8 get_ioapic_version ( void ioapic_base)

Definition at line 138 of file ioapic.c.

References io_apic_read().

Referenced by smp_write_ioapic_from_hw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_apic_read()

u32 io_apic_read ( void ioapic_base,
u32  reg 
)

Definition at line 9 of file ioapic.c.

References read32(), and write32().

Referenced by clear_vectors(), get_ioapic_id(), get_ioapic_version(), ioapic_get_max_vectors(), ioapic_set_boot_config(), ioapic_set_max_vectors(), route_i8259_irq0(), and set_ioapic_id().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_apic_write()

void io_apic_write ( void ioapic_base,
u32  reg,
u32  value 
)

Definition at line 15 of file ioapic.c.

References value, and write32().

Referenced by ioapic_set_boot_config(), ioapic_set_max_vectors(), set_ioapic_id(), and write_vector().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioapic_get_max_vectors()

unsigned int ioapic_get_max_vectors ( void ioapic_base)

Definition at line 32 of file ioapic.c.

References BIOS_DEBUG, count, io_apic_read(), and printk.

Referenced by setup_ioapic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioapic_lock_max_vectors()

void ioapic_lock_max_vectors ( void ioapic_base)

Definition at line 65 of file ioapic.c.

References ioapic_set_max_vectors().

Referenced by i82801ix_enable_apic(), i82801jx_enable_apic(), and pch_enable_ioapic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioapic_set_boot_config()

void ioapic_set_boot_config ( void ioapic_base,
bool  irq_on_fsb 
)

Definition at line 143 of file ioapic.c.

References BIOS_DEBUG, io_apic_read(), io_apic_write(), and printk.

Referenced by i82801dx_enable_ioapic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioapic_set_max_vectors()

void ioapic_set_max_vectors ( void ioapic_base,
int  mre_count 
)

Definition at line 51 of file ioapic.c.

References count, io_apic_read(), and io_apic_write().

Referenced by ioapic_lock_max_vectors(), and pch_enable_ioapic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_ioapic_id()

void set_ioapic_id ( void ioapic_base,
u8  ioapic_id 
)

Definition at line 111 of file ioapic.c.

References BIOS_DEBUG, BIOS_SPEW, io_apic_read(), io_apic_write(), and printk.

Referenced by setup_ioapic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_ioapic()

void setup_ioapic ( void ioapic_base,
u8  ioapic_id 
)