coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ioapic.c File Reference
#include <assert.h>
#include <device/mmio.h>
#include <arch/ioapic.h>
#include <console/console.h>
#include <cpu/x86/lapic.h>
Include dependency graph for ioapic.c:

Go to the source code of this file.

Functions

u32 io_apic_read (void *ioapic_base, u32 reg)
 
void io_apic_write (void *ioapic_base, u32 reg, u32 value)
 
static void write_vector (void *ioapic_base, u8 vector, u32 high, u32 low)
 
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)
 
static void clear_vectors (void *ioapic_base, u8 first, u8 last)
 
static void route_i8259_irq0 (void *ioapic_base)
 
void set_ioapic_id (void *ioapic_base, u8 ioapic_id)
 
u8 get_ioapic_id (void *ioapic_base)
 
u8 get_ioapic_version (void *ioapic_base)
 
void ioapic_set_boot_config (void *ioapic_base, bool irq_on_fsb)
 
void setup_ioapic (void *ioapic_base, u8 ioapic_id)
 

Function Documentation

◆ clear_vectors()

static void clear_vectors ( void ioapic_base,
u8  first,
u8  last 
)
static

Definition at line 70 of file ioapic.c.

References BIOS_DEBUG, BIOS_WARNING, INT_DISABLED, io_apic_read(), NONE, printk, and write_vector().

Referenced by setup_ioapic().

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

◆ 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:

◆ route_i8259_irq0()

static void route_i8259_irq0 ( void ioapic_base)
static

Definition at line 89 of file ioapic.c.

References ASSERT, BIOS_DEBUG, BIOS_WARNING, ExtINT, INT_ENABLED, io_apic_read(), lapicid(), PHYSICAL_DEST, POLARITY_HIGH, printk, TRIGGER_EDGE, and write_vector().

Referenced by setup_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 
)

◆ write_vector()

static void write_vector ( void ioapic_base,
u8  vector,
u32  high,
u32  low 
)
static

Definition at line 21 of file ioapic.c.

References BIOS_SPEW, io_apic_write(), and printk.

Referenced by clear_vectors(), and route_i8259_irq0().

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