|
Description
|
The current sparc brand system call wrappers only exist on sun4u.
this makes developing any brands that can run on sun4v difficult.
the solution here involves multiple changes. first the platform
specific part of the brand module will be moved from the sun4u section
of the source tree into the sun4 section. there are also Makefile and
packaging changes since now two copies of the brand module will be
delivered on sparc, one for sun4u platforms and one for sun4v platforms.
the brand module will also now have some if'defd code to deal with both
these platforms.
the main difference between the two platforms (sun4u and sun4v) is how
switches between the normal globals (NGs) and alternate globals (AGs)
are handled. on sun4u, switching between the two involves making changes
to the pstate register. on sun4v it involves changing the %gl register
(note that's gee-ell, as in the letter L and not gee-one, as in the number 1.)
also, another very important difference between sun4u and sun4v is that
on sun4u, which you switch away from the AG registers and then switch back
to them, their contents have not changed. on sun4v, if you switch away
from the AGs and then back to the AGs, the contents of the AGs are now
undefined. so essentially on sun4v you can't store any kind of persistant
data in AG registers when your switching between AGs and NGs. This is a
problems since the brand module callback handler as two input parameters
(a return address and a point to the current cpu structure) which are passed
in via the AG registers. To deal with this we've added two more temporary
variables (bringing the total to four) in the machcpu structure so that
the brand module has a place to store these input parameters when switching
between AGs and NGs on sun4v.
|