Skip to contentSkip to conversation

beginners question

DISCUSSION Mad Props 2 participants 2 messages Nov 22, 2004 MIPS

lore
Share & tools
lore

Mad Props

author
#0 lore raw

Hi,

i wrote a little MIPS startup code that uses the serial port to print some output. Further I enabled timer interrupts. So far, I'm using kseg1 since nothing else is intialized.

I have a static variable in my C exception hander. The problem with it: it's apparently not within kseg1 but in the user segment and causes the exception handler to get invoked recursively. How can I change this so that all variables / code use kseg1 ?

thx

Thomas

Signature · 2 lines
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++
#1 lore raw
Quoted 8 lines · Mad Props

i wrote a little MIPS startup code that uses the serial port to print some output. Further I enabled timer interrupts. So far, I'm using kseg1 since nothing else is intialized.

I have a static variable in my C exception hander. The problem with it: it's apparently not within kseg1 but in the user segment and causes the exception handler to get invoked recursively. How can I change this so that all variables / code use kseg1 ?

Seems like you need a linker script. The kernel has it's linker script in arch/mips/kernel/vmlinux.lds.S but due to complexity that's probably not a good example to look at.

Ralf