Commit Graph

404 Commits

Author SHA1 Message Date
Doug Rabson
344dbae494 Update VERSREQ. 1999-04-21 19:50:27 +00:00
Dmitrij Tejblum
fb431f8bd4 pmap_ts_referenced(): set fault on {read|execute|write} bits on the page on,
so we will know when the page is accessed again.

(Also, make it return an integer, not "boolean" TRUE/FALSE).
1999-04-21 10:51:04 +00:00
Peter Wemm
54a8c69347 Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager.  There is further room for optimizing
the interfaces still.  All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.
1999-04-21 07:26:30 +00:00
Dmitrij Tejblum
f998a53420 Added consts to cpu_set_fork_handler prototype. (Follow i386 version.) 1999-04-20 22:53:54 +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
Peter Wemm
db42d90829 unifdef -DVM_STACK - it's been on for a while for x86 and was checked
and appeared to be working for the Alpha some time ago.
1999-04-19 14:14:14 +00:00
Doug Rabson
319c0e7fed Add commented out entries for ata driver now that it works on the alpha. 1999-04-19 08:56:38 +00:00
Doug Rabson
a7aeb17acc Add seatbelts. 1999-04-19 08:55:11 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Andrew Gallatin
22fae70741 zero out switchtime.tv_sec. This fixes a fairly serious problem where
processes were being charged for time when the system was idle.
1999-04-16 13:57:38 +00:00
Hidetoshi Shimokawa
4940ba38d3 - Add another adhoc frame_size detection for stack trace.
egcs manupilates stack pointer with 'subq/addq' rather than 'lha'.
- Surpress warnings
1999-04-16 12:04:39 +00:00
Peter Wemm
bdcedd79c5 Hopefully replicate the install.debug changes from the i386 version. 1999-04-13 18:35:28 +00:00
Hidetoshi Shimokawa
76fcfc1aba Initialize alpha_unaligned_* as I intended.
I misunderstood SYSCTL_INT in previous revision.
1999-04-13 15:42:34 +00:00
Hidetoshi Shimokawa
05f1861b84 Control unaligned access handling via sysctl. 1999-04-11 12:48:15 +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
Greg Lehey
4357ca882d Back out default debug kernel. The flags revert to historical behaviour.
Requested-by:	ache
		bde
		dg

Modify targets for debug kernels:  when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time.  The two targets install and
install.debug are otherwise unchanged.

Requested-by:	dillon

Update man page accordingly.
1999-04-11 03:40:11 +00:00
Andrew Gallatin
61ddd9cc3c A quick fix to get kernels building again under EGCS 1999-04-08 20:32:51 +00:00
Bill Paul
4473c5ec86 Make ASIX driver work on FreeBSD/alpha, add to GENERIC. 1999-04-08 17:42:48 +00:00
Greg Lehey
2005b07aa8 1. Modify config to issue different code for debugging.
2.  Config complains if you use -g:

    Debugging is enabled by default, there is no ned to specify the -g option

3.  Config warns you if you don't use -s:

    Building kernel with full debugging symbols.  Do
    "config -s BSD" for historic partial symbolic support.
    To install the debugging kernel, do make install.debug

    (BSD was the name of the config file I used; I print out the same
    name).

4.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
    work if a kernel name other than 'kernel' is specified.  This is
    not absolutely necessary, but useful, and it was relatively easy.
    I now have a kernel called /crapshit :-)

5.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
    to remove both the debug and normal kernel.

6.  Modify all to install the stripped kernel by default and the debug
    kernel if you enter "make install.debug".

7.  Update version number of Makefiles and config.
1999-04-07 09:28:03 +00:00
Mike Smith
2beb6ea1c9 Remove unused/unimplemented pmap_setdevram() 1999-04-07 03:34:32 +00:00
Julian Elischer
8d17e69460 Catch a case spotted by Tor where files mmapped could leave garbage in the
unallocated parts of the last page when the file ended on a frag
but not a page boundary.
Delimitted by tags PRE_MATT_MMAP_EOF and POST_MATT_MMAP_EOF,
in files alpha/alpha/pmap.c i386/i386/pmap.c nfs/nfs_bio.c vm/pmap.h
    vm/vm_page.c vm/vm_page.h vm/vnode_pager.c miscfs/specfs/spec_vnops.c
    ufs/ufs/ufs_readwrite.c kern/vfs_bio.c

Submitted by: Matt Dillon <dillon@freebsd.org>
Reviewed by: Alan Cox <alc@freebsd.org>
1999-04-05 19:38:30 +00:00
John Polstra
4fe88fe637 Restore support for executing BSD/OS binaries on the i386 by passing
the address of the ps_strings structure to the process via %ebx.
For other kinds of binaries, %ebx is still zeroed as before.

