diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-11-30 20:57:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-11-30 20:57:53 +0000 |
commit | 463b6bc74c14040de2242ab15ddb405114634436 (patch) | |
tree | 0ea5e8055f84d79ad2282f2cd76e69fcae5a127f /sys/arch/m68k | |
parent | e5704114a6582e75bde73693c3567b72b11d794f (diff) |
Factorize more definitions to enable the use of pmap_motorola.
Diffstat (limited to 'sys/arch/m68k')
-rw-r--r-- | sys/arch/m68k/include/param.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h index bafbc285e42..f948a1bcebe 100644 --- a/sys/arch/m68k/include/param.h +++ b/sys/arch/m68k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.4 2001/07/06 02:07:42 provos Exp $ */ +/* $OpenBSD: param.h,v 1.5 2001/11/30 20:57:52 miod Exp $ */ /* $NetBSD: param.h,v 1.2 1997/06/10 18:21:23 veego Exp $ */ /* @@ -81,9 +81,19 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ -/* mac68k, mvme68k and x68k 3 pages of u-area */ +#ifndef SEGSHIFT +#if defined(M68040) || defined(M68060) +#define SEGSHIFT ((mmutype <= MMU_68040) ? 18 : (34 - PGSHIFT)) +#else +#define SEGSHIFT (34 - PGSHIFT) +#endif +#define NBSEG (1 << SEGSHIFT) +#define SEGOFSET (NBSEG - 1) +#endif + +/* mac68k use 3 pages of u-area */ #ifndef UPAGES -# define UPAGES 2 /* pages of u-area */ +#define UPAGES 2 /* pages of u-area */ #endif #define USPACE (UPAGES * NBPG) @@ -97,7 +107,7 @@ #define MSIZE 256 /* size of an mbuf */ #ifndef MCLSHIFT -# define MCLSHIFT 11 /* convert bytes to m_buf clusters */ +#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ #endif /* MCLSHIFT */ #define MCLBYTES (1 << MCLSHIFT) @@ -140,4 +150,18 @@ #define m68k_btop(x) ((unsigned)(x) >> PGSHIFT) #define m68k_ptob(x) ((unsigned)(x) << PGSHIFT) +#ifdef COMPAT_HPUX +/* + * Constants/macros for HPUX multiple mapping of user address space. + * Pages in the first 256Mb are mapped in at every 256Mb segment. + */ +#define HPMMMASK 0xF0000000 +#define ISHPMMADDR(v) \ + ((curproc->p_md.md_flags & MDP_HPUXMMAP) && \ + ((unsigned)(v) & HPMMMASK) && \ + ((unsigned)(v) & HPMMMASK) != HPMMMASK) +#define HPMMBASEADDR(v) \ + ((unsigned)(v) & ~HPMMMASK) +#endif /* COMPAT_HPUX */ + #endif /* !_M68K_PARAM_H_ */ |