Commit Graph

217 Commits

Author SHA1 Message Date
Rodney W. Grimes c77ba36045 Fix definitions to be in terms of a minimum number of constants by
using the SHIFT value as the basis for the other values, for example
instead of:
#define		NBPG		4096
#define		PGSHIFT		12
use:
#define		PGSHIFT		12
#define		NBPG		(1 << PGSHIFT)

===================================================================
RCS file: /a/cvs/386BSD/src/sys/i386/include/param.h,v
retrieving revision 1.3
diff -c -r1.3 param.h
*** 1.3	1993/10/08 12:49:55
--- param.h	1993/10/08 12:53:19
***************
*** 52,76 ****
  #define ALIGNBYTES	(sizeof(int) - 1)
  #define ALIGN(p)	(((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)

- #define	NBPG		4096		/* bytes/page */
- #define	PGOFSET		(NBPG-1)	/* byte offset into page */
  #define	PGSHIFT		12		/* LOG2(NBPG) */
  #define	NPTEPG		(NBPG/(sizeof (struct pte)))

- #define NBPDR		(1024*NBPG)	/* bytes/page dir */
- #define	PDROFSET	(NBPDR-1)	/* byte offset into page dir */
  #define	PDRSHIFT	22		/* LOG2(NBPDR) */

  #define	KERNBASE	0xFE000000	/* start of kernel virtual */
  #define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)

! #define	DEV_BSIZE	512
  #define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
  #define BLKDEV_IOSIZE	2048
  #define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */

- #define	CLSIZE		1
  #define	CLSIZELOG2	0

  /* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
  #define	SSIZE	1		/* initial stack size/NBPG */
--- 52,79 ----
  #define ALIGNBYTES	(sizeof(int) - 1)
  #define ALIGN(p)	(((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)

  #define	PGSHIFT		12		/* LOG2(NBPG) */
+ #define	NBPG		(1 << PGSHIFT)	/* bytes/page */
+ #define	PGOFSET		(NBPG-1)	/* byte offset into page */
  #define	NPTEPG		(NBPG/(sizeof (struct pte)))

  #define	PDRSHIFT	22		/* LOG2(NBPDR) */
+ #define NBPDR		(1 << PDRSHIFT)	/* bytes/page dir */
+ #define	PDROFSET	(NBPDR-1)	/* byte offset into page dir */

  #define	KERNBASE	0xFE000000	/* start of kernel virtual */
  #define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)

! #define	KERNSIZE	0x00C00000	/* size of kernel virtual */
!
  #define	DEV_BSHIFT	9		/* log2(DEV_BSIZE) */
+ #define	DEV_BSIZE	(1 << DEV_BSHIFT)
+
  #define BLKDEV_IOSIZE	2048
  #define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */

  #define	CLSIZELOG2	0
+ #define	CLSIZE		(1 << CLSIZELOG2)

  /* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
  #define	SSIZE	1		/* initial stack size/NBPG */
***************
*** 92,99 ****
  #ifndef	MCLSHIFT
  #define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
  #endif	/* MCLSHIFT */
! #define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
! #define	MCLOFSET	(MCLBYTES - 1)	/* offset within a m_buf cluster */

  #ifndef NMBCLUSTERS
  #ifdef GATEWAY
--- 95,102 ----
  #ifndef	MCLSHIFT
  #define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
  #endif	/* MCLSHIFT */
! #define	MCLBYTES	(1 << MCLSHIFT)	/* size of an m_buf cluster */
! #define	MCLOFSET	(MCLBYTES - 1)	/* offset within an m_buf cluster */

  #ifndef NMBCLUSTERS
  #ifdef GATEWAY
1993-10-08 13:01:34 +00:00
Rodney W. Grimes 89ec6ec6bf Removed patch kit header. Cleaned up tabbing and removed extra blank
lines to match NetBSD.  Added $Id$.
Added MID_MACHINE from NetBSD.
Removed definition of DELAY() for non-kernel soures.
Fixed some small english errors that had been corrected in NetBSD.
File is now identical to NetBSD's, but will be changing soon for some
of my clean up work.
1993-10-08 12:49:55 +00:00
Rodney W. Grimes f43bd59ec7 Architecture specific syscalls (i386) from NetBSD 1993-10-08 11:31:40 +00:00
Jordan K. Hubbard 0978d2b15f Latest changes for XFree86 2.0 1993-10-04 22:21:10 +00:00
Rodney W. Grimes 60de6c38e0 New resting home for console.h, it is machine specific. 1993-10-01 00:00:43 +00:00
Rodney W. Grimes b6c78fe436 define SHMMAXPGS where it is suppose to be, you can over ride this with
a kernel config options "SHMAXPGS=xxx", default is currently 64 pages
due to limit kernel map space.
1993-09-27 00:36:57 +00:00
Rodney W. Grimes 84ecc220b1 >From Theo Derradt
This is a machine specific include, it belongs in the machine specific
directory.
1993-09-08 19:29:54 +00:00
Rodney W. Grimes b3b174f5cd Increased stack size to 8MB just to be on the real safe side. 1993-09-01 09:38:32 +00:00
Rodney W. Grimes 8373b81238 Changed MAXSSIZ from MAXDSIZ to 2MB 1993-08-28 09:19:01 +00:00
Andrew Moore 6bef4df57c prefixed inline functions' parameter names with _ and declared
the return type explicitly.
1993-08-27 05:09:38 +00:00
Andrew Moore 24a82630a2 adding fpgetround(3) IEEE floating point environment support 1993-08-25 09:01:44 +00:00
Nate Williams f798d06073 fts(3) integration patches 1993-07-28 01:42:17 +00:00
David Greenman 269312019a * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading,
profiling, and various protection checks that cause security holes
  and system crashes.
* Changed min/max/bcmp/ffs/strlen to be static inline functions
  - included from cpufunc.h in via systm.h. This change
  improves performance in many parts of the kernel - up to 5% in the
  networking layer alone. Note that this requires systm.h to be included
  in any file that uses these functions otherwise it won't be able to
  find them during the load.
* Fixed incorrect call to splx() in if_is.c
* Fixed bogus variable assignment to splx() in if_ed.c
1993-07-27 10:52:31 +00:00
Charlie Root c26491ecf4 Increased default data size (DFLDSIZ) to 16MB. Need to rebuild libutil,
kernel, ps and w for this to work!
1993-07-03 21:21:35 +00:00
Nate Williams beb7ebb072 Added (protection) around negative constants, in case a program wants
to use the negative of that constant.

#define NEG_NUM -3
#define SAFE_NEG_NUM (-3)

i = -NEG_NUM;		/* Error --3 */
j = -SAFE_NEG_NUM	/* Okay -(-3) */
1993-06-30 22:59:18 +00:00
Nate Williams 330b151312 Setting up for updated (usable) FPE atof/vfprintf/vfscanf fixes 1993-06-29 13:34:33 +00:00
Rodney W. Grimes 5b81b6b301 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00