MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / SetGate

Function SetGate

Kernel/src/arch/x86_64/idt.cpp:140–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 }
139
140 static void SetGate(uint8_t num, uint64_t base, uint16_t sel, uint8_t flags, uint8_t ist = 0) {
141 idt[num].base_high = (base >> 32);
142 idt[num].base_med = (base >> 16) & 0xFFFF;
143 idt[num].base_low = base & 0xFFFF;
144
145 idt[num].sel = sel;
146 idt[num].null = 0;
147 idt[num].ist = ist & 0x7; // Interrupt Stack Table (IST)
148
149 idt[num].flags = flags;
150 }
151
152 void Initialize() {
153 idt_ptr.limit = sizeof(idt_entry_t) * 256 - 1;

Callers 1

InitializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected