gedare / rtemssparc64

Automatically exported from code.google.com/p/rtemssparc64
1 stars 1 forks source link

spticks hits memory alignment error (usiii) #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Configure spticks with 10000 microseconds per tick and 4 ticks to spin.

What is the expected output? What do you see instead?
It should terminate with ticks: 5. instead execution hits a memory alignment 
error on usiii.

Original issue reported on code.google.com by GedareBl...@gmail.com on 24 Aug 2010 at 5:11

GoogleCodeExporter commented 9 years ago
There appears to be corruption of either stack contents or (more likely) 
register values that are saved/restored during _ISR_Dispatch.

Original comment by GedareBl...@gmail.com on 25 Aug 2010 at 7:43

GoogleCodeExporter commented 9 years ago
It looks like the code in 'good_window' section uses the normal globals when 
the expectation is that the alternate global set will be used.

Original comment by GedareBl...@gmail.com on 25 Aug 2010 at 7:55

GoogleCodeExporter commented 9 years ago
FIX:

#if defined(SUN4U)
    rdpr  %pstate, %o1
    or  %o1, SPARC_PSTATE_AG_MASK, %o1
    wrpr  %o1, %g0, %pstate                 ! go to AG.
#elif defined(SUN4V)

Original comment by GedareBl...@gmail.com on 25 Aug 2010 at 8:13