[U-Boot] p4080ds starts OS with MSR[EE]=1 and DEC armed?

Scott Wood scottwood at freescale.com
Tue Mar 15 21:24:43 CET 2011


On Tue, 15 Mar 2011 14:21:03 -0500
Timur Tabi <timur at freescale.com> wrote:

> On Sun, Mar 13, 2011 at 10:46 AM, Jimi Xenidis <jimix at watson.ibm.com> wrote:
> 
> > Turns out that TSR[DIS] was on when my program took over, and this is ePAPR legal.
> > I need to reset the DEC in my code.
> 
> I wonder if it should be legal.  What value does it have to leave a
> pending decrementer interrupt when booting the OS?  That just forces
> every OS to program the decrementer and clear DIS before enabling
> interrupts.

The OS should ensure that timer interrupts are functioning the way it wants
before it enables interrupts -- but in any case, once it enables interrupts
it should be able to handle any interrupt that is enabled.  There's no
general need to clear DIS.

There's actually no good way for boot software to ensure that TSR[DIS] is
clear, other than stopping the timebase (not allowed, or at least shouldn't
be), or assuming that the OS will take control of the decrementer within a
reasonable amount of time.  We could require that TCR[DIE] be clear, but
that just imposes an extra requirement on boot software for no good reason
-- and in general, we want to minimize the extent to which we trust boot
software to do something specific.  Especially if it's something that won't
show up as a problem with most client software, until someone decides to
rely on it.

-Scot



More information about the U-Boot mailing list