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.
This commit is contained in:
Marcel Moolenaar 2002-05-19 04:42:19 +00:00
parent d517fd1c4c
commit 23c12a63cf
20 changed files with 53 additions and 27 deletions

View File

@ -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)

View File

@ -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>

View File

@ -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)

View File

@ -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>

View File

@ -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)

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -28,6 +28,8 @@
#include "acpi.h"
#include <machine/cpu.h>
struct sapic *sapic_create(int, int, u_int64_t);
#pragma pack(1)

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -32,6 +32,7 @@
#include <sys/malloc.h>
#include <sys/queue.h>
#include <machine/frame.h>
#include <machine/unwind.h>
#include <machine/rse.h>

View File

@ -33,6 +33,7 @@
#include <sys/types.h>
#include <machine/ia64_cpu.h>
#include <machine/vmparam.h>
struct thread;

View File

@ -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_ */

View File

@ -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
/*

View File

@ -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 */

View File

@ -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
@ -120,6 +120,15 @@
#define SAFERSS 10 /* nominal ``small'' resident set size
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 */