cvs commit: src/sys/i386/i386 locore.s machdep.c mp_machdep.c
pmap.c src/sys/i386/include pmap.h
Peter Wemm
peter at FreeBSD.org
Tue Nov 13 15:00:26 PST 2007
peter 2007-11-13 23:00:24 UTC
FreeBSD src repository
Modified files:
sys/i386/i386 locore.s machdep.c mp_machdep.c pmap.c
sys/i386/include pmap.h
Log:
Drastically simplify the i386 pcpu backend by merging parts of the
amd64 mechanism over. Instead of page table hackery that isn't
actually needed, just use 'struct pcpu __pcpu[MAXCPU]' for backing like
all the other platforms do. Get rid of 'struct privatespace' and a
while mess of #ifdef SMP garbage that set it up. As a bonus, this
returns the 4MB of KVA that we stole to implement it the old way.
This also allows you to read the pcpu data for each cpu when reading a
minidump.
Background information: Originally, pcpu stuff was implemented as having
per-cpu page tables and magic to make different data structures appear
at the same actual address. In order to share page tables, we switched
to using the GDT and %fs/%gs to access it. But we still did the evil
magic to set it up for the old way. The "idle stacks" are not used
for the idle process anymore and are just used for a few functions during
bootup, then ignored. (excercise for reader: free these afterwards).
Revision Changes Path
1.189 +0 -65 src/sys/i386/i386/locore.s
1.661 +2 -9 src/sys/i386/i386/machdep.c
1.282 +22 -45 src/sys/i386/i386/mp_machdep.c
1.598 +0 -10 src/sys/i386/i386/pmap.c
1.129 +1 -12 src/sys/i386/include/pmap.h
More information about the cvs-src
mailing list