Module Name:    src
Committed By:   palle
Date:           Thu Jul 24 18:23:28 UTC 2014

Modified Files:
        src/sys/arch/sparc64/sparc64: locore.s

Log Message:
sun4v: add missing spill/fill handling for trap level 1 + cosmetic changes to 
comments for trap level 0 entries


To generate a diff of this commit:
cvs rdiff -u -r1.365 -r1.366 src/sys/arch/sparc64/sparc64/locore.s

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.365 src/sys/arch/sparc64/sparc64/locore.s:1.366
--- src/sys/arch/sparc64/sparc64/locore.s:1.365	Sat Jul 19 20:58:12 2014
+++ src/sys/arch/sparc64/sparc64/locore.s	Thu Jul 24 18:23:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.365 2014/07/19 20:58:12 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.366 2014/07/24 18:23:28 palle Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -987,64 +987,97 @@ _C_LABEL(trapbase_sun4v):
 	!
 	! trap level 0
 	!
-	sun4v_trap_entry 49				! 0x000-0x030
-	VTRAP(T_DATA_MMU_MISS, sun4v_dtsb_miss)		! 0x031 = data MMU miss
-	sun4v_trap_entry 15				! 0x032-0x040
-	HARDINT4V(1)					! 0x041 = level 1 interrupt
-	HARDINT4V(2)					! 0x042 = level 2 interrupt
-	HARDINT4V(3)					! 0x043 = level 3 interrupt
-	HARDINT4V(4)					! 0x044 = level 4 interrupt
-	HARDINT4V(5)					! 0x045 = level 5 interrupt
-	HARDINT4V(6)					! 0x046 = level 6 interrupt
-	HARDINT4V(7)					! 0x047 = level 7 interrupt
-	HARDINT4V(8)					! 0x048 = level 8 interrupt
-	HARDINT4V(9)					! 0x049 = level 9 interrupt
-	HARDINT4V(10)					! 0x04a = level 10 interrupt
-	HARDINT4V(11)					! 0x04b = level 11 interrupt
-	HARDINT4V(12)					! 0x04c = level 12 interrupt
-	HARDINT4V(13)					! 0x04d = level 13 interrupt
-	HARDINT4V(14)					! 0x04e = level 14 interrupt
-	HARDINT4V(15)					! 0x04f = level 15 interrupt
-	sun4v_trap_entry 48				! 0x050-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
-	SPILLBOTH(uspill8_sun4v,uspill4_sun4v,ASI_AIUS)	! 0x088 spill_2_normal
-	sun4v_trap_entry_spill_fill_fail 1		! 0x08c spill_3_normal
-	SPILL64(kspill8_sun4v,ASI_N)			! 0x090 spill_4_normal  -- used to save supervisor windows
-	SPILL32(kspill4_sun4v,ASI_N)			! 0x094 spill_5_normal
-	SPILLBOTH(kspill8_sun4v,kspill4_sun4v,ASI_N)	! 0x098 spill_6_normal
+	sun4v_trap_entry 49					! 0x000-0x030
+	VTRAP(T_DATA_MMU_MISS, sun4v_dtsb_miss)			! 0x031 = data MMU miss
+	sun4v_trap_entry 15					! 0x032-0x040
+	HARDINT4V(1)						! 0x041 = level 1 interrupt
+	HARDINT4V(2)						! 0x042 = level 2 interrupt
+	HARDINT4V(3)						! 0x043 = level 3 interrupt
+	HARDINT4V(4)						! 0x044 = level 4 interrupt
+	HARDINT4V(5)						! 0x045 = level 5 interrupt
+	HARDINT4V(6)						! 0x046 = level 6 interrupt
+	HARDINT4V(7)						! 0x047 = level 7 interrupt
+	HARDINT4V(8)						! 0x048 = level 8 interrupt
+	HARDINT4V(9)						! 0x049 = level 9 interrupt
+	HARDINT4V(10)						! 0x04a = level 10 interrupt
+	HARDINT4V(11)						! 0x04b = level 11 interrupt
+	HARDINT4V(12)						! 0x04c = level 12 interrupt
+	HARDINT4V(13)						! 0x04d = level 13 interrupt
+	HARDINT4V(14)						! 0x04e = level 14 interrupt
+	HARDINT4V(15)						! 0x04f = level 15 interrupt
+	sun4v_trap_entry 48					! 0x050-0x07f
+	SPILL64(uspill8_sun4vt0,ASI_AIUS)			! 0x080 spill_0_normal -- used to save user windows in user mode
+	SPILL32(uspill4_sun4vt0,ASI_AIUS)			! 0x084 spill_1_normal
+	SPILLBOTH(uspill8_sun4vt0,uspill4_sun4vt0,ASI_AIUS)	! 0x088 spill_2_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x08c spill_3_normal
+	SPILL64(kspill8_sun4vt0,ASI_N)				! 0x090 spill_4_normal  -- used to save supervisor windows
+	SPILL32(kspill4_sun4vt0,ASI_N)				! 0x094 spill_5_normal
+	SPILLBOTH(kspill8_sun4vt0,kspill4_sun4vt0,ASI_N)	! 0x098 spill_6_normal
 	sun4v_trap_entry_spill_fill_fail 1			! 0x09c spill_7_normal
