summaryrefslogtreecommitdiff
path: root/kernel/arch/x86_64/Processor.h
blob: bc5a61abb67e459f479c4aa44906fe79bb27f31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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();