|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#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) |
| #define APIC_DFR 0xE0 |
Definition at line 7 of file apic.h.
Referenced by apicInitialize().
| #define APIC_EOI 0xB0 |
Definition at line 10 of file apic.h.
Referenced by apic_eoi(), and apicInitialize().
| #define APIC_ESR 0x0280 |
Definition at line 30 of file apic.h.
Referenced by apicInitialize().
| #define APIC_ICR_HIGH 0x310 |
Definition at line 12 of file apic.h.
Referenced by apic_send_ipi(), and sipi_sequential().
| #define APIC_ICR_LOW 0x300 |
Definition at line 11 of file apic.h.
Referenced by apic_send_ipi(), and sipi_sequential().
| #define APIC_LVT_ERR 0x0370 |
Definition at line 29 of file apic.h.
Referenced by apicInitialize().
| #define APIC_LVT_LINT0 0x0350 |
Definition at line 27 of file apic.h.
Referenced by apicInitialize().
| #define APIC_LVT_LINT1 0x0360 |
Definition at line 28 of file apic.h.
Referenced by apicInitialize().
| #define APIC_LVT_PERF 0x0340 |
Definition at line 26 of file apic.h.
Referenced by apicInitialize().
| #define APIC_LVT_TMR 0x0320 |
Definition at line 25 of file apic.h.
Referenced by apicInitialize().
| #define APIC_SVR 0xF0 |
Definition at line 9 of file apic.h.
Referenced by apicInitialize().
| #define APIC_TIMER_DEADLINE (2 << 17) |
Definition at line 23 of file apic.h.
Referenced by vxAPICCreateDeadlineTimer().
| #define APIC_TIMER_ONE_SHOT (0 << 17) |
Definition at line 22 of file apic.h.
Referenced by usleep(), vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().
| #define APIC_TIMER_PERIOD (1 << 17) |
Definition at line 21 of file apic.h.
Referenced by __attribute__(), vxAPICCreateTimer(), and vxStartScheduler().
| #define APIC_TPR 0x80 |
Definition at line 6 of file apic.h.
Referenced by apicInitialize().
| #define LVT_TIMER 0x320 |
Definition at line 17 of file apic.h.
Referenced by vxAPICCreateDeadlineTimer(), vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().
| #define TIMER_CURRENT_COUNT 0x390 |
Definition at line 20 of file apic.h.
Referenced by vxAPICTimerCalibrationUsingHPET().
| #define TIMER_DIVIDE_CONFIG 0x3E0 |
Definition at line 19 of file apic.h.
Referenced by vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().
| #define TIMER_INITIAL_COUNT 0x380 |
Definition at line 18 of file apic.h.
Referenced by vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().
| void apic_eoi | ( | ) |
Definition at line 102 of file apic.c.
References APIC_EOI, and apic_write().
Referenced by __attribute__().
Definition at line 49 of file apic.c.
References lapic_base_addr, mmio_inl(), reg, vxRDMSR(), and x2_apic_supported.
Referenced by apicInitialize(), sipi_sequential(), vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().
Definition at line 97 of file apic.c.
References APIC_ICR_HIGH, APIC_ICR_LOW, apic_write(), and vector.
Definition at line 40 of file apic.c.
References lapic_base_addr, mmio_outl(), reg, value, vxWRSR(), and x2_apic_supported.
Referenced by apic_eoi(), apic_send_ipi(), apicInitialize(), sipi_sequential(), vxAPICCreateDeadlineTimer(), vxAPICCreateTimer(), and vxAPICTimerCalibrationUsingHPET().
| void apicInitialize | ( | ) |
Definition at line 62 of file apic.c.
References APIC_DFR, APIC_EOI, APIC_ESR, APIC_LVT_ERR, APIC_LVT_LINT0, APIC_LVT_LINT1, APIC_LVT_PERF, APIC_LVT_TMR, apic_read(), APIC_SVR, APIC_TPR, apic_write(), cpuid(), enable_x2apic(), LOG_DEBUG, update_core_gs(), vxRDMSR(), and x2_apic_supported.
Referenced by __attribute__(), and parsing_madt().
Definition at line 202 of file apic_timer.c.
References APIC_TIMER_DEADLINE, apic_write(), calibrated_tsmc_freq_1ms, LVT_TIMER, vector, vxAPICReadTSC(), and vxWRSR().
Definition at line 162 of file apic_timer.c.
References apic_read(), APIC_TIMER_MASKED, APIC_TIMER_ONE_SHOT, APIC_TIMER_PERIOD, apic_write(), calibrated_ticks_1ns, count, LOG_ERROR, LOG_WARN, LVT_TIMER, TIMER_DIVIDE_CONFIG, TIMER_INITIAL_COUNT, type, and vector.
Referenced by __attribute__(), usleep(), and vxStartScheduler().
| bool vxTSChasInvariant | ( | void | ) |
Definition at line 35 of file apic_timer.c.
References cpuid().