[MODERN FEATURES] Enable APIC
This commit is contained in:
11
kernel/include/apic.h
Normal file
11
kernel/include/apic.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
void apic_init();
|
||||
void apic_interrupt(uint8_t destination, uint8_t level, uint8_t type, uint8_t vector);
|
||||
void apic_ack();
|
||||
#define APIC_INT_LEVEL_ASSERT 0x1
|
||||
#define APIC_INT_LEVEL_DEASSERT 0x0
|
||||
#define APIC_INT_TYPE_FIXED 0x0
|
||||
#define APIC_INT_TYPE_INIT 0x5
|
||||
#define APIC_INT_TYPE_STARTUP 0x6
|
||||
@@ -58,6 +58,14 @@
|
||||
#define INT_IRQ22 0x36
|
||||
#define INT_IRQ23 0x37
|
||||
|
||||
#define INT_APIC_TIMER 0x40
|
||||
#define INT_APIC_THERMAL 0x41
|
||||
#define INT_APIC_PERF 0x42
|
||||
#define INT_APIC_LINT0 0x43
|
||||
#define INT_APIC_LINT1 0x44
|
||||
#define INT_APIC_ERROR 0x45
|
||||
#define INT_APIC_SPUR 0xFF
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user