Submitted by:	Thomas Stephens <tas@stephens.org>
Reviewed by:	jdp
1999-04-03 22:20:03 +00:00
Bill Paul
8919d7d4e7 Make the Macronix driver work on FreeBSD/alpha and add to GENERIC.
Like the PNIC, we have to copy packet headers in the receive handler
because the chip will only DMA to longword aligned buffers.

Also do some mindor cleanups.
1999-04-01 02:09:37 +00:00
Bill Paul
25223996f1 Insert ifmedia_set() that I forgot and put in the vtophys() hack for
the alpha. Now the ThunderLAN driver works on the alpha (both my
sample cards check out.) Update the alpha GENERIC config to include
ThunderLAN driver now that I've tested it.
1999-03-31 04:04:14 +00:00
Doug Rabson
f1f1b5e0c1 Fix some warnings. 1999-03-28 17:52:17 +00:00
Doug Rabson
e8d4dc28dc Fix a few warnings. 1999-03-28 17:33:38 +00:00
Doug Rabson
7e2bb9dbfe Remove trigraph. 1999-03-28 17:33:14 +00:00
Bill Paul
8fe2c75e31 Make the xl and pn drivers work on FreeBSD/alpha and add them to
sys/alpha/conf/GENERIC.

Note: the PNIC ignores the lower few bits of the RX buffer DMA address,
which means we have to add yet another kludge to make it happy. Since
we can't offset the packet data, we copy the first few bytes of the
received data into a separate mbuf with proper alignment. This puts
the IP header where it needs to be to prevent unaligned accesses.

Also modified the PNIC driver to use a non-interrupt driven TX
strategy. This improves performance somewhat on x86/SMP systems where
interrupt delivery doesn't seem to be as fast with an SMP kernel as
with a UP kernel.
1999-03-27 20:41:25 +00:00
Doug Rabson
1a94f2a6e8 Don't lower the ipl for splsoftcam, splsoftvm and splsoftnet. 1999-03-19 10:56:28 +00:00
Andrew Gallatin
19fa470d92 Enable crashdumps on alphas.
Reviewed by: Doug Rabson <dfr@nlsystems.com>
1999-03-12 14:44:46 +00:00
Kazutaka YOKOTA
e9deda23ae Keyboard driver update in preparation for the USB keyboard driver.
- Refined internal interface in keyboard drivers so that:
  1. the side effect of device probe is kept minimal,
  2. polling mode function is added,
  3. and new ioctl and configuration options are added (see below).

- Added new ioctl: KDSETREPEAT
  Set keyboard typematic rate.  There has existed an ioctl command,
  KDSETRAD, for the same purpose.  However, KDSETRAD is dependent on
  the AT keyboard.  KDSETREPEAT provides more generic interface.
  KDSETRAD will still be supported in the atkbd driver.

- Added new configuration options:
  ATKBD_DFLT_KEYMAP
  Specify a keymap to be used as the default, built-in keymap.
  (There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP,
  SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap.
  These options are now gone for good.  The new option is more general.)

  KBD_DISABLE_KEYMAP_LOADING
  Don't allow the user to change the keymap.
1999-03-10 10:36:53 +00:00
Garrett Wollman
acc8326d0c Expose a slightly-lower-level interface to timeouts which allows callers
to manage their own memory.  Tested on my machine (make buildworld).
I've made analogous changes on the alpha, but don't have a machine
to test.

Not-objected-to by:	dg, gibbs
1999-03-06 04:46:20 +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
Bruce Evans
e7ba67f274 Removed all traces of `p_switchtime'. The relevant timestamp is per-cpu,
not per-process.  Keep it in `switchtime' consistently.

It is now clear that the timestamp is always valid in fork_trampoline()
except when the child is running on a previously idle cpu, which
can only happen if there are multiple cpus, so don't check or set
the timestamp in fork_trampoline except in the (i386) SMP case.
Just remove the alpha code for setting it unconditionally, since
there is no SMP case for alpha and the code had rotted.

Parts reviewed by:	dfr, phk
1999-02-28 10:53:29 +00:00
Doug Rabson
b49f17156f * Add support for hw.physmem and hw.usermem sysctls (this allows sysinstall
to calculate a reasonable size for the swap partition).
* Fix a typo in remrq() where a process with idle priority would not be
  correctly removed from the relavent queue.  Note that realtime and idle
  priorities are still not supported since the assembler code in
  cpu_switch() does not check the realtime and idle queues.
