I don't know where to ask this question. This has nothing to do with OS construction btw. Just out of curiosity.
I was told that GDTR is 10 bytes for 64-bit CPU and 6 bytes for 32-bit. I got some informative returns when I used it from 64-bit, but zeros from 32-bit. Any particular reason why? I tested this on Win64.
mov rax,gdt_val
sgdt [rax]
gdt_val rb 16
Returns: BASE=0xFFFFxxxxxxxxxxxx, LIMIT=87
But the same 32-bit setting returns nothing.
mov eax,gdt_val
sgdt [eax]
gdt_val rb 8
Returns: BASE=0, LIMIT=0
Did I miss something?