diff options
author | marcel <marcel@FreeBSD.org> | 2002-05-19 04:42:19 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2002-05-19 04:42:19 +0000 |
commit | 768ae8ea9a50721cc32f333ab616d292a9f546ae (patch) | |
tree | 75f802a17493a7feda489841feeaba7eec5a3397 | |
parent | 1d9bed166c9114d035925645959f30f03030bc21 (diff) | |
download | FreeBSD-src-768ae8ea9a50721cc32f333ab616d292a9f546ae.zip FreeBSD-src-768ae8ea9a50721cc32f333ab616d292a9f546ae.tar.gz |
o Remove namespace pollution from param.h:
- Don't include ia64_cpu.h and cpu.h
- Guard definitions by _NO_NAMESPACE_POLLUTION
- Move definition of KERNBASE to vmparam.h
o Move definitions of IA64_RR_{BASE|MASK} to vmparam.h
o Move definitions of IA64_PHYS_TO_RR{6|7} to vmparam.h
o While here, remove some left-over Alpha references.
-rw-r--r-- | sys/boot/efi/libefi/copy.c | 1 | ||||
-rw-r--r-- | sys/boot/efi/libefi/elf_freebsd.c | 2 | ||||
-rw-r--r-- | sys/boot/ia64/common/copy.c | 1 | ||||
-rw-r--r-- | sys/boot/ia64/common/exec.c | 2 | ||||
-rw-r--r-- | sys/boot/ia64/libski/copy.c | 1 | ||||
-rw-r--r-- | sys/boot/ia64/libski/elf_freebsd.c | 2 | ||||
-rw-r--r-- | sys/boot/ia64/ski/copy.c | 1 | ||||
-rw-r--r-- | sys/boot/ia64/ski/elf_freebsd.c | 2 | ||||
-rw-r--r-- | sys/ia64/acpica/madt.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/interrupt.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 1 | ||||
-rw-r--r-- | sys/ia64/ia64/mem.c | 1 | ||||
-rw-r--r-- | sys/ia64/ia64/mp_machdep.c | 1 | ||||
-rw-r--r-- | sys/ia64/ia64/trap.c | 1 | ||||
-rw-r--r-- | sys/ia64/ia64/unwind.c | 1 | ||||
-rw-r--r-- | sys/ia64/include/cpufunc.h | 1 | ||||
-rw-r--r-- | sys/ia64/include/db_machdep.h | 7 | ||||
-rw-r--r-- | sys/ia64/include/ia64_cpu.h | 9 | ||||
-rw-r--r-- | sys/ia64/include/param.h | 23 | ||||
-rw-r--r-- | sys/ia64/include/vmparam.h | 19 |
20 files changed, 53 insertions, 27 deletions
diff --git a/sys/boot/efi/libefi/copy.c b/sys/boot/efi/libefi/copy.c index a2bb6fe..be1fcef 100644 --- a/sys/boot/efi/libefi/copy.c +++ b/sys/boot/efi/libefi/copy.c @@ -37,6 +37,7 @@ static const char rcsid[] = #include <efi.h> #include <efilib.h> #include <machine/ia64_cpu.h> +#include <machine/vmparam.h> int efi_copyin(void *src, vm_offset_t dest, size_t len) diff --git a/sys/boot/efi/libefi/elf_freebsd.c b/sys/boot/efi/libefi/elf_freebsd.c index c98f93c..5c95d0f 100644 --- a/sys/boot/efi/libefi/elf_freebsd.c +++ b/sys/boot/efi/libefi/elf_freebsd.c @@ -83,7 +83,9 @@ #include <sys/linker.h> #include <machine/elf.h> #include <machine/bootinfo.h> +#include <machine/ia64_cpu.h> #include <machine/pte.h> +#include <machine/vmparam.h> #include <efi.h> #include <efilib.h> diff --git a/sys/boot/ia64/common/copy.c b/sys/boot/ia64/common/copy.c index a2bb6fe..be1fcef 100644 --- a/sys/boot/ia64/common/copy.c +++ b/sys/boot/ia64/common/copy.c @@ -37,6 +37,7 @@ static const char rcsid[] = #include <efi.h> #include <efilib.h> #include <machine/ia64_cpu.h> +#include <machine/vmparam.h> int efi_copyin(void *src, vm_offset_t dest, size_t len) diff --git a/sys/boot/ia64/common/exec.c b/sys/boot/ia64/common/exec.c index c98f93c..5c95d0f 100644 --- a/sys/boot/ia64/common/exec.c +++ b/sys/boot/ia64/common/exec.c @@ -83,7 +83,9 @@ #include <sys/linker.h> #include <machine/elf.h> #include <machine/bootinfo.h> +#include <machine/ia64_cpu.h> #include <machine/pte.h> +#include <machine/vmparam.h> #include <efi.h> #include <efilib.h> diff --git a/sys/boot/ia64/libski/copy.c b/sys/boot/ia64/libski/copy.c index 4445460..d5c0623 100644 --- a/sys/boot/ia64/libski/copy.c +++ b/sys/boot/ia64/libski/copy.c @@ -37,6 +37,7 @@ static const char rcsid[] = #include <stand.h> #include <machine/ia64_cpu.h> +#include <machine/vmparam.h> int ski_copyin(void *src, vm_offset_t dest, size_t len) diff --git a/sys/boot/ia64/libski/elf_freebsd.c b/sys/boot/ia64/libski/elf_freebsd.c index 6465d8a..461ef12 100644 --- a/sys/boot/ia64/libski/elf_freebsd.c +++ b/sys/boot/ia64/libski/elf_freebsd.c @@ -83,6 +83,8 @@ #include <sys/linker.h> #include <machine/elf.h> #include <machine/bootinfo.h> +#include <machine/ia64_cpu.h> +#include <machine/vmparam.h> #include "bootstrap.h" #include "libski.h" diff --git a/sys/boot/ia64/ski/copy.c b/sys/boot/ia64/ski/copy.c index 4445460..d5c0623 100644 --- a/sys/boot/ia64/ski/copy.c +++ b/sys/boot/ia64/ski/copy.c @@ -37,6 +37,7 @@ static const char rcsid[] = #include <stand.h> #include <machine/ia64_cpu.h> +#include <machine/vmparam.h> int ski_copyin(void *src, vm_offset_t dest, size_t len) diff --git a/sys/boot/ia64/ski/elf_freebsd.c b/sys/boot/ia64/ski/elf_freebsd.c index 6465d8a..461ef12 100644 --- a/sys/boot/ia64/ski/elf_freebsd.c +++ b/sys/boot/ia64/ski/elf_freebsd.c @@ -83,6 +83,8 @@ #include <sys/linker.h> #include <machine/elf.h> #include <machine/bootinfo.h> +#include <machine/ia64_cpu.h> +#include <machine/vmparam.h> #include "bootstrap.h" #include "libski.h" diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c index 0ddd374..d827311 100644 --- a/sys/ia64/acpica/madt.c +++ b/sys/ia64/acpica/madt.c @@ -28,6 +28,8 @@ #include "acpi.h" +#include <machine/cpu.h> + struct sapic *sapic_create(int, int, u_int64_t); #pragma pack(1) diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index ec26586..8048868 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -52,9 +52,11 @@ #include <sys/smp.h> #include <machine/clock.h> +#include <machine/cpu.h> #include <machine/reg.h> #include <machine/frame.h> #include <machine/intr.h> +#include <machine/pcb.h> #include <machine/sapicvar.h> #include <machine/smp.h> diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 794ee87..1780335 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -69,6 +69,7 @@ #include <sys/user.h> #include <sys/ptrace.h> #include <machine/clock.h> +#include <machine/cpu.h> #include <machine/md_var.h> #include <machine/reg.h> #include <machine/fpu.h> diff --git a/sys/ia64/ia64/mem.c b/sys/ia64/ia64/mem.c index 4ab2292..db98aec 100644 --- a/sys/ia64/ia64/mem.c +++ b/sys/ia64/ia64/mem.c @@ -59,6 +59,7 @@ #include <sys/systm.h> #include <sys/uio.h> +#include <machine/cpu.h> #include <machine/frame.h> #ifdef PERFMON #include <machine/perfmon.h> diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c index cc7e181..4eb141c 100644 --- a/sys/ia64/ia64/mp_machdep.c +++ b/sys/ia64/ia64/mp_machdep.c @@ -44,6 +44,7 @@ #include <vm/vm_kern.h> #include <machine/atomic.h> +#include <machine/cpu.h> #include <machine/pal.h> #include <machine/pcb.h> #include <machine/pmap.h> diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index eac7272..790e1b6 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -55,6 +55,7 @@ #include <sys/user.h> #include <sys/ptrace.h> #include <machine/clock.h> +#include <machine/cpu.h> #include <machine/md_var.h> #include <machine/reg.h> #include <machine/pal.h> diff --git a/sys/ia64/ia64/unwind.c b/sys/ia64/ia64/unwind.c index 877d699..4c0e4de 100644 --- a/sys/ia64/ia64/unwind.c +++ b/sys/ia64/ia64/unwind.c @@ -32,6 +32,7 @@ #include <sys/malloc.h> #include <sys/queue.h> +#include <machine/frame.h> #include <machine/unwind.h> #include <machine/rse.h> diff --git a/sys/ia64/include/cpufunc.h b/sys/ia64/include/cpufunc.h index 5569ab0..ce1cbb7 100644 --- a/sys/ia64/include/cpufunc.h +++ b/sys/ia64/include/cpufunc.h @@ -33,6 +33,7 @@ #include <sys/types.h> #include <machine/ia64_cpu.h> +#include <machine/vmparam.h> struct thread; diff --git a/sys/ia64/include/db_machdep.h b/sys/ia64/include/db_machdep.h index aed18e1..9a54356 100644 --- a/sys/ia64/include/db_machdep.h +++ b/sys/ia64/include/db_machdep.h @@ -28,8 +28,8 @@ * rights to redistribute these changes. */ -#ifndef _ALPHA_DB_MACHDEP_H_ -#define _ALPHA_DB_MACHDEP_H_ +#ifndef _MACHINE_DB_MACHDEP_H_ +#define _MACHINE_DB_MACHDEP_H_ /* * Machine-dependent defines for new kernel debugger. @@ -38,6 +38,7 @@ #include <sys/param.h> #include <vm/vm.h> #include <machine/frame.h> +#include <machine/ia64_cpu.h> #define DB_NO_AOUT @@ -110,4 +111,4 @@ void db_skip_breakpoint(void); */ #define DB_ELFSIZE 64 -#endif /* _ALPHA_DB_MACHDEP_H_ */ +#endif /* _MACHINE_DB_MACHDEP_H_ */ diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h index b2e0bff..04f14db 100644 --- a/sys/ia64/include/ia64_cpu.h +++ b/sys/ia64/include/ia64_cpu.h @@ -148,15 +148,6 @@ #define IA32_INTERCEPT_SYSTEM_FLAG 2 #define IA32_INTERCEPT_LOCK 4 -/* - * Manipulating region bits of an address. - */ -#define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61) -#define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1)) - -#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) -#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) - #ifndef LOCORE /* diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h index cd8dd18..1d6fcb8 100644 --- a/sys/ia64/include/param.h +++ b/sys/ia64/include/param.h @@ -70,20 +70,23 @@ #ifndef _MACHINE #define _MACHINE ia64 #endif -#ifndef MACHINE -#define MACHINE "ia64" -#endif #ifndef _MACHINE_ARCH #define _MACHINE_ARCH ia64 #endif + +#ifndef _NO_NAMESPACE_POLLUTION + +#ifndef _MACHINE_PARAM_H_ +#define _MACHINE_PARAM_H_ + +#ifndef MACHINE +#define MACHINE "ia64" +#endif #ifndef MACHINE_ARCH #define MACHINE_ARCH "ia64" #endif #define MID_MACHINE MID_IA64 -#include <machine/ia64_cpu.h> -#include <machine/cpu.h> - /* * OBJFORMAT_NAMES is a comma-separated list of the object formats * that are supported on the architecture. @@ -132,9 +135,6 @@ #define PAGE_MASK (PAGE_SIZE-1) #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) -#define KERNBASE 0xfffffc0000300000LL /* start of kernel virtual */ -#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) - #define CLSIZE 1 #define CLSIZELOG2 0 @@ -145,8 +145,6 @@ #define KSTACK_PAGES 4 /* pages of kernel stack */ #define UAREA_PAGES 1 /* pages of u-area */ -/* #define KSTACK_GUARD */ /* compile in kstack guard page */ - /* * Mach derived conversion macros */ @@ -160,3 +158,6 @@ #define ia64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) + +#endif /* !_MACHINE_PARAM_H_ */ +#endif /* !_NO_NAMESPACE_POLLUTION */ diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h index 7c95037..92f2568 100644 --- a/sys/ia64/include/vmparam.h +++ b/sys/ia64/include/vmparam.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* From: NetBSD: vmparam.h,v 1.6 1997/09/23 23:23:23 mjacob Exp */ -#ifndef _ALPHA_VMPARAM_H -#define _ALPHA_VMPARAM_H +#ifndef _MACHINE_VMPARAM_H +#define _MACHINE_VMPARAM_H /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ /* - * Machine dependent constants for Alpha. + * Machine dependent constants for ia64. */ /* * USRTEXT is the start of the user text/data space, while USRSTACK @@ -121,6 +121,15 @@ protected against replacement */ /* + * Manipulating region bits of an address. + */ +#define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61) +#define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1)) + +#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) +#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) + +/* * Mach derived constants */ @@ -131,6 +140,8 @@ #define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(5) #define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1) +#define KERNBASE (VM_MIN_KERNEL_ADDRESS) + /* virtual sizes (bytes) for various kernel submaps */ #ifndef VM_KMEM_SIZE #define VM_KMEM_SIZE (12 * 1024 * 1024) @@ -150,4 +161,4 @@ #define VM_INITIAL_PAGEIN 16 #endif -#endif /* !_ALPHA_VMPARAM_H */ +#endif /* !_MACHINE_VMPARAM_H */ |