[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] [patch] r17 must be saved



Hi John,

At Tue, 24 Aug 2004 08:16:07 +1000,
John Williams wrote:
> 
[...]
> Fix looks good as-is - applied to CVS.

thanks.

> Thanks for finding it.  Just curious - what was the symptom?  Must have 
> been a devil to track down!

some of our program died randomly or mis behaved very strangely at
first.  we were lucky that we had got a small test case which just
does a syscall in a few milion loop and die.

if we disable right before syscall, it doesn't misbehaved.  so we
thought this must have something with hardware context save and
restore routine in entry.S

one of my colleagues found that after syscall, stack pointer was
differrent.  He also found that when the program misbehave, schedule()
and at least one syscall is called from other task.

to trigger the bug, an interrupt has to occure right after the first
instruction of syscall, which is "bralid r17, XXX", and another
syscall must be called from other task to clobber r17, which is _very_
rare case.

all credit is due to him.  all bug or mis-understanding in the report,
if any, is mine.
--
         yashi
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/