Since real hardware doesn't give any info on its registers, I installed Bochs and ran my kernel again.
These are the results:
Code: Select all
Booting from 0000:7c00
interrupt(): gate descriptor is not valid sys seg (vector=0x08)
interrupt(): gate descriptor is not valid sys seg (vector=0x0d)
interrupt(): gate descriptor is not valid sys seg (vector=0x08)
CPU is in protected mode (active)
CS.d_b = 32 bit
SS.d_b = 32 bit
EFER = 0x00000000
| RAX=0000000000000000 RBX=0000000000000000
| RCX=0000000000000000 RDX=00000000000003d5
| RSP=000000000009fbdb RBP=00000000c0000400
| RSI=00000000c00000c2 RDI=0000000000000bb1
| R8=0000000000000000 R9=0000000000000000
| R10=0000000000000000 R11=0000000000000000
| R12=0000000000000000 R13=0000000000000000
| R14=0000000000000000 R15=0000000000000000
| IOPL=0 id vip vif ac vm RF nt of df IF tf sf zf AF PF cf
| SEG selector base limit G D
| SEG sltr(index|ti|rpl) base limit G D
| CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
| DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
| SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
| ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
| FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
| GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
| MSR_FS_BASE:0000000000000000
| MSR_GS_BASE:0000000000000000
| RIP=00000000c0000449 (00000000c0000449)
| CR0=0xe0000011 CR2=0x0000000000000000
| CR3=0x0009c000 CR4=0x00000000
0008:00000000c0000449 (unk. ctxt): push 0x00000000 ; 6a00
exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
bx_pc_system_c::Reset(HARDWARE) called
cpu hardware reset
Or is there some other cause I might have missed?