diff options
author | grehan <grehan@FreeBSD.org> | 2004-02-11 07:27:34 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2004-02-11 07:27:34 +0000 |
commit | cf91052361590ecb2b4c952b3722b496516f4287 (patch) | |
tree | e4823e473382c2aa93ccc87ad7c5a76631560c39 /sys/powerpc | |
parent | 2f334f4f85ed68c71028b7ae416fec6a71dd2f3c (diff) | |
download | FreeBSD-src-cf91052361590ecb2b4c952b3722b496516f4287.zip FreeBSD-src-cf91052361590ecb2b4c952b3722b496516f4287.tar.gz |
Cleaned up param.h:
- culled long-dead #define's
- segment register defs moved to sr.h
- NPMAPS moved to pmap.h
- KERNBASE moved to vmparam.h
- removed include of <machine/cpu.h> and fixed src files that
relied on this.
Modifying segment register code no longer causes gcc rebuilds :-)
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/aim/copyinout.c | 3 | ||||
-rw-r--r-- | sys/powerpc/aim/machdep.c | 1 | ||||
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 1 | ||||
-rw-r--r-- | sys/powerpc/include/param.h | 30 | ||||
-rw-r--r-- | sys/powerpc/include/pmap.h | 4 | ||||
-rw-r--r-- | sys/powerpc/include/sr.h | 10 | ||||
-rw-r--r-- | sys/powerpc/include/vmparam.h | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/copyinout.c | 3 | ||||
-rw-r--r-- | sys/powerpc/powerpc/db_memrw.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powerpc/mmu_oea.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powerpc/pmap.c | 1 |
12 files changed, 28 insertions, 30 deletions
diff --git a/sys/powerpc/aim/copyinout.c b/sys/powerpc/aim/copyinout.c index f916351..5ef42ca 100644 --- a/sys/powerpc/aim/copyinout.c +++ b/sys/powerpc/aim/copyinout.c @@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <vm/vm_map.h> +#include <machine/pcb.h> +#include <machine/sr.h> + int setfault(faultbuf); /* defined in locore.S */ /* diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index e87851a..b19ce6e 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -100,6 +100,7 @@ __FBSDID("$FreeBSD$"); #include <sys/ptrace.h> #include <machine/bat.h> #include <machine/clock.h> +#include <machine/cpu.h> #include <machine/md_var.h> #include <machine/metadata.h> #include <machine/reg.h> diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 77ebf65..ddab773 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -140,6 +140,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_pager.h> #include <vm/uma.h> +#include <machine/cpu.h> #include <machine/powerpc.h> #include <machine/bat.h> #include <machine/frame.h> diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h index 6180b66..dd6dd8b 100644 --- a/sys/powerpc/include/param.h +++ b/sys/powerpc/include/param.h @@ -76,10 +76,6 @@ #endif #define MID_MACHINE MID_POWERPC -#if !defined(LOCORE) -#include <machine/cpu.h> -#endif - #ifdef SMP #define MAXCPU 2 #else @@ -94,9 +90,6 @@ #define PAGE_MASK (PAGE_SIZE - 1) #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) -#define KERNBASE 0x100000 /* start of kernel virtual */ -#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) - #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* includes pcb */ #endif @@ -120,28 +113,5 @@ #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) -/* XXX: NetBSD defines that we're using for the moment */ -#define USER_SR 13 -#define KERNEL_SR 14 -#define KERNEL_VSIDBITS 0xfffff -#define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR) -#define EMPTY_SEGMENT 0xfffff0 -#define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHFT)) -#define SEGMENT_LENGTH 0x10000000 -#define SEGMENT_MASK 0xf0000000 - -#if !defined(NPMAPS) -#define NPMAPS 32768 -#endif /* !defined(NPMAPS) */ - -#if !defined(MSGBUFSIZE) -#define MSGBUFSIZE PAGE_SIZE -#endif /* !defined(MSGBUFSIZE) */ - -/* - * XXX: Stop NetBSD msgbuf_paddr code from happening. - */ -#define MSGBUFADDR - #endif /* !_MACHINE_PARAM_H_ */ #endif /* !_NO_NAMESPACE_POLLUTION */ diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index 98f354d..73f11b3 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -37,6 +37,10 @@ #include <machine/sr.h> +#if !defined(NPMAPS) +#define NPMAPS 32768 +#endif /* !defined(NPMAPS) */ + struct pmap { u_int pm_sr[16]; u_int pm_active; diff --git a/sys/powerpc/include/sr.h b/sys/powerpc/include/sr.h index 4490964..e4a29ec 100644 --- a/sys/powerpc/include/sr.h +++ b/sys/powerpc/include/sr.h @@ -41,4 +41,14 @@ #define SR_N 0x10000000 /* No-execute protection */ #define SR_VSID_MASK 0x00ffffff /* Virtual Segment ID mask */ +/* Kernel segment register usage */ +#define USER_SR 13 +#define KERNEL_SR 14 +#define KERNEL_VSIDBITS 0xfffff +#define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR) +#define EMPTY_SEGMENT 0xfffff0 +#define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHFT)) +#define SEGMENT_LENGTH 0x10000000 +#define SEGMENT_MASK 0xf0000000 + #endif /* !_MACHINE_SR_H_ */ diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index 41e7480..588d712 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -96,6 +96,8 @@ #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1) +#define KERNBASE 0x100000 /* start of kernel virtual */ + /* XXX max. amount of KVM to be used by buffers. */ #ifndef VM_MAX_KERNEL_BUF #define VM_MAX_KERNEL_BUF (SEGMENT_LENGTH * 7 / 10) diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c index f916351..5ef42ca 100644 --- a/sys/powerpc/powerpc/copyinout.c +++ b/sys/powerpc/powerpc/copyinout.c @@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <vm/vm_map.h> +#include <machine/pcb.h> +#include <machine/sr.h> + int setfault(faultbuf); /* defined in locore.S */ /* diff --git a/sys/powerpc/powerpc/db_memrw.c b/sys/powerpc/powerpc/db_memrw.c index ccfc408..bebedff 100644 --- a/sys/powerpc/powerpc/db_memrw.c +++ b/sys/powerpc/powerpc/db_memrw.c @@ -45,6 +45,7 @@ #include <vm/vm.h> #include <vm/vm_extern.h> +#include <machine/cpu.h> #include <machine/db_machdep.h> #include <ddb/ddb.h> diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index e87851a..b19ce6e 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -100,6 +100,7 @@ __FBSDID("$FreeBSD$"); #include <sys/ptrace.h> #include <machine/bat.h> #include <machine/clock.h> +#include <machine/cpu.h> #include <machine/md_var.h> #include <machine/metadata.h> #include <machine/reg.h> diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c index 77ebf65..ddab773 100644 --- a/sys/powerpc/powerpc/mmu_oea.c +++ b/sys/powerpc/powerpc/mmu_oea.c @@ -140,6 +140,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_pager.h> #include <vm/uma.h> +#include <machine/cpu.h> #include <machine/powerpc.h> #include <machine/bat.h> #include <machine/frame.h> diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c index 77ebf65..ddab773 100644 --- a/sys/powerpc/powerpc/pmap.c +++ b/sys/powerpc/powerpc/pmap.c @@ -140,6 +140,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_pager.h> #include <vm/uma.h> +#include <machine/cpu.h> #include <machine/powerpc.h> #include <machine/bat.h> #include <machine/frame.h> |