problem with code segment. not a valid code segment!

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.
Locked
User avatar
hegde1997
Member
Member
Posts: 40
Joined: Mon Jan 30, 2012 7:36 am
Location: Bangalore, India
Contact:

problem with code segment. not a valid code segment!

Post by hegde1997 »

Code: Select all

00076668201e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076669718e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076671235e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076672752e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076674269e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076675786e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076677303e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076678820e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076680337e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076681854e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076683371e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076684888e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076686405e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076687922e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076689439e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076690956e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076692473e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076693990e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076695507e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076697024e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076698541e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076700058e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076701575e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076703092e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076704609e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076706126e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076707643e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076709160e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076710677e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076712194e[CPU0 ] fetch_raw_descriptor: GDT: index (af) 15 > limit (27)
00076714301e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076716021e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076717741e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076719461e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076721181e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076722901e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076724621e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076726341e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076728061e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076729781e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076731501e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076733221e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076734941e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076736661e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076738381e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076740101e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076741821e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076743541e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076745261e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076746981e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076748701e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076750421e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076752141e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076753861e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076755581e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076757301e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076759611e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076761331e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076763051e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076764771e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076766491e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076768211e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076769931e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076771651e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076773371e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076775091e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076776811e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076778531e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076780251e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076781971e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076783691e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076785411e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076787131e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076788851e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076790571e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076792291e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076794011e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076795731e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076797451e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076799171e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076800891e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076802611e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076804921e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076806641e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076808361e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076810081e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076811801e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076813521e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076815241e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076816961e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076818681e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076820401e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076822121e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076823841e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076825561e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076827281e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076829001e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076830721e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076832441e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076834161e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076835881e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076837601e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076839321e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076841041e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076842761e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076844481e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076846201e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076847921e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076850231e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076851951e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076853671e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076855391e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076857111e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076858831e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076860551e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076862271e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076863991e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076865711e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076867431e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076869151e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076870871e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076872591e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076874311e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076876031e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076877751e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076879471e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076881191e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076882911e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076884631e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076886351e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076888071e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076889791e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076891511e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076893231e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076895541e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076897261e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076898981e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076900701e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076902421e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076904141e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076905861e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076907581e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076909301e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076911021e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076912741e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076914461e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076916181e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076917901e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076919621e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076921341e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076923061e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076924781e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076926501e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076928221e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076929941e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076931661e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076933381e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076935101e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076936821e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076938541e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076940851e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076942571e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076944291e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076946011e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076947731e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076949451e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076951171e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076952891e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076954611e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076956331e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076958051e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076959771e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076961491e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076963211e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076964931e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076966651e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076968371e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076970091e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076971811e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076973531e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00076975251e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077001641e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077003361e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077005081e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077006801e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077008521e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077010241e[CPU0 ] check_cs(0x11ad): not a valid code segment !
00077011961e[CPU0 ] check_cs(0x11ad): not a valid code segment !
in bochs i am getting hell lot of these stmts. please help.
during setting up gdt i did 0x08:flush the way shown in few tutorials and gs,es,ds and fs have value 0x10.

thank you in advance.
Walking my way in making my OS
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: problem with code segment. not a valid code segment!

Post by AJ »

Hi,

Any chance of seeing a couple of relevant code-snippets from where you do this? On the face of it, you are attempting to load a segment register with 0xAF, where your GDT limit is 0x27.

If you are relying on values passed on the stack for segment register loading, is (E/R)SP where you would expect?

Cheers,
Adam
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: problem with code segment. not a valid code segment!

Post by AJ »

Locked along with the other topic. Duplicate thread. It's a stack alignment problem in your IRQ handler because it only happens when you enable interrupts - and IMO that's quite a generous hint!

Cheers,
Adam
Locked