MOS Source Code
Loading...
Searching...
No Matches
ioapic.c File Reference
+ Include dependency graph for ioapic.c:

Go to the source code of this file.

Classes

struct  ioapic_redirection_entry_t
 

Macros

#define IOAPIC_REG_ID   0x00
 
#define IOAPIC_REG_VERSION   0x01
 
#define IOAPIC_REG_ARB_ID   0x02
 
#define IOAPIC_REG_REDIR_TABLE(n)
 

Functions

 MOS_STATIC_ASSERT (sizeof(ioapic_redirection_entry_t)==sizeof(u64), "ioapic_register_1 is not 64 bits")
 
should_inline u32 ioapic_read (u32 reg)
 
should_inline void ioapic_write (u32 reg, u32 value)
 
should_inline void ioapic_write_redirection_entry (u32 irq, ioapic_redirection_entry_t entry)
 
should_inline ioapic_redirection_entry_t ioapic_read_redirection_entry (u32 irq)
 
void ioapic_init (void)
 
void ioapic_enable_with_mode (u32 irq, u32 lapic_id, ioapic_trigger_mode_t trigger_mode, ioapic_polarity_t polarity)
 
void ioapic_disable (u32 irq)
 

Variables

static u32 volatile * ioapic = NULL
 

Macro Definition Documentation

◆ IOAPIC_REG_ID

#define IOAPIC_REG_ID   0x00

Definition at line 28 of file ioapic.c.

Referenced by ioapic_init().

◆ IOAPIC_REG_VERSION

#define IOAPIC_REG_VERSION   0x01

Definition at line 29 of file ioapic.c.

Referenced by ioapic_init().

◆ IOAPIC_REG_ARB_ID

#define IOAPIC_REG_ARB_ID   0x02

Definition at line 30 of file ioapic.c.

Referenced by ioapic_init().

◆ IOAPIC_REG_REDIR_TABLE

#define IOAPIC_REG_REDIR_TABLE ( n)
Value:
(0x10 + 2 * (n))

Definition at line 31 of file ioapic.c.

Referenced by ioapic_read_redirection_entry(), and ioapic_write_redirection_entry().

Function Documentation

◆ MOS_STATIC_ASSERT()

MOS_STATIC_ASSERT ( sizeof(ioapic_redirection_entry_t) = =sizeof(u64),
"ioapic_register_1 is not 64 bits"  )

◆ ioapic_read()

should_inline u32 ioapic_read ( u32 reg)

Definition at line 55 of file ioapic.c.

Referenced by ioapic_init(), and ioapic_read_redirection_entry().

◆ ioapic_write()

should_inline void ioapic_write ( u32 reg,
u32 value )

Definition at line 61 of file ioapic.c.

Referenced by ioapic_write_redirection_entry().

◆ ioapic_write_redirection_entry()

should_inline void ioapic_write_redirection_entry ( u32 irq,
ioapic_redirection_entry_t entry )

Definition at line 67 of file ioapic.c.

Referenced by ioapic_disable(), and ioapic_enable_with_mode().

+ Here is the call graph for this function:

◆ ioapic_read_redirection_entry()

should_inline ioapic_redirection_entry_t ioapic_read_redirection_entry ( u32 irq)

Definition at line 79 of file ioapic.c.

+ Here is the call graph for this function:

◆ ioapic_init()

void ioapic_init ( void )

Definition at line 93 of file ioapic.c.

Referenced by platform_startup_late().

+ Here is the call graph for this function:

◆ ioapic_enable_with_mode()

void ioapic_enable_with_mode ( u32 irq,
u32 lapic_id,
ioapic_trigger_mode_t trigger_mode,
ioapic_polarity_t polarity )

Definition at line 125 of file ioapic.c.

Referenced by ioapic_enable_interrupt().

+ Here is the call graph for this function:

◆ ioapic_disable()

void ioapic_disable ( u32 irq)

Definition at line 139 of file ioapic.c.

Referenced by ioapic_init().

+ Here is the call graph for this function:

Variable Documentation

◆ ioapic

u32 volatile* ioapic = NULL
static

Definition at line 53 of file ioapic.c.

Referenced by ioapic_init(), ioapic_read(), ioapic_write(), and madt_parse_table().