1999-02-27 18:41:40 +00:00
Bruce Evans
025a06fd58 Added a per-cpu variable `switchticks' for use in scheduling. 1999-02-22 15:13:34 +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
Luoqi Chen
b1028ad122 Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). This
is the preparation step for moving pmap storage out of vmspace proper.

Reviewed by:	Alan Cox	<alc@cs.rice.edu>
		Matthew Dillion	<dillon@apollo.backplane.com>
1999-02-19 14:25:37 +00:00
John Polstra
71e48bbacb Fix typo in comment. 1999-02-19 01:31:38 +00:00
Matt Jacob
8f5381965d add now required queue.h include 1999-02-16 20:34:56 +00:00
Dag-Erling Smørgrav
ad5ebf3fba Ignore errors from chflags. This makes it possible to make installworld
with DESTDIR set to an NFS-mounted file system.
1999-02-14 13:56:15 +00:00
Matthew Dillon
dd2f9956e2 Adjust idle zero-page fill hysteresis based on tests. Use 2/3 and 4/5
zero-fill levels.

    Adjust comment for ozfod in vmmeter.h - this counter represents
    non-optimal ( on the fly ) zero fills, not prefills.
1999-02-08 02:42:13 +00:00
Matthew Dillon
d718be7be7 Add hysteresis to alpha version of vm_page_zero_idle(). 1999-02-08 00:47:32 +00:00
Matthew Dillon
faa273d5c2 Rip out PQ_ZERO queue. PQ_ZERO functionality is now combined in with
PQ_FREE.  There is little operational difference other then the kernel
    being a few kilobytes smaller and the code being more readable.

    * vm_page_select_free() has been *greatly* simplified.
    * The PQ_ZERO page queue and supporting structures have been removed
    * vm_page_zero_idle() revamped (see below)

    PG_ZERO setting and clearing has been migrated from vm_page_alloc()
    to vm_page_free[_zero]() and will eventually be guarenteed to remain
    tracked throughout a page's life ( if it isn't already ).

    When a page is freed, PG_ZERO pages are appended to the appropriate
    tailq in the PQ_FREE queue while non-PG_ZERO pages are prepended.
    When locating a new free page, PG_ZERO selection operates from within
    vm_page_list_find() ( get page from end of queue instead of beginning
    of queue ) and then only occurs in the nominal critical path case.  If
    the nominal case misses, both normal and zero-page allocation devolves
    into the same _vm_page_list_find() select code without any specific
    zero-page optimizations.

    Additionally, vm_page_zero_idle() has been revamped.  Hysteresis has been
    added and zero-page tracking adjusted to conform with the other changes.
    Currently hysteresis is set at 1/3 (lo) and 1/2 (hi) the number of free
    pages.  We may wish to increase both parameters as time permits.  The
    hysteresis is designed to avoid silly zeroing in borderline allocation/free
    situations.
1999-02-08 00:37:36 +00:00
John Polstra
47633640aa Change the load address of the ELF dynamic linker from "2L*MAXDSIZ"
to an architecture-specific value defined in <machine/elf.h>.  This
solves problems on large-memory systems that have a high value for
MAXDSIZ.

The load address is controlled by a new macro ELF_RTLD_ADDR(vmspace).
On the i386 it is hard-wired to 0x08000000, which is the standard
SVR4 location for the dynamic linker.

On the Alpha, the dynamic linker is loaded MAXDSIZ bytes beyond
the start of the program's data segment.  This is the same place
a userland mmap(0, ...) call would put it, so it ends up just below
all the shared libraries.  The rationale behind the calculation is
that it allows room for the data segment to grow to its maximum
possible size.

These changes have been tested on the i386 for several months
without problems.  They have been tested on the Alpha as well,
though not for nearly as long.  I would like to merge the changes
into 3.1 within a week if no problems have surfaced as a result of
them.
1999-02-07 23:49:56 +00:00
Kazutaka YOKOTA
1c27745f73 - Don't assume the line length in the video memory is always the same as
the screen width.
- Store the current video mode information in the `video_adapter' struct.
- The size of the `v_offscreensize' field in the VESA mode information
  block is u_int16, not u_int8.
1999-02-05 11:52:13 +00:00
Mark Newton
d27583423e Added call to elf_brand_inuse() to prevent you from cutting your own
legs out from under you.
1999-02-04 21:20:13 +00:00
Doug Rabson
f422bef257 Use the bsd.kern.mk from the source tree rather than the installed one
if possible.
1999-02-02 18:34:23 +00:00
Bruce Evans
79a2501238 Added a hopefully-machine-independent macro for determining if a
reschedule is pending.
1999-02-02 09:08:23 +00:00
Poul-Henning Kamp
4e2d2aa1cd Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places.

Reviewed by:	bde, with a few grumbles.
1999-01-30 12:17:38 +00:00