prototype for a function, try to make the code more simple, guard against a
potential NULL pointer dereference, and improve printing.
No functional change intended.
- rename pseg_get() and pseg_set() to pseg_get_real() and pseg_set_real().
- if USE_LOCKSAFE_PSEG_GETSET is defined, which it current is by default,
define pseg_[gs]et() in terms of functions that take a new pseg_lock
mutex at IPL_VM while calling into the real functions.
this seems to avoid the pseg_set() crashes we've seen:
1 - spare needed, when pseg_get() just worked for this pmap
2 - the 2rd ldxa via ASI_PHYS_CACHED in pseg_set() loads garbage
into %o4, and causes the 3rd ldxa to fault
- get geometry and framebuffer layout from the chip instead of hardcoding
- get rid of some now superfluous leftovers
- remove some debug code
- clean things up a bit
- dump registers with WCFB_DEBUG even if we're not the console
by XENMEM_decrease_reservation, it is checked by the hypervisor. In certain
circumstances (stack leak), the field could have an improper value, leading
to a fail of the hypercall.
Set it to 0 ("no addressing restriction") to avoid that.
Patch tested by Sam Fourman and haad@.
This should fix the rare "failed allocating DMA memory" encountered
under NetBSD dom0. Will ask for a pull-up.
each framebuffer ) - this gives quite a dramatic speedup and hides the funky
effects previously seen.
Almost there, now we need to actually draw a cursor.
Instead of copulating with newfs to produce a new FFS image into
memory, mmap() a given existing image and pass that as the backing
store. If -s is given, mmap is done with MAP_SHARED and changes
are kept across mounts, else MAP_COPY (i.e. MAP_PRIVATE for us) is
done and changes are lost when the server exits.
Note: -s does not guarantee any kind of file system safety whatsoever
and in case of kill, crash, exit or other form of elusion,
everything will be, according to our theme, quite screwed.
mfs uses the mounting process for the backing store memory. I
guess mfs could be fixed to just reference the process vmspace and
let it return, but that would probably cause wait() to return for
other worms. So it's easier to dance according to mfs's tune: if
mounting mfs, create a thread for extra execution context.