* Apply LOCORE -> _LOCORE change so locore.S doesn't #include struct

definitions.

* Include <mips/cpuregs.h> in <cpu.h> so kern_clock.c has user/kernel
  status bits in scope.  Still needs  work; r2k/r4k previous-mode bits
  are different.

* Include <mips/mips_param.h> 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.
This commit is contained in:
jonathan 1996-08-11 23:30:22 +00:00
parent 14bd2765a1
commit 99b43cc2bc
4 changed files with 20 additions and 14 deletions

View File

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

View File

@ -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 <mips/cpu.h>
#include <mips/cpuregs.h>
/*
* definitions of cpu-dependent requirements

View File

@ -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 <mips/mips_param.h>
/*
* 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); }

View File

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