diff options
author | peter <peter@FreeBSD.org> | 2007-11-13 23:00:24 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2007-11-13 23:00:24 +0000 |
commit | 7ed74e55f5cd97003c0d9dabda1fb29b50b3a448 (patch) | |
tree | f8dfbf48a0bce894931ba3e7c76388452ee65e29 /sys/i386/include | |
parent | 0e0d2af7e92da6f4326de410fc3a5de54b466043 (diff) | |
download | FreeBSD-src-7ed74e55f5cd97003c0d9dabda1fb29b50b3a448.zip FreeBSD-src-7ed74e55f5cd97003c0d9dabda1fb29b50b3a448.tar.gz |
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).
Diffstat (limited to 'sys/i386/include')
-rw-r--r-- | sys/i386/include/pmap.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 761be98..4d085d4 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -121,27 +121,16 @@ #endif #ifndef NKPDE -#ifdef SMP -#define NKPDE (KVA_PAGES - 1) /* number of page tables/pde's */ -#else #define NKPDE (KVA_PAGES) /* number of page tables/pde's */ #endif -#endif /* * The *PTDI values control the layout of virtual memory * * XXX This works for now, but I am not real happy with it, I'll fix it * right after I fix locore.s and the magic 28K hole - * - * SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff */ -#ifdef SMP -#define MPPTDI (NPDEPTD-1) /* per cpu ptd entry */ -#define KPTDI (MPPTDI-NKPDE) /* start of kernel virtual pde's */ -#else -#define KPTDI (NPDEPTD-NKPDE)/* start of kernel virtual pde's */ -#endif /* SMP */ +#define KPTDI (NPDEPTD-NKPDE) /* start of kernel virtual pde's */ #define PTDPTDI (KPTDI-NPGPTD) /* ptd entry that points to ptd! */ /* |