Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
apic.h
Go to the documentation of this file.
1#ifndef __HAL__APIC__APIC_H__
2#define __HAL__APIC__APIC_H__
3
4#include <type.h>
5
6#define APIC_TPR 0x80
7#define APIC_DFR 0xE0
8#define APIC_LDR 0xD0
9#define APIC_SVR 0xF0
10#define APIC_EOI 0xB0
11#define APIC_ICR_LOW 0x300
12#define APIC_ICR_HIGH 0x310
13#define APIC_LOGIC_DEST 0xD0
14#define APIC_ARBITATION_PRIOR 0x090
15#define APIC_IRR 0x200
16#define APIC_IEA 0x480
17#define LVT_TIMER 0x320
18#define TIMER_INITIAL_COUNT 0x380
19#define TIMER_DIVIDE_CONFIG 0x3E0
20#define TIMER_CURRENT_COUNT 0x390
21#define APIC_TIMER_PERIOD (1 << 17)
22#define APIC_TIMER_ONE_SHOT (0 << 17)
23#define APIC_TIMER_DEADLINE (2 << 17)
24
25#define APIC_LVT_TMR 0x0320
26#define APIC_LVT_PERF 0x0340
27#define APIC_LVT_LINT0 0x0350
28#define APIC_LVT_LINT1 0x0360
29#define APIC_LVT_ERR 0x0370
30#define APIC_ESR 0x0280
31
32void apicInitialize();
33void apic_eoi();
38void vxAPICCreateDeadlineTimer(const uint8_t vector, const uint64_t freq_us);
39bool vxTSChasInvariant(void);
40
41#endif // __HAL__APIC__APIC_H__
void apic_send_ipi(uint8_t vector, uint8_t dest)
Definition apic.c:97
void vxAPICCreateTimer(uint32_t type, uint64_t freq_us, uint16_t vector)
Definition apic_timer.c:162
void vxAPICCreateDeadlineTimer(const uint8_t vector, const uint64_t freq_us)
Definition apic_timer.c:202
void apic_eoi()
Definition apic.c:102
void apicInitialize()
Definition apic.c:62
void apic_write(uint32_t reg, uint32_t value)
Definition apic.c:40
uint32_t apic_read(uint32_t reg)
Definition apic.c:49
bool vxTSChasInvariant(void)
Definition apic_timer.c:35
cpu_register_t reg
Definition thread.h:14
return value
Definition oct2bin.h:22
unsigned short uint16_t
Definition type.h:13
unsigned int uint32_t
Definition type.h:19
unsigned long uint64_t
Definition type.h:25
unsigned char uint8_t
Definition type.h:7
#define vector(T)
Definition vector.h:11
uint8_t type
Definition vnode.h:2