So here is the relevant part of the logs that Bochs gives me:
Code: Select all
00072305242e[CPU0 ] branch_far64: RIP > limit
00072305242e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x0d)
00072305242e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x08)
00072305242i[CPU0 ] CPU is in protected mode (active)
00072305242i[CPU0 ] CS.d_b = 32 bit
00072305242i[CPU0 ] SS.d_b = 32 bit
00072305242i[CPU0 ] EFER = 0x00000000
00072305242i[CPU0 ] | RAX=0000000000105ffa RBX=0000000000010000
00072305242i[CPU0 ] | RCX=0000000000000000 RDX=00000000004f9200
00072305242i[CPU0 ] | RSP=0000000000105ff4 RBP=0000000000000000
00072305242i[CPU0 ] | RSI=0000000000000000 RDI=0000000000000000
00072305242i[CPU0 ] | R8=0000000000000000 R9=0000000000000000
00072305242i[CPU0 ] | R10=0000000000000000 R11=0000000000000000
00072305242i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00072305242i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00072305242i[CPU0 ] | IOPL=0 ID vip vif ac vm RF nt of df if tf sf zf af pf cf
00072305242i[CPU0 ] | SEG selector base limit G D
00072305242i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00072305242i[CPU0 ] | CS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00072305242i[CPU0 ] | DS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00072305242i[CPU0 ] | SS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00072305242i[CPU0 ] | ES:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00072305242i[CPU0 ] | FS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00072305242i[CPU0 ] | GS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00072305242i[CPU0 ] | MSR_FS_BASE:0000000000000000
00072305242i[CPU0 ] | MSR_GS_BASE:0000000000000000
00072305242i[CPU0 ] | RIP=0000000000100304 (0000000000100304)
00072305242i[CPU0 ] | CR0=0x60000011 CR2=0x0000000000000000
00072305242i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00072305242i[CPU0 ] 0x0000000000100304>> jmp far 0008:0010030b : EA0B0310000800
00072305242e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
00072305242i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
00072305242i[CPU0 ] cpu hardware reset
Here are the GDT codes:
GDT.h
GDT.cpp
my GDT flushing codes.
And I think it is not just Bochs just making huge deal about having 3rd exception without resolution as this crashing also happens in Qemu.
I am gonna go and build my own version of Bochs now as I might be able to make it have gui debugger so I can maybe get something resolved.
EDIT: Also I have no clue why there are RAX and registers like that on the logs instead of having EAX and stuff. Maybe that has some effect on it but I am not sure.