diff options
| author | Arseney300 <Arseney300@gmail.com> | 2026-04-11 17:48:52 +0700 |
|---|---|---|
| committer | Arseney300 <Arseney300@gmail.com> | 2026-04-11 17:48:52 +0700 |
| commit | 496246c92dabe6757480147016490ea6ae43bb66 (patch) | |
| tree | cb922a0b1569410db44f6da17862b7e949df9fad /kernel/arch/x86_64/Processor.h | |
| parent | 2f95320e0859029f520d46f777591751dcd39634 (diff) | |
Kernel: main singleton object, that provide access to core kernel
entities
Processor: empty class, that will be used later for per-CPU entities
AcpiTables: class for acpi access (can be obtained through the kernel
object)
DeviceTree: class for dt access (can be obtained through the kernel
object)
Diffstat (limited to 'kernel/arch/x86_64/Processor.h')
| -rw-r--r-- | kernel/arch/x86_64/Processor.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kernel/arch/x86_64/Processor.h b/kernel/arch/x86_64/Processor.h new file mode 100644 index 0000000..bc5a61a --- /dev/null +++ b/kernel/arch/x86_64/Processor.h @@ -0,0 +1,31 @@ +#pragma once +// ============================================================================ +// arch/x86_64/Processor.h - x86_64 per-CPU state +// +// ============================================================================ + +#include <stdint.h> +#include <kernel/types.h> + +struct BootInfo; + +class Processor { +public: + void InitEarly(const BootInfo& boot_info); + + // Phase 2 will add: + // void* GetGdtPointer() const; + // void* GetIdtPointer() const; + // PhysAddr GetLapicBase() const; + // PhysAddr GetIoapicBase() const; + // PhysAddr GetCr3() const; + + Processor() = default; + Processor(const Processor&) = delete; + Processor& operator=(const Processor&) = delete; + +private: + // Phase 2: gdt, idt, lapic_base, ioapic_base, cr3... +}; + +Processor& processor(); |
