Subject: Use of SPRG0-3 on PowerPC & SMP issues
To: None <firstname.lastname@example.org>
From: Matt Thomas <email@example.com>
Date: 11/22/2000 19:21:37
In preperation of getting SMP working on my Powermac Dual G4-450
system, it seems a bunch of stuff needs to get cleaned up.
The first is that the relative lack of use of the SPRG0-3 registers
by NetBSD. Only SPRG1 is currently in use in trap_subr.S to store
away the SP (reg 1). The second is the use of globals to store all
the exeception state (tempsave, intstk, etc.) which is definitely
not friendly to SMP.
How to fix/solve this issues:
1) pullup the changes in macppc/include/cpu.h into powerpc/include/cpu.h
(and fix the other powerpc ports to eliminate introduced redunacies)
2) When a processor is initialized, a pointer to its cpu_info structure
is placed into SPGR3. No more statics are used and that information is
put into cpu_info (e.g tempsave) or pointer to it is in cpu_info (intstk).
3) (this just because it bugs me). curpm is changed to paddr_t instead of
struct pmap *, since it's the physical address of the current pmap and then
a bunch of casts can disappear.
This should actually result in a slightly faster system since a number of
global references will become register indexed.
Matt Thomas Internet: firstname.lastname@example.org
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message