Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 sun4v: added missing dtsb miss hand...
details: https://anonhg.NetBSD.org/src/rev/7382e249fdd5
branches: trunk
changeset: 329637:7382e249fdd5
user: palle <palle%NetBSD.org@localhost>
date: Sat May 31 18:22:29 2014 +0000
description:
sun4v: added missing dtsb miss handling for trap level 1 - with this update the kernel now reaches configure() on sun4v systems
diffstat:
sys/arch/sparc64/sparc64/locore.s | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diffs (87 lines):
diff -r 08ce73bbceca -r 7382e249fdd5 sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Sat May 31 16:25:29 2014 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Sat May 31 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.359 2014/05/30 21:55:32 palle Exp $ */
+/* $NetBSD: locore.s,v 1.360 2014/05/31 18:22:29 palle Exp $ */
/*
* Copyright (c) 2006-2010 Matthew R. Green
@@ -893,7 +893,7 @@
.macro sun4v_trap_entry count
.rept \count
- ba,a,pt %xcc, slowtrap
+ ba slowtrap
nop
.align 32
.endr
@@ -921,7 +921,7 @@
! trap level 0
!
sun4v_trap_entry 49 ! 0x000-0x030
- VTRAP(T_DATA_MMU_MISS, sun4v_tl0_dtsb_miss) ! 0x031 = data MMU miss
+ VTRAP(T_DATA_MMU_MISS, sun4v_dtsb_miss) ! 0x031 = data MMU miss
sun4v_trap_entry 78 ! 0x032-0x07f
SPILL64(uspill8_sun4v,ASI_AIUS) ! 0x080 spill_0_normal -- used to save user windows in user mode
SPILL32(uspill4_sun4v,ASI_AIUS) ! 0x084 spill_1_normal
@@ -959,7 +959,9 @@
!
! trap level 1
!
- sun4v_trap_entry_fail 512 ! 0x000-0x1ff
+ sun4v_trap_entry_fail 49 ! 0x000-0x030
+ VTRAP(T_DATA_MMU_MISS, sun4v_dtsb_miss) ! 0x031 = data MMU miss
+ sun4v_trap_entry_fail 462 ! 0x032-0x1ff
#endif
@@ -2562,13 +2564,13 @@
* Traps for sun4v.
*/
-sun4v_tl0_dtsb_miss:
+sun4v_dtsb_miss:
GET_MMFSA %g1 ! MMU Fault status area
- add %g1, 0x48, %g3
+ add %g1, 0x48, %g3
LDPTRA [%g3] ASI_PHYS_CACHED, %g3 ! Data fault address
- add %g1, 0x50, %g6
+ add %g1, 0x50, %g6
LDPTRA [%g6] ASI_PHYS_CACHED, %g6 ! Data fault context
-
+
GET_CTXBUSY %g4
sllx %g6, 3, %g6 ! Make it into an offset into ctxbusy
LDPTR [%g4 + %g6], %g4 ! Load up our page table.
@@ -2628,17 +2630,27 @@
add %g2, %g3, %g2 ! location of TTE in ci_tsb_dmmu
membar #StoreStore
-
+
STPTR %g4, [%g2 + 8] ! store TTE data
STPTR %g1, [%g2] ! store TTE tag
retry
NOTREACHED
-sun4v_datatrap:
+sun4v_datatrap: ! branch further based on trap level
+ rdpr %tl, %g1
+ dec %g1
+ beq sun4v_datatrap_tl0
+ nop
+ ba sun4v_datatrap_tl1
+ nop
+sun4v_datatrap_tl0:
/* XXX missing implementaion */
sir
-
+sun4v_datatrap_tl1:
+ /* XXX missing implementaion */
+ sir
+
/*
* End of traps for sun4v.
*/
Home |
Main Index |
Thread Index |
Old Index