Fixed some GDT ints not being converted to the right length.
This commit is contained in:
parent
8d61080d8d
commit
dce59cc08a
@ -38,13 +38,13 @@ proc gdtFlush(){.inline,asmNoStackFrame.} =
|
||||
|
||||
proc gdtSetGate(num: int, base: uint16, limit: uint32, access: AccessByte, flags: Flags) =
|
||||
# Setup the descriptor base address
|
||||
gdt.entries[num].base_low = (base and 0xFFFF)
|
||||
gdt.entries[num].base_middle = (base shr 16) and 0xFF
|
||||
gdt.entries[num].base_high = (base shr 24) and 0xFF
|
||||
gdt.entries[num].base_low = uint16(base and 0xFFFF)
|
||||
gdt.entries[num].base_middle = uint8((base shr 16) and 0xFF)
|
||||
gdt.entries[num].base_high = uint8((base shr 24) and 0xFF)
|
||||
|
||||
# Setup the descriptor limits
|
||||
gdt.entries[num].limit_low = (limit and 0xFFFF)
|
||||
gdt.entries[num].flags_and_limit_mid = ((limit shr 16) and 0x0F) or flags
|
||||
gdt.entries[num].limit_low = uint16(limit and 0xFFFF)
|
||||
gdt.entries[num].flags_and_limit_mid = uint8(((limit shr 16) and 0x0F) or flags)
|
||||
gdt.entries[num].access = access
|
||||
|
||||
proc createAccessByte(priv: range[0..3], directionConform: bool, readWrite: bool): AccessByte =
|
||||
|
Loading…
Reference in New Issue
Block a user