Hoping an expert can help me get through this, or give me a tip on what to look at.
I can set bit 0 in CR0, to and I've setup a GDT and loaded the GDT register, but when I try to do an LJMPL, I never get there.
Using qemu, I'm putting a breakpoint right before the ljmpl and going into gdb. GDB shows the next instruction is:
And, there's a legal instruction at the address I'm trying to jump to:(gdb) x/1i $eip
0x106b: ljmpl $0x8,$0x1400
Going into the qemu console, my registers look are:(gdb) x/1i 0x1400
0x1400: xor %ax,%ax
Dumping the memory with my GDT shows:GDT=0000108e 0000000f
IDT=00000000 000003ff
LDT=00000000 0000ffff
CR0=00000011
ES=0008
CS=0000
SS=08e0
DS=0008
FS=0008
GS=0008
If I step an instruction, gdb hangs, and when I go to the qemu console to show my registers, protected mode has been disabled and my IP is off who-knows-where.(gdb) x/16bx 0x108e
0x108e: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x1096: 0xff 0xff 0x00 0x00 0x00 0x92 0xcf 0x00
I'm sort of stumped on where I'm going wrong. Any clues to help me figure this out?
Thanks!
Chris