-	SPILL64(uspillk8_sun4v,ASI_AIUS)			! 0x0a0 spill_0_other -- used to save user windows in supervisor mode
-	SPILL32(uspillk4_sun4v,ASI_AIUS)			! 0x0a4 spill_1_other
-	SPILLBOTH(uspillk8_sun4v,uspillk4_sun4v,ASI_AIUS)	! 0x0a8 spill_2_other
+	SPILL64(uspillk8_sun4vt0,ASI_AIUS)			! 0x0a0 spill_0_other -- used to save user windows in supervisor mode
+	SPILL32(uspillk4_sun4vt0,ASI_AIUS)			! 0x0a4 spill_1_other
+	SPILLBOTH(uspillk8_sun4vt0,uspillk4_sun4vt0,ASI_AIUS)	! 0x0a8 spill_2_other
 	sun4v_trap_entry_spill_fill_fail 1			! 0x0ac spill_3_other
 	sun4v_trap_entry_spill_fill_fail 1			! 0x0b0 spill_4_other
 	sun4v_trap_entry_spill_fill_fail 1			! 0x0b4 spill_5_other
 	sun4v_trap_entry_spill_fill_fail 1			! 0x0b8 spill_6_other
 	sun4v_trap_entry_spill_fill_fail 1			! 0x0bc spill_7_other
-	FILL64(ufill8_sun4v,ASI_AIUS)			! 0x0c0 fill_0_normal -- used to fill windows when running user mode
-	FILL32(ufill4_sun4v,ASI_AIUS)			! 0x0c4 fill_1_normal
-	FILLBOTH(ufill8_sun4v,ufill4_sun4v,ASI_AIUS)	! 0x0c8 fill_2_normal
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0cc fill_3_normal
-	FILL64(kfill8_sun4v,ASI_N)			! 0x0d0 fill_4_normal  -- used to fill windows when running supervisor mode
-	FILL32(kfill4_sun4v,ASI_N)			! 0x0d4 fill_5_normal
-	FILLBOTH(kfill8_sun4v,kfill4_sun4v,ASI_N)	! 0x0d8 fill_6_normal
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0dc fill_7_normal
-	FILL64(ufillk8_sun4v,ASI_AIUS)			! 0x0e0 fill_0_other
-	FILL32(ufillk4_sun4v,ASI_AIUS)			! 0x0e4 fill_1_other
-	FILLBOTH(ufillk8_sun4v,ufillk4_sun4v,ASI_AIUS)	! 0x0e8 fill_2_other
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0ec fill_3_other
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0f0 fill_4_other
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0f4 fill_5_other
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0f8 fill_6_other
-	sun4v_trap_entry_spill_fill_fail 1		! 0x0fc fill_7_other
-	sun4v_trap_entry 256				! 0x100-0x1ff
+	FILL64(ufill8_sun4vt0,ASI_AIUS)				! 0x0c0 fill_0_normal -- used to fill windows when running user mode
+	FILL32(ufill4_sun4vt0,ASI_AIUS)				! 0x0c4 fill_1_normal
+	FILLBOTH(ufill8_sun4vt0,ufill4_sun4vt0,ASI_AIUS)	! 0x0c8 fill_2_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0cc fill_3_normal
+	FILL64(kfill8_sun4vt0,ASI_N)				! 0x0d0 fill_4_normal  -- used to fill windows when running supervisor mode
+	FILL32(kfill4_sun4vt0,ASI_N)				! 0x0d4 fill_5_normal
+	FILLBOTH(kfill8_sun4vt0,kfill4_sun4vt0,ASI_N)		! 0x0d8 fill_6_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0dc fill_7_normal
+	FILL64(ufillk8_sun4vt0,ASI_AIUS)			! 0x0e0 fill_0_other
+	FILL32(ufillk4_sun4vt0,ASI_AIUS)			! 0x0e4 fill_1_other
+	FILLBOTH(ufillk8_sun4vt0,ufillk4_sun4vt0,ASI_AIUS)	! 0x0e8 fill_2_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0ec fill_3_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0f0 fill_4_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0f4 fill_5_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0f8 fill_6_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0fc fill_7_other
+	sun4v_trap_entry 256					! 0x100-0x1ff
 	!
 	! trap level 1
 	!
