OK, I got past the GDT problems. Now QEMU is telling me this:
Quote:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000b8f00
EAX=000b8f00 EBX=00103000 ECX=0000011b EDX=00000000
ESI=000250b0 EDI=00030f48 EBP=001020fc ESP=00102094
EIP=000b8f00 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00cf9300
CS =0008 00000000 ffffffff 00cf9a00
SS =0010 00000000 ffffffff 00cf9300
DS =0010 00000000 ffffffff 00cf9300
FS =0010 00000000 ffffffff 00cf9300
GS =0010 00000000 ffffffff 00cf9300
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT= 0010b020 00000017
IDT= 0010b040 000007ff
CR0=60000011 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000004 CCD=fffffffc CCO=SUBL
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
[FPR0-7 and XMM0-7 are all 0.]
And Bochs tells me this:
Quote:
00016806479i[CPU0 ] LOCK prefix unallowed (op1=0x87, attr=0x300, mod=0xc0, nnn=5)
00016859235i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)
The second line repeats until I kill Bochs, and prints isr_handler each time it happens.
I finally got around to putting my code in SVN, the kernel code is here:
http://dinounix.ath.cx/delta/?module=svn&mode=browse&path=/kernel/source/&rev=HEAD