summaryrefslogtreecommitdiff
path: root/kernel/arch/x86_64/Processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/x86_64/Processor.h')
-rw-r--r--kernel/arch/x86_64/Processor.h31
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();