[kernel] Make IDT per-cpu, not global
Since we modify IST entries while handling interrupts, the IDT cannot be a global data structure. Allocate new ones for each CPU.
This commit is contained in:
@@ -8,6 +8,9 @@ class IDT
|
||||
public:
|
||||
IDT();
|
||||
|
||||
/// Get the currently running CPU's IDT
|
||||
static IDT & current();
|
||||
|
||||
/// Install this IDT to the current CPU
|
||||
void install() const;
|
||||
|
||||
@@ -35,9 +38,6 @@ public:
|
||||
/// \arg index Which entry to print, or -1 for all entries
|
||||
void dump(unsigned index = -1) const;
|
||||
|
||||
/// Get the global IDT
|
||||
static IDT & get();
|
||||
|
||||
private:
|
||||
void set(uint8_t i, void (*handler)(), uint16_t selector, uint8_t flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user