[uClinux-dev] the problem while porting to S3C4510

YongSern ysgwee at mobiwave.com
Sun Nov 18 22:25:20 EST 2001


Tonny Tzeng wrote:
> 
> Dear Jennifer,
> 
> (1) You have to provide 'setup_timer' for your target processor to
>       generate periodic system timer ticks.
> (2) As I remember, the constant IRQ_TIMER has to be set properly
>       at include/asm/arch/irqs.h
> BTW, if you did not setup timer properly, you should block in
> calibrate_delay(). Did you validate the IRQ no. return from
> get_irqno_and_base macro before handling them? What's the
> INTMSK and INTPND values?
> 
> Best regards,
> Tonny
> 
> > I am trying to port the uClinux 2.0.38 to the Samsung s3c4510 board.
> > The output of printk () can be printed on the terminal. Everything seems
> > good until the sti() called at the start_kernel(). After the sti(), it
> seems
> > that there are interrupts always  to interrupt the system. So, the system
> > always excute the vector_IRQ(). But, in fact, there is no real interrupt
> > happened (I have checked the INTOFFSET register). In fact, I only add
> > the macro "get_irqnr_and_base" and the valid IRQ number checking
> >  for this CPU at the entry-armv.S file.  Do I need to change other point
> > at this entry-armv.S and the sti() and cli() for the CPU?  Or, something
> > I forgot to do? Please give me some hints.
> >
> > ps.
> > 1. I only enable the internal timer0 IRQ.
> > 2. I use the JEENI to directly load the kernel to the RAM (0x400)
> > without the real bootloader.
> >
> > Best Regards,
> > Jennifer F. Chang
> 
> This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/


I also try to port uclinux to s3c4530 eval board. I've to modify the
interrupt handling in order to work properly. Please correct if I'm
wrong. from the user manual stated that the INTOFFSET register (to
identify which IRQ interrupted) must be read before changing mode, but
on the interrupt handling routine this register is read after changing
from IRQ mode to SVC mode (vector_IRQ:entry-armv.S), so the values is
not longer valid in get_irqno_and_base macro.

For testing purpose I try to read the INTOFFSET register before changing
mode. The timer interrupt work correctly but this will affect the stub
size. Any suggestion ?

I also found that restore_user_regs macro (entry-header.S) restoring the
wrong register, instead of "ldmia  sp, {r0 - lr}^" I changed it to
"ldmia   sp, {r0 - r12}", tally with __irq_usr : "stmia   sp, {r0 -
r12}". I'm not sure is this modification is correct, but without this my
interrupt will never success. Please advise. Thanks.

I manage to boot the kernel to the cpu_idle state but the init thread is
not started. from the mailing archive, I suspect the toolchains that I'm
using now has bug. Need to get a correct one later.

Thanks.

Yong Sern
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list