feat: implement core initialization and local APIC setup
This commit is contained in:
parent
ada1859910
commit
beb7fb38ae
19 changed files with 747 additions and 41 deletions
24
kernel/include/apic/lapic.h
Normal file
24
kernel/include/apic/lapic.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include "acpi/discovery.h"
|
||||
#include "util/number.h"
|
||||
|
||||
namespace apic {
|
||||
|
||||
using lapic_id_t = uint32_t;
|
||||
|
||||
void initLocalApic(const acpi::discovery_result_t& discovery);
|
||||
|
||||
lapic_id_t localApicId();
|
||||
|
||||
void sendInit(lapic_id_t destination);
|
||||
|
||||
// startup_page: physical address of the real-mode entry point divided by 4096;
|
||||
// must point below 1 MiB, so only values < 0x100 are meaningful.
|
||||
void sendStartup(lapic_id_t destination, uint8_t startup_page);
|
||||
|
||||
void sendInterrupt(lapic_id_t destination, uint8_t vector);
|
||||
|
||||
void signalEndOfInterrupt();
|
||||
|
||||
} // namespace apic
|
||||
Loading…
Add table
Add a link
Reference in a new issue