]> git.baikalelectronics.ru Git - kernel.git/commit
[SPARC64]: Fix Ultra5, Ultra60, et al. boot failures.
authorDavid S. Miller <davem@sunset.davemloft.net>
Mon, 10 Oct 2005 23:12:13 +0000 (16:12 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 10 Oct 2005 23:12:13 +0000 (16:12 -0700)
commit887a5f35cebcc0ee7b7abc087bb1fe2afa09ef4d
tree555d79c07b00def9f5eab72431ae95ebd5af4f86
parent713f48219e02d8b9e2b454159564b3e36051f01c
[SPARC64]: Fix Ultra5, Ultra60, et al. boot failures.

On the boot processor, we need to do the move onto the Linux trap
table a little bit differently else we'll take unhandlable faults in
the firmware address space.

Previously we would do the following:

1) Disable PSTATE_IE in %pstate.
2) Set %tba by hand to sparc64_ttable_tl0
3) Initialize alternate, mmu, and interrupt global
   trap registers.
4) Call prom_set_traptable()

That doesn't work very well actually with the way we boot the kernel
VM these days.  It worked by luck on many systems because the firmware
accesses for the prom_set_traptable() call happened to be loaded into
the TLB already, something we cannot assume.

So the new scheme is this:

1) Clear PSTATE_IE in %pstate and set %pil to 15
2) Call prom_set_traptable()
3) Initialize alternate, mmu, and interrupt global
   trap registers.

and this works quite well.  This sequence has been moved into a
callable function in assembler named setup-trap_table().  The idea is
that eventually trampoline.S can use this code as well.  That isn't
possible currently due to some complications, but eventually we should
be able to do it.

Thanks to Meelis Roos for the Ultra5 boot failure report.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/head.S