24 lines
569 B
C++
24 lines
569 B
C++
#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
|