[U-Boot-Users] PPC: problem with syscalls

Wolfgang Denk wd at denx.de
Fri Dec 6 22:59:30 CET 2002


In message <3DE60E99.1DB09169 at staubli.com> you wrote:
> 
> I've a problem with examples/timer.c. I've tried to launch it on my
> mpc860t board, if I start the timer and if I
> press a key after one or more interrupts occured, the u-boot crashes.
> The problem is that an interrupt handler
> uses a system call (mon_printf) while the main loop is inside a system
> call (mon_getc). During a system call,
> the LR and SRRx are saved at a fixed location (0xcf4, 0xcf8 and 0xcfc)
> then the return address of the mon_printf
> in the main loop is overridden by the return address of the mon_getc in
> the interrupt handler. To avoid this problem,
> I think that we need to use a stack to store the return addresses (and
> the SRRx) of the system calls.
> 
> What's your opinion ?

We should probably follow Robert Kaiser's  advise  and  use  plainold
pointer  tables  as we did before. When I switched to use syscalls it
seemed like a good idea, but I was not thinking  about  other  archi-
tectures then.


[Sorry it took me so long to repply.]

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
In an infinite universe all things are possible, including the possi-
bility that the universe does not exist.
                        - Terry Pratchett, _The Dark Side of the Sun_




More information about the U-Boot mailing list