Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD sun4v trap levels



Below is a fragment of NetBSD trap table for sun4v when TL > 0. Can anyone
explain to me why "save user windows..." trap handlers branch to
specific functions, while all the others use FILL{64/32/BOTH} inline
definitions?

https://mail-index.netbsd.org/source-changes-hg/2021/02/22/msg272486.html

Why this is relevant only to spill and not fill handlers?

For sun4v MAXPTL=2 so why can't the kernel running spill/fill handler
at TL=1 take a nested trap (e.g. text/data fault) and handle it at TL=2?

! Save user windows
sun4v_tl1_uspill_normal                                 ! 0x080 spill_0_normal
sun4v_tl1_uspill_normal                                 ! 0x084 spill_1_normal
sun4v_tl1_uspill_normal                                 ! 0x088 spill_2_normal
sun4v_trap_entry_spill_fill_fail 1                      ! 0x08c spill_3_normal

! Save supervisor windows
SPILL64(kspill8_sun4vt1,ASI_N)                          ! 0x090 spill_4_normal
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

! Save user windows in nucleus mode
sun4v_tl1_uspill_other                                  ! 0x0a0 spill_0_other
sun4v_tl1_uspill_other                                  ! 0x0a4 spill_1_other
sun4v_tl1_uspill_other                                  ! 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

! Fill windows when running nucleus mode from user
FILL64(ufill8_sun4vt1,ASI_AIUS)                         ! 0x0c0 fill_0_normal
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

! Fill windows when running nucleus mode from supervisor
FILL64(kfill8_sun4vt1,ASI_N)                            ! 0x0d0 fill_4_normal
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

! Fill user windows when running nucleus mode -- will we ever use this?
FILL64(ufillk8_sun4vt1,ASI_AIUS)                        ! 0x0e0 fill_0_other
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


Home | Main Index | Thread Index | Old Index