Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
apic.h File Reference
#include <type.h>

Go to the source code of this file.

Macros

#define APIC_TPR   0x80
 
#define APIC_DFR   0xE0
 
#define APIC_LDR   0xD0
 
#define APIC_SVR   0xF0
 
#define APIC_EOI   0xB0
 
#define APIC_ICR_LOW   0x300
 
#define APIC_ICR_HIGH   0x310
 
#define APIC_LOGIC_DEST   0xD0
 
#define APIC_ARBITATION_PRIOR   0x090
 
#define APIC_IRR   0x200
 
#define APIC_IEA   0x480
 
#define LVT_TIMER   0x320
 
#define TIMER_INITIAL_COUNT   0x380
 
#define TIMER_DIVIDE_CONFIG   0x3E0
 
#define TIMER_CURRENT_COUNT   0x390
 
#define APIC_TIMER_PERIOD   (1 << 17)
 
#define APIC_TIMER_ONE_SHOT   (0 << 17)
 
#define APIC_TIMER_DEADLINE   (2 << 17)
 
#define APIC_LVT_TMR   0x0320
 
#define APIC_LVT_PERF   0x0340
 
#define APIC_LVT_LINT0   0x0350
 
#define APIC_LVT_LINT1   0x0360
 
#define APIC_LVT_ERR   0x0370
 
#define APIC_ESR   0x0280
 

Functions

void apicInitialize ()
 
void apic_eoi ()
 
void apic_write (uint32_t reg, uint32_t value)
 
uint32_t apic_read (uint32_t reg)
 
void apic_send_ipi (uint8_t vector, uint8_t dest)
 
void vxAPICCreateTimer (uint32_t type, uint64_t freq_us, uint16_t vector)
 
void vxAPICCreateDeadlineTimer (const uint8_t vector, const uint64_t freq_us)
 
bool vxTSChasInvariant (void)
 

Macro Definition Documentation

◆ APIC_ARBITATION_PRIOR

#define APIC_ARBITATION_PRIOR   0x090

Definition at line 14 of file apic.h.

◆ APIC_DFR

#define APIC_DFR   0xE0

Definition at line 7 of file apic.h.

Referenced by apicInitialize().

◆ APIC_EOI

#define APIC_EOI   0xB0

Definition at line 10 of file apic.h.

Referenced by apic_eoi(), and apicInitialize().

◆ APIC_ESR

#define APIC_ESR   0x0280

Definition at line 30 of file apic.h.

Referenced by apicInitialize().

◆ APIC_ICR_HIGH

#define APIC_ICR_HIGH   0x310

Definition at line 12 of file apic.h.

Referenced by apic_send_ipi(), and sipi_sequential().

◆ APIC_ICR_LOW

#define APIC_ICR_LOW   0x300

Definition at line 11 of file apic.h.

Referenced by apic_send_ipi(), and sipi_sequential().

◆ APIC_IEA

#define APIC_IEA   0x480

Definition at line 16 of file apic.h.

◆ APIC_IRR

#define APIC_IRR   0x200

Definition at line 15 of file apic.h.

◆ APIC_LDR

#define APIC_LDR   0xD0

Definition at line 8 of file apic.h.

◆ APIC_LOGIC_DEST

#define APIC_LOGIC_DEST   0xD0

Definition at line 13 of file apic.h.

◆ APIC_LVT_ERR

#define APIC_LVT_ERR   0x0370

Definition at line 29 of file apic.h.

Referenced by apicInitialize().

◆ APIC_LVT_LINT0

#define APIC_LVT_LINT0   0x0350

Definition at line 27 of file apic.h.

Referenced by apicInitialize().

◆ APIC_LVT_LINT1

#define APIC_LVT_LINT1   0x0360

Definition at line 28 of file apic.h.

Referenced by apicInitialize().

◆ APIC_LVT_PERF

#define APIC_LVT_PERF   0x0340

Definition at line 26 of file apic.h.

Referenced by apicInitialize().

◆ APIC_LVT_TMR

#define APIC_LVT_TMR   0x0320

Definition at line 25 of file apic.h.

Referenced by apicInitialize().

◆ APIC_SVR

#define APIC_SVR   0xF0

Definition at line 9 of file apic.h.

Referenced by apicInitialize().

◆ APIC_TIMER_DEADLINE

#define APIC_TIMER_DEADLINE   (2 << 17)

Definition at line 23 of file apic.h.

Referenced by vxAPICCreateDeadlineTimer().

◆ APIC_TIMER_ONE_SHOT

#define APIC_TIMER_ONE_SHOT   (0 << 17)

Definition at line 22 of file apic.h.

Referenced by usleep(), vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().

◆ APIC_TIMER_PERIOD

#define APIC_TIMER_PERIOD   (1 << 17)

Definition at line 21 of file apic.h.

Referenced by __attribute__(), vxAPICCreateTimer(), and vxStartScheduler().

◆ APIC_TPR

#define APIC_TPR   0x80

Definition at line 6 of file apic.h.

Referenced by apicInitialize().

◆ LVT_TIMER

#define LVT_TIMER   0x320

◆ TIMER_CURRENT_COUNT

#define TIMER_CURRENT_COUNT   0x390

Definition at line 20 of file apic.h.

Referenced by vxAPICTimerCalibrationUsingHPET().

◆ TIMER_DIVIDE_CONFIG

#define TIMER_DIVIDE_CONFIG   0x3E0

Definition at line 19 of file apic.h.

Referenced by vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().

◆ TIMER_INITIAL_COUNT

#define TIMER_INITIAL_COUNT   0x380

Definition at line 18 of file apic.h.

Referenced by vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().

Function Documentation

◆ apic_eoi()

void apic_eoi ( )

Definition at line 102 of file apic.c.

References APIC_EOI, and apic_write().

Referenced by __attribute__().

◆ apic_read()

◆ apic_send_ipi()

void apic_send_ipi ( uint8_t vector,
uint8_t dest )

Definition at line 97 of file apic.c.

References APIC_ICR_HIGH, APIC_ICR_LOW, apic_write(), and vector.

◆ apic_write()

◆ apicInitialize()

◆ vxAPICCreateDeadlineTimer()

void vxAPICCreateDeadlineTimer ( const uint8_t vector,
const uint64_t freq_us )

◆ vxAPICCreateTimer()

◆ vxTSChasInvariant()

bool vxTSChasInvariant ( void )

Definition at line 35 of file apic_timer.c.

References cpuid().