Bochs help

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
beyondsociety

Bochs help

Post by beyondsociety »

I'm testing my pmode bootsector with a c kernel that I loading.

When I run it in Bochs-2.0.pre2, I get this error

Code: Select all

00000244532p[CPU  ] >>PANIC<< fetch_raw_descriptor: LDTR.valid=0
00000244532i[SYS  ] Last time is 1040262123
00000244532i[CPU  ] protected mode
00000244532i[CPU  ] CS.d_b = 32 bit
00000244532i[CPU  ] SS.d_b = 32 bit
00000244532i[CPU  ] | EAX=00000011  EBX=00000000  ECX=00120002  EDX=00000000
00000244532i[CPU  ] | ESP=0000ffff  EBP=00000000  ESI=00000000  EDI=0000ffe4
00000244532i[CPU  ] | IOPL=0 NV UP DI PL NZ NA PE NC
00000244532i[CPU  ] | SEG selector     base    limit G D
00000244532i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D
00000244532i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1
00000244532i[CPU  ] |  ES:0000( 0000| 0|  0) 00000000 0000ffff 0 0
00000244532i[CPU  ] |  FS:0000( 0000| 0|  0) 00000000 0000ffff 0 0
00000244532i[CPU  ] |  GS:0000( 0000| 0|  0) 00000000 0000ffff 0 0
00000244532i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1
00000244532i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1
00000244532i[CPU  ] | EIP=00007c19 (00007c12)
00000244532i[CPU  ] | CR0=0x00000011 CR1=0x00000000 CR2=0x00000000
00000244532i[CPU  ] | CR3=0x00000000 CR4=0x00000000
What does this mean?
jrfritz

Re:Bochs help

Post by jrfritz »

It means the IDT is bad.
beyondsociety

Re:Bochs help

Post by beyondsociety »

I haven't set up a IDT yet. Could it be my GDT?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Bochs help

Post by Pype.Clicker »

it seems to complaint about LDTR not to be set up ... did you by any chance asked for a wrong (with TI bit set) selector that would accidentally ask a LDT table that hasn't been set up ?
jrfritz

Re:Bochs help

Post by jrfritz »

I don't know why I said IDT ::)
beyondsociety

Re:Bochs help

Post by beyondsociety »

Thanks for the help Pype.Clicker.

The binary code I was using for my code selector in my gdt was set to these last four bytes: 0010 = LDT.

I'm changing it now.
Post Reply