Octocontrabass wrote:
Techflash wrote:
UPDATE: Same error again. Honestly kinda surprised. I would have thought that it would give a different error at some point.
Huh. I didn't see any other obvious mistakes that would lead to a non-present segment. Sounds like you'll have to dig a little bit deeper with your debugger. (I hear the Bochs debugger can dump the GDT...)
Techflash wrote:
But a little math shows that the combination of "baseLow", "baseMiddle", and "baseHigh", only gives 32-bits.... Would doubling each of the types to: uint32_t, uint16_t, uint16_t respectively work correctly then?
No. Since there's no segmentation in 64-bit mode, AMD decided to leave those fields the same size.
Alright. I switched the types back, and I found a command that looks like it dumps something related to the GDT:
Code:
es:0x0010, dh=0x00809300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0fffffff, Read/Write, Accessed
cs:0x0008, dh=0x00209900, dl=0x0000ffff, valid=1
Code segment, base=0x00000000, limit=0x0000ffff, Execute-Only, Non-Conforming, Accessed, 64-bit
ss:0x0010, dh=0x00809300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0fffffff, Read/Write, Accessed
ds:0x0010, dh=0x00809300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0fffffff, Read/Write, Accessed
fs:0x0010, dh=0x00809300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0fffffff, Read/Write, Accessed
gs:0x0010, dh=0x00809300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0fffffff, Read/Write, Accessed
ldtr:0x0000, dh=0x00008200, dl=0x0000ffff, valid=1
tr:0x0000, dh=0x00008b00, dl=0x0000ffff, valid=1
gdtr:base=0xffffffffffffffff, limit=0xffff
idtr:base=0x0000000000000000, limit=0x3ff
This was taken just before moving ax into ds.