fix: set_idt_entry_value: bit shift
This commit is contained in:
parent
8b73e8850a
commit
5fe4d12c12
@ -15,12 +15,12 @@ static void set_idt_entry_value(uint16_t *target, uint32_t offset,
|
|||||||
target[3] = (offset >> 16) & 0xFFFF;
|
target[3] = (offset >> 16) & 0xFFFF;
|
||||||
|
|
||||||
// Encode the presence
|
// Encode the presence
|
||||||
target[1] |= 1 << 16;
|
target[1] |= 1 << 15;
|
||||||
|
|
||||||
// Encode the CPU Privilege Levels
|
// 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
|
// Encode Gate Type
|
||||||
target[1] |= gate_type & 0x0F00;
|
target[1] |= gate_type & 0x0F00;
|
||||||
|
Loading…
Reference in New Issue
Block a user