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.
ruisleipa
Member
Posts: 46 Joined: Wed Sep 10, 2008 8:39 am
Location: Finland
Post
by ruisleipa » Wed Sep 10, 2008 8:55 am
QEMU throws the following error when running my kernel:
Code: Select all
qemu: fatal: Trying to execute code outside RAM or ROM at 0xc90000c9
EAX=00000000 EBX=00026260 ECX=00000000 EDX=000003d5
ESI=000263d3 EDI=000263ec EBP=00067edc ESP=001051f4
EIP=c90000c9 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00cf9300
CS =0008 00000000 ffffffff 00cf9a00
SS =0010 00000000 ffffffff 00cf9300
DS =0010 00000000 ffffffff 00cf9300
FS =0010 00000000 ffffffff 00cf9300
GS =0010 00000000 ffffffff 00cf9300
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT= 0010600a 00000017
IDT= 00106060 000007ff
CR0=60000011 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000000 CCD=001051f4 CCO=EFLAGS
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
Aborted
I have narrowed the problem, and it happens after interrupts are enabled in main() in main.c.
I have also tried to add hlt:s to the code to the interrupt and exception handlers but the error still comes up.
I would really appreciate even pointing to the place where the error might occur.
Thanks in advance.
BTW the sources are in the tarball
Attachments
kernel.tar.bz2
(60.24 KiB) Downloaded 41 times
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Wed Sep 10, 2008 11:02 am
Hint (in idt.c):
Code: Select all
base_hi=(base<<8);
base_lo=(base&0x00ff);
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
ruisleipa
Member
Posts: 46 Joined: Wed Sep 10, 2008 8:39 am
Location: Finland
Post
by ruisleipa » Thu Sep 11, 2008 6:32 am
Thank you really much! I am happy when I know that there still are people who are willing to help newbies
suthers
Member
Posts: 672 Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:
Post
by suthers » Thu Sep 11, 2008 3:58 pm
mikkop92 wrote: Thank you really much! I am happy when I know that there still are people who are willing to help newbies
Don't worry there are loads of people who are ready to help beginners if you follow the proper procedure and have the required knowledge
Jules