23using namespace MaxOS::common;
24using namespace MaxOS::console;
25using namespace MaxOS::hardwarecommunication;
26using namespace MaxOS::processes;
27using namespace MaxOS::system;
28using namespace MaxOS::memory;
39 info->activated =
true;
43 ASSERT(info->id == core->id,
"Current setup core isn't the core expected");
44 Logger::DEBUG() <<
"Core " << core->id <<
" now in higher half \n";
61extern "C" [[noreturn]]
void kernel_main(
unsigned long addr,
unsigned long magic)
84 CPU cpu(&gdt, &multiboot);
A class that handles logging messages to the console and files.
static LogRecord DEBUG()
Gets the active logger for debug logs.
static LogRecord HEADER()
Gets the active logger for headers.
static LogRecord INFO()
Gets the active logger for info logs.
Handles the printing of characters and strings to the screen using a framebuffer.
void finish() const
Cleans up the boot console.
A driver for the serial output.
Driver for the APIC clock.
void calibrate(uint64_t ms_per_tick=1)
Configures the APIC clock to fire an interrupt at a specified interval in milliseconds.
Holds and instantiates the CPU exception handlers.
Handles all interrupts and passes them to the correct handler.
void activate()
Activates the interrupt manager and starts interrupts (also deactivates the current interrupt manager...
Handles memory allocation and deallocation.
Manages the physical memory of the system such as what pages are allocated/free and mapping of virtua...
Manages the virtual memory of the system and provides functions to allocate and free memory in the vi...
The global scheduler that manages all processes and threads across all cores.
static void activate()
Activates each core's scheduler.
Manages the CPU and its cores.
static void halt()
Halts the CPU indefinitely.
void init_cores()
Wake up all the cores.
hardwarecommunication::AdvancedProgrammableInterruptController apic
The APIC interface for the CPU.
static Core * executing_core()
Gets the core that is currently executing.
Sets up the GDT in the CPU.
Parses and provides access to Multiboot 2 information.
multiboot_tag_framebuffer * framebuffer()
Get the framebuffer tag.
Provides an API for userspace applications to interact with the kernel.
Defines drivers for the Programmable Interval Timer (PIT) and APIC Clock.
Defines Central Processing Unit (CPU) structures and functions for managing CPU state and features.
struct PACKED MaxOS::system::CoreBootInfo core_boot_info_t
Alias for CoreBootInfo struct.
Defines the VESABootConsole driver for handling console output during boot using an VESA framebuffer.
Defines a InterruptManager and InterruptHandler for managing hardware and software interrupts.
uint8_t core_boot_info[]
The boot info structure for the core being started.
void kernel_main(unsigned long addr, unsigned long magic)
The main kernel entry point. Initialises all core systems and starts the scheduler.
void call_constructors()
Calls the C++ static constructors.
void core_main()
The main entry point for secondary cores. Sets up the core and waits to be scheduled.
Defines a Logger class for logging messages with different severity levels to multiple output streams...
Defines a MemoryManager class for handling memory allocation and deallocation.
Defines a PhysicalMemoryManager class for managing physical memory allocation and deallocation of pag...
Defines a GlobalScheduler and Scheduler for managing processes and threads.
Defines a SerialConsole driver for serial output.
Defines the SyscallManager class for handling system calls from userspace applications.
Defines a VirtualMemoryManager class for managing virtual memory allocation and mapping to physical m...