home *** CD-ROM | disk | FTP | other *** search
- /*
- * $Header: /ax/networking:include/machine/machparam.h:networking 1.1 $
- * $Source: /ax/networking:include/machine/machparam.h: $
- *
- * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
- *
- * $Log: machparam.h,v $
- * Revision 1.1 95/01/11 10:14:38 kwelton
- * Initial revision
- *
- * Revision 1.4 88/10/25 13:31:55 brian
- * Macro 'btowholec' added.
- *
- * Revision 1.3 88/06/17 20:08:08 beta
- * Acorn Unix initial beta version
- *
- */
- /*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- *
- * @(#)machparam.h 7.1 (Berkeley) 6/5/86
- */
-
- /*
- * Machine dependent constants for ARM.
- */
- #define KTLBASE 512 /* kernel text logical page base */
- #define PMLBASE 1024 /* physical memory logical page base */
- #define NBPG 32768 /* bytes/page */
- #define PGOFSET (NBPG-1) /* byte offset into page */
- #define PGSHIFT 15 /* LOG2(NBPG) */
- #define CLSIZE 1
- #define CLSIZELOG2 0
- #define SSIZE 1 /* initial stack size/NBPG */
- #define SINCR 1 /* increment of stack/NBPG */
- #define UPAGES 1 /* pages of u-area */
-
- /*
- * Some macros for units conversion
- */
- /* Core clicks (32768 bytes) to segments and vice versa */
- #define ctos(x) (x)
- #define stoc(x) (x)
-
- /* Core clicks (32768 bytes) to disk blocks */
-
- #define ctod(x) ((x)*NBPG/512)
- #define dtoc(x) ((x)*512/NBPG)
-
- #define dtob(x) ((x)*512)
-
- /* clicks to bytes */
- #define ctob(x) ((x)*NBPG)
-
- /* bytes to clicks */
- #define btoc(x) (((unsigned)(x)+(NBPG-1))/NBPG)
-
- /* the number of whole clicks in a number of bytes */
- #define btowholec(x) ((unsigned)(x)/NBPG)
-
- /*
- * Macros to decode processor status word.
- */
-
- # define USER_MODE 0
- # define SUPER_MODE 3
- # define IS_USER_MODE(mode) ((mode) == USER_MODE)
-
- #define BASEPRI(pc) (((pc)&3)==0)
-
- #ifdef KERNEL
- #ifndef LOCORE
- int cpuspeed;
- #endif
- #define DELAY(n) { register int N = cpuspeed * (n); while (--N > 0); }
-
- #else KERNEL
- #define DELAY(n) { register int N = (n); while (--N > 0); }
- #endif KERNEL
-
- /* EOF machparam.h */
-