From 99b43cc2bcdffd4ce2c3103fbb9a4c46644f4cea Mon Sep 17 00:00:00 2001 From: jonathan Date: Sun, 11 Aug 1996 23:30:22 +0000 Subject: [PATCH] * Apply LOCORE -> _LOCORE change so locore.S doesn't #include struct definitions. * Include in so kern_clock.c has user/kernel status bits in scope. Still needs work; r2k/r4k previous-mode bits are different. * Include in pica/include/param.h, for locore declarations, and definitions of vm and other constants that should be shared across NetBSD/mips systems to esnsure user-level binary compatibility. --- sys/arch/mips/include/mips3_pte.h | 10 +++++----- sys/arch/pica/include/cpu.h | 3 ++- sys/arch/pica/include/param.h | 11 ++++++++--- sys/arch/pica/include/pte.h | 10 +++++----- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/sys/arch/mips/include/mips3_pte.h b/sys/arch/mips/include/mips3_pte.h index 682cfad10f74..fb0bc4c3bd8e 100644 --- a/sys/arch/mips/include/mips3_pte.h +++ b/sys/arch/mips/include/mips3_pte.h @@ -1,4 +1,4 @@ -/* $NetBSD: mips3_pte.h,v 1.2 1996/07/16 23:24:33 thorpej Exp $ */ +/* $NetBSD: mips3_pte.h,v 1.3 1996/08/11 23:30:22 jonathan Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -46,7 +46,7 @@ * R4000 hardware page table entry */ -#ifndef LOCORE +#ifndef _LOCORE struct pte { #if BYTE_ORDER == BIG_ENDIAN unsigned int pg_prot:2, /* SW: access control */ @@ -81,7 +81,7 @@ typedef union pt_entry { unsigned int pt_entry; /* for copying, etc. */ struct pte pt_pte; /* for getting to bits by name */ } pt_entry_t; /* Mach page table entry */ -#endif /* LOCORE */ +#endif /* _LOCORE */ #define PT_ENTRY_NULL ((pt_entry_t *) 0) @@ -121,7 +121,7 @@ typedef union pt_entry { #define PG_SIZE_4M 0x007fe000 #define PG_SIZE_16M 0x01ffe000 -#if defined(_KERNEL) && !defined(LOCORE) +#if defined(_KERNEL) && !defined(_LOCORE) /* * Kernel virtual address to page table entry and visa versa. */ @@ -132,4 +132,4 @@ typedef union pt_entry { extern pt_entry_t *Sysmap; /* kernel pte table */ extern u_int Sysmapsize; /* number of pte's in Sysmap */ -#endif +#endif /* defined(_KERNEL) && !defined(_LOCORE) */ diff --git a/sys/arch/pica/include/cpu.h b/sys/arch/pica/include/cpu.h index ad6cea015d23..e15a723cc5a5 100644 --- a/sys/arch/pica/include/cpu.h +++ b/sys/arch/pica/include/cpu.h @@ -1,6 +1,7 @@ -/* $NetBSD: cpu.h,v 1.3 1996/03/31 04:16:46 jonathan Exp $ */ +/* $NetBSD: cpu.h,v 1.4 1996/08/11 23:30:25 jonathan Exp $ */ #include +#include /* * definitions of cpu-dependent requirements diff --git a/sys/arch/pica/include/param.h b/sys/arch/pica/include/param.h index 4a24dc4a8ae1..2e7c3e2432f6 100644 --- a/sys/arch/pica/include/param.h +++ b/sys/arch/pica/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.2 1996/07/16 23:24:28 thorpej Exp $ */ +/* $NetBSD: param.h,v 1.3 1996/08/11 23:30:24 jonathan Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -43,6 +43,11 @@ * from: @(#)param.h 8.1 (Berkeley) 6/10/93 */ +/* + * Machine-dependent constants (VM, etc) common across MIPS cpus + */ +#include + /* * Machine dependent constants for Acer Labs PICA_61. */ @@ -145,7 +150,7 @@ #define pica_ptob(x) ((unsigned)(x) << PGSHIFT) #ifdef _KERNEL -#ifndef LOCORE +#ifndef _LOCORE extern int (*Mach_splnet)(), (*Mach_splbio)(), (*Mach_splimp)(), (*Mach_spltty)(), (*Mach_splclock)(), (*Mach_splstatclock)(); #define splnet() ((*Mach_splnet)()) @@ -161,7 +166,7 @@ extern int (*Mach_splnet)(), (*Mach_splbio)(), (*Mach_splimp)(), */ extern int cpuspeed; #define DELAY(n) { register int N = cpuspeed * (n); while ((N -= 3) > 0); } -#endif +#endif /*!_LOCORE */ #else /* !_KERNEL */ #define DELAY(n) { register int N = (n); while (--N > 0); } diff --git a/sys/arch/pica/include/pte.h b/sys/arch/pica/include/pte.h index a1110fd9fae1..dabeb190f21f 100644 --- a/sys/arch/pica/include/pte.h +++ b/sys/arch/pica/include/pte.h @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.2 1996/07/16 23:24:33 thorpej Exp $ */ +/* $NetBSD: pte.h,v 1.3 1996/08/11 23:30:22 jonathan Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -46,7 +46,7 @@ * R4000 hardware page table entry */ -#ifndef LOCORE +#ifndef _LOCORE struct pte { #if BYTE_ORDER == BIG_ENDIAN unsigned int pg_prot:2, /* SW: access control */ @@ -81,7 +81,7 @@ typedef union pt_entry { unsigned int pt_entry; /* for copying, etc. */ struct pte pt_pte; /* for getting to bits by name */ } pt_entry_t; /* Mach page table entry */ -#endif /* LOCORE */ +#endif /* _LOCORE */ #define PT_ENTRY_NULL ((pt_entry_t *) 0) @@ -121,7 +121,7 @@ typedef union pt_entry { #define PG_SIZE_4M 0x007fe000 #define PG_SIZE_16M 0x01ffe000 -#if defined(_KERNEL) && !defined(LOCORE) +#if defined(_KERNEL) && !defined(_LOCORE) /* * Kernel virtual address to page table entry and visa versa. */ @@ -132,4 +132,4 @@ typedef union pt_entry { extern pt_entry_t *Sysmap; /* kernel pte table */ extern u_int Sysmapsize; /* number of pte's in Sysmap */ -#endif +#endif /* defined(_KERNEL) && !defined(_LOCORE) */