Page 1 of 1

QEMU throws an error after interrupts are enabled

Posted: Wed Sep 10, 2008 8:55 am
by ruisleipa
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

Re: QEMU throws an error after interrupts are enabled

Posted: Wed Sep 10, 2008 11:02 am
by Combuster
Hint (in idt.c):

Code: Select all

	base_hi=(base<<8);
	base_lo=(base&0x00ff);

Re: QEMU throws an error after interrupts are enabled

Posted: Thu Sep 11, 2008 6:32 am
by ruisleipa
Thank you really much! I am happy when I know that there still are people who are willing to help newbies :)

Re: QEMU throws an error after interrupts are enabled

Posted: Thu Sep 11, 2008 3:58 pm
by suthers
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 :wink:
Jules