• David S. Miller's avatar
    [SPARC64]: Fix Ultra5, Ultra60, et al. boot failures. · 5d8e1b18
    David S. Miller authored
    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: default avatarDavid S. Miller <davem@davemloft.net>
    5d8e1b18
head.S 14.6 KB