-	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
+	sun4v_trap_entry_fail 49				! 0x000-0x030
+	VTRAP(T_DATA_MMU_MISS, sun4v_dtsb_miss)			! 0x031 = data MMU miss
+	sun4v_trap_entry_fail 78				! 0x032-0x07f
+	SPILL64(uspill8_sun4vt1,ASI_AIUS)			! 0x080 spill_0_normal -- save user windows
+	SPILL32(uspill4_sun4vt1,ASI_AIUS)			! 0x084 spill_1_normal
+	SPILLBOTH(uspill8_sun4vt1,uspill4_sun4vt1,ASI_AIUS)	! 0x088 spill_2_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x08c spill_3_normal
+	SPILL64(kspill8_sun4vt1,ASI_N)				! 0x090 spill_4_normal -- save supervisor windows
+	SPILL32(kspill4_sun4vt1,ASI_N)				! 0x094 spill_5_normal
+	SPILLBOTH(kspill8_sun4vt1,kspill4_sun4vt1,ASI_N)	! 0x098 spill_6_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x09c spill_7_normal
+	SPILL64(uspillk8_sun4vt1,ASI_AIUS)			! 0x0a0 spill_0_other -- save user windows in nucleus mode
+	SPILL32(uspillk4_sun4vt1,ASI_AIUS)			! 0x0a4 spill_1_other
+	SPILLBOTH(uspillk8_sun4vt1,uspillk4_sun4vt1,ASI_AIUS)	! 0x0a8 spill_2_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0ac spill_3_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0b0 spill_4_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0b4 spill_5_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0b8 spill_6_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0bc spill_7_other
+	FILL64(ufill8_sun4vt1,ASI_AIUS)				! 0x0c0 fill_0_normal -- fill windows when running nucleus mode from user
+	FILL32(ufill4_sun4vt1,ASI_AIUS)				! 0x0c4 fill_1_normal
+	FILLBOTH(ufill8_sun4vt1,ufill4_sun4vt1,ASI_AIUS)	! 0x0c8 fill_2_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0cc fill_3_normal
+	FILL64(kfill8_sun4vt1,ASI_N)				! 0x0d0 fill_4_normal -- fill windows when running nucleus mode from supervisor
+	FILL32(kfill4_sun4vt1,ASI_N)				! 0x0d4 fill_5_normal
+	FILLBOTH(kfill8_sun4vt1,kfill4_sun4vt1,ASI_N)		! 0x0d8 fill_6_normal
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0dc fill_7_normal
+	FILL64(ufillk8_sun4vt1,ASI_AIUS)			! 0x0e0 fill_0_other -- fill user windows when running nucleus mode -- will we ever use this?
+	FILL32(ufillk4_sun4vt1,ASI_AIUS)			! 0x0e4 fill_1_other
+	FILLBOTH(ufillk8_sun4vt1,ufillk4_sun4vt1,ASI_AIUS)	! 0x0e8 fill_2_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0ec fill_3_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0f0 fill_4_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0f4 fill_5_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0f8 fill_6_other
+	sun4v_trap_entry_spill_fill_fail 1			! 0x0fc fill_7_other
+	sun4v_trap_entry_fail 256				! 0x100-0x1ff
 
 #endif
 		

Reply via email to