Port-sparc64 archive

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

Re: NetBSD sun4v trap levels



On Sun, 25 Oct 2026, Sad Clouds wrote:

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?

The code was imported from OpenBSD years ago.

The SPILL handlers branches to specific functions.
This is the way OpenBSD does and it seems to work ok.

The FILL handles seems to be dead code - none of the FILL traps are
executed when I run a quick test of the kernel.
Apparently they where added by me back in 2014.
I should remove these FILL traps and call sun4v_trap_entry_spill_fill_fail instead.


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

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


Good question - I will consider this as well.

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?


Only TL=0 and TL=1 a valid for sun4v - TL=2 and above is or sun4u only


Home | Main Index | Thread Index | Old Index