Commit Graph

23 Commits

Author SHA1 Message Date
Jeroen Ruigrok van der Werven
6b1d8ceabe Fix CMSG and ALIGN macro usage.
Previously we had to include <machine/param.h> or <sys/param.h> bogusly
due to the fact that <sys/socket.h> CMSG macros needed the ALIGN macro,
which was defined in param.h.  However, including param.h was a disaster
for namespace pollution.
This solution, as contributed by shin a while ago, fixes it elegantly
by wrapping the definitions around some namespace pollution preventer
definitions.
This patch was long overdue.
This should allow any network programmer to use <sys/socket.h> as
before.

PR:		19971, 20530
Submitted by:	Martin Kaeske <MartinKaeske@lausitz.net>
		Mark Andrews <Mark.Andrews@nominum.com>
Patch submitted by:	shin
Reviewed by:	bde
2000-11-08 16:59:25 +00:00
Paul Saab
c794ceb56a Implement write combining for crashdumps. This is useful when
write caching is disabled on both SCSI and IDE disks where large
memory dumps could take up to an hour to complete.

Taking an i386 scsi based system with 512MB of ram and timing (in
seconds) how long it took to complete a dump, the following results
were obtained:

Before:				After:
	WCE           TIME		WCE           TIME
	------------------		------------------
	1	141.820972		1	 15.600111
	0	797.265072		0	 65.480465

Obtained from:	Yahoo!
Reviewed by:	peter
2000-10-17 10:05:49 +00:00
Bosko Milekic
ec222a71d9 Cleanup comment in machine/param.h regarding mbuf-related sizes, and get rid
of MCLOFSET, which does not appear to be used anywhere anymore, and if it is,
it probably shouldn't be.
2000-10-08 03:52:27 +00:00
Paul Saab
92b123a002 Move MAXCPU from machine/smp.h to machine/param.h to fix breakage
with !SMP kernels.  Also, replace NCPUS with MAXCPU since they are
redundant.
2000-09-23 12:18:06 +00:00
Poul-Henning Kamp
1534d6d899 Remove a few leftover CLBYTES related bits.
This was in the good old days to patch up a logical pagesize on hardware
with stupid VM pagesize.  Vaxen I belive.
2000-09-16 18:28:24 +00:00
Jason Evans
0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Doug Rabson
db1d02f417 * Fix the memory probing code so that it sees all memory clusters, not
just the first one.
* Don't reserve extra memory for the prom console unless the platform
  actually uses it.
* Fix some historical confusion and a minor bug in the message buffer
  initialisation.

Submitted by: gallatin for the prom console part
Approved by: jkh
2000-02-29 08:48:10 +00:00
Peter Wemm
33f86cee91 Zap some latent problems hidden by differences between KERNEL and _KERNEL.
The KAME code intruduces _KERNEL, which exposes some of them.
1999-11-22 15:14:56 +00:00
Peter Wemm
b5afb7441c bdbtofsb() appears to have been unused for quite some time, if ever.
Appears to be a 4.4Lite relic.
1999-09-26 18:56:43 +00:00
Matthew Dillon
8b22cebb2c Back out a portion of the last commit. DFLTPHYS and MAXPHYS cannot
be set by a kernel conf option due to the struct buf structural
    dependancy (sizing of b_pages[]) creating a conflict with modules
    (which are not compiled with kernel config options overrides).

    We'll be able to sysctl these two later on when the buffer subsystem
    is revamped.
1999-09-22 05:48:31 +00:00
Matthew Dillon
a59d364a23 Change default block size for user VBLK device access from 2K to PAGE_SIZE
(4K on an i386, 8K on an alpha).

    Make BLKDEV_IOSIZE, DFLTPHYS, and MAXPHYS kernel-configurable.
1999-09-22 04:11:55 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Dmitrij Tejblum
1d8ca40c41 alpha/include/param.h: #define NCPUS 1
alpha/include/lock.h: remove nop simplelock macros, which are defined
in <sys/lock.h> if NCPUS == 1.

As a result, NULL_SIMPLELOCK is defined, and a few warnings removed.
1999-04-20 22:20:57 +00:00
Hidetoshi Shimokawa
2f8c098571 Don't define NMBCLUSTERS here.
It will be defined as appropriate value depending on maxusers.
1999-04-11 12:19:02 +00:00
Warner Losh
1684ea5706 Don't define MACHINE, MACHINE_ARCH, _MACHINE or _MACHINE_ARCH if
already defined.  This allows for cross building to work because we
need to lie to make to tell it to use the target names rather than the
host names.

This should have no effect on either architecture.  I've confirmed
that the intel build by make buildworld's for the past 3 months.
1999-03-01 06:10:16 +00:00
Luoqi Chen
1c6d46f93c Introduce machine-dependent macro pgtok() to convert page count to number
of kilobytes. Its definition for each architecture could be optimized to
avoid potential numerical overflows.
1999-02-19 19:34:49 +00:00
John Polstra
cfa4d73988 Add a new library function getobjformat(). It checks all the
standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an
indication of the user's preferred object file format.  This
consolidates some code that was starting to be duplicated in more
and more places.

Use the new function in ldconfig.

Note: I don't think that gcc should use getobjformat(), even though
it could.  The compiler should limit itself to functions that are
widespread, to ease porting and cross-compilation.
1998-09-09 01:21:25 +00:00
Doug Rabson
82153dc247 Change load address to 0xfffffc0000300000 to help support AS200. 1998-07-30 08:12:14 +00:00
Doug Rabson
52c008e810 Overhaul the spl system so that it actually works properly. 1998-07-12 16:32:10 +00:00
Doug Rabson
99d11cde56 Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:46:10 +00:00
Doug Rabson
897cd717a5 Add initial support for the FreeBSD/alpha kernel. This is very much a
work in progress and has never booted a real machine.  Initial
development and testing was done using SimOS (see
http://simos.stanford.edu for details).  On the SimOS simulator, this
port successfully reaches single-user mode and has been tested with
loads as high as one copy of /bin/ls :-).

Obtained from: partly from NetBSD/alpha
1998-06-10 10:57:29 +00:00
John Birrell
2bbb0ff141 Updates to reflect differences in what NetBSD does and what FreeBSD
userland expects.
1998-03-09 05:53:13 +00:00
John Birrell
7fed2e3a32 These are a few of the alpha machine dependent header files - the first
referenced by the build of user-space libraries. These files were
obtained from NetBSD (with ansi.h being modified to reflect the FreeBSD
off_t and pid_t implementation).
1998-01-10 10:13:16 +00:00