v2 initial commit
This commit is contained in:
parent
2c97dba9f7
commit
d2ef885e8d
118 changed files with 2420 additions and 9320 deletions
44
amd64/include/drivers/apic.h
Normal file
44
amd64/include/drivers/apic.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _APIC_H_
|
||||
#define _APIC_H_
|
||||
|
||||
#define MADT_LAPIC 0
|
||||
#define MADT_IOAPIC 1
|
||||
#define MADT_IOAPIC_OVRD 2
|
||||
#define MADT_IOAPIC_NMI 3
|
||||
#define MADT_LAPIC_NMI 4
|
||||
#define MADT_LAPIC_OVRD 5
|
||||
#define MADT_X2_LAPIC 9
|
||||
|
||||
#define LAPIC_ID 0x20
|
||||
#define LAPIC_VERSION 0x30
|
||||
#define LAPIC_TPR 0x80
|
||||
#define LAPIC_APR 0x90
|
||||
#define LAPIC_PPR 0xA0
|
||||
#define LAPIC_EOI 0xB0
|
||||
#define LAPIC_RRD 0xC0
|
||||
#define LAPIC_LDR 0xD0
|
||||
#define LAPIC_DFR 0xE0
|
||||
#define LAPIC_SIVR 0xF0
|
||||
#define LAPIC_ISR 0x100
|
||||
#define LAPIC_TMR 0x180
|
||||
#define LAPIC_IRR 0x200
|
||||
#define LAPIC_ERR 0x280
|
||||
#define LAPIC_CMCI 0x2F0
|
||||
#define LAPIC_ICR 0x300
|
||||
#define LAPIC_THERMAL 0x330
|
||||
#define LAPIC_LVT_PERF_MON_COUNT 0x340
|
||||
#define LAPIC_LVT_LINT0 0x350
|
||||
#define LAPIC_LVT_LINT1 0x360
|
||||
#define LAPIC_LVT_ERR 0x370
|
||||
#define LAPIC_INIT_COUNT 0x380
|
||||
#define LAPIC_CUR_COUNT 0x390
|
||||
|
||||
#define LAPIC_TIMER 0x320
|
||||
#define LAPIC_TIMER_DIV 0x3E0
|
||||
#define LAPIC_TIMER_INIT_COUNT 0x380
|
||||
#define MSR_IA32_APIC_BASE 0x1B
|
||||
|
||||
void apic_init();
|
||||
|
||||
#endif /* _APIC_H_ */
|
||||
Loading…
Reference in a new issue