fix: set_idt_entry_value: bit shift

This commit is contained in:
Starnakin 2024-09-30 15:46:35 +02:00
parent 8b73e8850a
commit 5fe4d12c12

View File

@ -15,12 +15,12 @@ static void set_idt_entry_value(uint16_t *target, uint32_t offset,
target[3] = (offset >> 16) & 0xFFFF;
// Encode the presence
target[1] |= 1 << 16;
target[1] |= 1 << 15;
// Encode the CPU Privilege Levels
target[1] = (0b11 << 14) & dpl;
target[1] = (0b11 << 13) & dpl;
target[1] &= ~(1 << 13);
target[1] &= ~(1 << 12);
// Encode Gate Type
target[1] |= gate_type & 0x0F00;