I cannot get GDT working
Posted: Fri Apr 13, 2018 10:22 am
I am writing an operating system in C based on OSDev's Meaty Skeleton example, and I want to specify my own GDT instead of GRUB's GDT. So I took the code from https://github.com/psamora/DiOS and adapted it to my OS. But then, I got this:
My OS source code is available here: https://github.com/weedboi6969/puckos. Can someone help me with that?
Code: Select all
00078174177e[CPU0 ] load_seg_reg(SS): not writable data segment
00078174177e[CPU0 ] interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
00078174177e[CPU0 ] interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
00078174177i[CPU0 ] CPU is in protected mode (active)
00078174177i[CPU0 ] CS.mode = 32 bit
00078174177i[CPU0 ] SS.mode = 32 bit
00078174177i[CPU0 ] EFER = 0x00000000
00078174177i[CPU0 ] | EAX=00100010 EBX=00000000 ECX=00000004 EDX=000003d5
00078174177i[CPU0 ] | ESP=00108dbc EBP=00000000 ESI=00000000 EDI=00000000
00078174177i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df if tf sf zf af pf cf
00078174177i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00078174177i[CPU0 ] | CS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00078174177i[CPU0 ] | DS:0010( 0002| 0| 0) ffffffff ffffffff 1 1
00078174177i[CPU0 ] | SS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00078174177i[CPU0 ] | ES:0010( 0002| 0| 0) ffffffff ffffffff 1 1
00078174177i[CPU0 ] | FS:0010( 0002| 0| 0) ffffffff ffffffff 1 1
00078174177i[CPU0 ] | GS:0010( 0002| 0| 0) ffffffff ffffffff 1 1
00078174177i[CPU0 ] | EIP=001011df (001011df)
00078174177i[CPU0 ] | CR0=0x60000011 CR2=0x00000000
00078174177i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
(0).[78174177] [0x00000000001011df] 0010:00000000001011df (unk. ctxt): mov ss, ax ; 8ed0
00078174177p[CPU0 ] >>PANIC<< exception(): 3rd (13) exception with no resolution