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
|
|
@ -2,6 +2,28 @@
|
|||
|
||||
#include "memory/pointer.h"
|
||||
|
||||
#include "acpi/discovery.h"
|
||||
#include "memory/pagetable.h"
|
||||
|
||||
namespace apic {
|
||||
void startupCore(paddr_t code, paddr_t stack);
|
||||
}
|
||||
|
||||
struct stack_t {
|
||||
paddr_t ptr;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
using core_id = uint8_t;
|
||||
|
||||
struct Core {
|
||||
core_id id;
|
||||
stack_t stack;
|
||||
PageTable kernelPageTable;
|
||||
};
|
||||
|
||||
optional<Core> initCore(acpi::Madt madt, core_id id);
|
||||
|
||||
void initCores(acpi::discovery_result_t);
|
||||
|
||||
void transitionStartupCore();
|
||||
|
||||
} // namespace apic
|
||||
Loading…
Add table
Add a link
Reference in a new issue