From 365ec3db17c64c4ebb6d204260f098c160271305 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 3 Feb 2004 19:33:43 -0800 Subject: [PATCH] [SPARC64}: Fix ultra-III and later support of new-style SILO booting. --- arch/sparc64/kernel/head.S | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index b381db233a0b8..910f768d89265 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S @@ -61,7 +61,7 @@ bootup_user_stack: * 0x0202 : Supports kernel params string * 0x0201 : Supports reboot_command */ - .half 0x0300 /* HdrS version */ + .half 0x0300 /* HdrS version */ root_flags: .half 1 @@ -159,6 +159,21 @@ cheetah_generic_boot: blu,pt %xcc, 1b add %l0, (1 << 3), %l0 + /* Search the small TLB. OBP never maps us like that but + * newer SILO can. + */ + clr %l0 + +1: ldxa [%l0] ASI_ITLB_TAG_READ, %g1 + membar #Sync + andn %g1, %l2, %g1 + cmp %g1, %g2 + be,pn %xcc, cheetah_got_tlbentry + nop + cmp %l0, (15 << 3) + blu,pt %xcc, 1b + add %l0, (1 << 3), %l0 + /* BUG() if we get here... */ ta 0x5 @@ -167,7 +182,8 @@ cheetah_got_tlbentry: ldxa [%l0] ASI_ITLB_DATA_ACCESS, %g1 membar #Sync and %g1, %g3, %g1 - sub %g1, %g2, %g1 + set 0x5fff, %l0 + andn %g1, %l0, %g1 or %g5, %g1, %g5 /* Clear out any KERNBASE area entries. */ -- 2.53.0