Commit graph

595 commits

Author SHA1 Message Date
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
Julian Elischer 2907af2a96 Mostly remove the VM_STACK OPTION.
This changes the definitions of a few items so that structures are the
same whether or not the option itself is enabled. This allows
people to enable and disable the option without recompilng the world.

As the author says:

|I ran into a problem pulling out the VM_STACK option.  I was aware of this
|when I first did the work, but then forgot about it.  The VM_STACK stuff
|has some code changes in the i386 branch.  There need to be corresponding
|changes in the alpha branch before it can come out completely.

what is done:
|
|1) Pull the VM_STACK option out of the header files it appears in.  This
|really shouldn't affect anything that executes with or without the rest
|of the VM_STACK patches.  The vm_map_entry will then always have one
|extra element (avail_ssize).  It just won't be used if the VM_STACK
|option is not turned on.
|
|I've also pulled the option out of vm_map.c.  This shouldn't harm anything,
|since the routines that are enabled as a result are not called unless
|the VM_STACK option is enabled elsewhere.
|
|2) Add what appears to be appropriate code the the alpha branch, still
|protected behind the VM_STACK switch.  I don't have an alpha machine,
|so we would need to get some testers with alpha machines to try it out.
|
|Once there is some testing, we can consider making the change permanent
|for both i386 and alpha.
|
[..]
|
|Once the alpha code is adequately tested, we can pull VM_STACK out
|everywhere.
|

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:49:52 +00:00
Matthew Dillon 7dbf82dc13 Change all manual settings of vm_page_t->dirty = VM_PAGE_BITS_ALL
to use the vm_page_dirty() inline.

    The inline can thus do sanity checks ( or not ) over all cases.
1999-01-24 06:04:52 +00:00
Doug Rabson 8a99777019 Update the alpha port to use the new syscons.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)
1999-01-23 16:53:30 +00:00
Matthew Dillon 1c7c3c6a86 This is a rather large commit that encompasses the new swapper,
changes to the VM system to support the new swapper, VM bug
    fixes, several VM optimizations, and some additional revamping of the
    VM code.  The specific bug fixes will be documented with additional
    forced commits.  This commit is somewhat rough in regards to code
    cleanup issues.

Reviewed by:	"John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>
1999-01-21 08:29:12 +00:00
Andrew Gallatin b8b442b5ab Fix some mildly annoying compiler warnings about unused variables
and incorrect types in printf() format strings.
1999-01-20 20:51:39 +00:00
Peter Wemm f75ccec2a1 *blush*. As a quick fix, move configure()'s SYSINIT back a little to allow
CAM's xpt_init() to get in first.  I hope this will fix the build again,
sorry guys. :-(
XXX configure_start() and configure_end() seem to be a bit excessive.. both
here and in the i386 code.
1999-01-20 19:22:24 +00:00
Andrew Gallatin a671d614ca Reserve a major number for use by the Iprobe device driver.
Iprobe is an alpha-only system profiling suite which I'm porting from
Linux/alpha to FreeBSD.

Iprobe works by using the hardware profiling support built into
alpha cpus.  In a nutshell,  what Iprobe does is to setup the alpha
performance counters to sample the pc at a fairly high rate & dumps
those pc samples out to user space.  Then some code runs to map the
sampled PCs to functions.  You get a bit more than that (like the PSL
word, so you can tell if you're in the kernel or userland, what the
ipl is, etc).
1999-01-18 20:38:37 +00:00
Andrew Gallatin 1e176a8ad1 Added support for the DEC EB64PLUS systype. (Part III)
o Add the EB64PLUS systype into the kernel configuration files
and add it to the GENERIC kernel

o Correct mcclock_isa.c's dependence on cia, it should depend on isa.
  This will allow avanti and eb64+ kernels to be built without the cia
  chipset support code.
1999-01-18 20:26:50 +00:00
Andrew Gallatin 5a51b2f3b6 Added support for the DEC EB64PLUS systype. (part II)
The DEC EB64PLUS support code.  Based on NetBSD's dec_eb64plus.c,v 1.15

Submitted by: Wilko Bulte <wilko@yedi.iaf.nl>
1999-01-18 20:18:49 +00:00
Andrew Gallatin 2c478084d6 Added support for the DEC EB64PLUS systype. (part I)
The new file pci_eb64plus_intr.s deals with the interrupt hardware
on the EB64PLUS and was obtained from NetBSD with the NetBSD
copyright intact

The apecs chipset support code was altered to allow routing interrupts
through pci if we're not running on an avanti.  Avanti's route all
interrupts through isa.

Tested by: Wilko Bulte <wilko@yedi.iaf.nl>
Partially reviewed by: dfr
1999-01-18 20:15:07 +00:00
Peter Wemm 1e65ef01b0 Minor cleanup; no more references to LKM's. 1999-01-17 20:36:14 +00:00
Mike Smith a07089226d Oops, add the NMBCLUSTERS initialiser for the Alpha as well. 1999-01-15 18:00:19 +00:00
Mike Smith 84252d6300 dftp -> dtfp Get it right... 1999-01-14 03:47:55 +00:00
Mike Smith 4f029d3999 Assign cdev major 84 to 'dftp' for "Louis A. Mamakos" <louie@UU.NET> 1999-01-13 08:05:16 +00:00
Doug Rabson 88835c656b A couple more osf/1 compat tweaks.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-01-12 10:54:14 +00:00
Doug Rabson 784521ae53 Add hooks for the Iprobe kernel profiler.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-01-10 12:35:39 +00:00
John Polstra f92bdbd010 Switch to using ".So" as the extension for PIC object files rather
than ".so".  The old extension conflicted with well-established
naming conventions for dynamically loadable modules.

The "clean" targets continue to remove ".so" files too, to deal with
old systems.
1999-01-09 21:51:00 +00:00
Julian Elischer 2267af789e Add (but don't activate) code for a special VM option to make
downward growing stacks more general.
Add (but don't activate) code to use the new stack facility
when running threads, (specifically the linux threads support).
This allows people to use both linux compiled linuxthreads, and also the
native FreeBSD linux-threads port.

The code is conditional on VM_STACK. Not using this will
produce the old heavily tested system.

Submitted by: Richard Seaman <dick@tar.com>
1999-01-06 23:05:42 +00:00
Kazutaka YOKOTA 67a2ac4a23 Assign CDEV 112 to the keyboard driver. 1999-01-06 06:43:51 +00:00
Doug Rabson d1fd776a79 Fix fubyte to actually return the correct value (it was always returning
zero).  This caused device reads to corrupt the first byte of the page
being read into (the cause of frozen keyboards in sysinstall).
1999-01-05 18:39:02 +00:00
Dag-Erling Smørgrav 70bfbd280e Correct typo in macro name. 1999-01-01 14:38:30 +00:00
Søren Schmidt e76bba09e3 Commit patch in
PR: 9232
Submitted by:	marcel@scc.nl <Marcel Moolenaar>
1998-12-30 21:20:00 +00:00
Søren Schmidt abbc72c904 Commit #1 of:
PR: 9235
1998-12-30 20:58:28 +00:00
Doug Rabson 9c0fed3dcf Various changes to support OSF1 emulation:
* Move the user stack from VM_MAXUSER_ADDRESS to a place below the 32bit
  boundary (needed to support 32bit OSF programs).  This should also save
  one pagetable per process.
* Add cvtqlsv to the set of instructions handled by the floating point
  software completion code.
* Disable all floating point exceptions by default.
* A minor change to execve to allow the OSF1 image activator to support
  dynamic loading.
1998-12-30 10:38:59 +00:00
Gary Palmer c656fddc16 Add fxp0. It seems to be Alpha-OK, although I don't have a card to test. 1998-12-29 03:59:49 +00:00
Matt Jacob c5217a03af reserve 110 for ses (SCSI Environmental Services) driver 1998-12-29 00:13:37 +00:00
Doug Rabson 486bddb033 Fix some 64bit truncation problems which crept into SYSCTL_LONG() with the
last cleanup.  Since the oid_arg2 field of struct sysctl_oid is not wide
enough to hold a long, the SYSCTL_LONG() macro has been modified to only
support exporting long variables by pointer instead of by value.

Reviewed by: bde
1998-12-27 18:03:29 +00:00
Matt Jacob 803ee29602 Not quite right for the goal of using swi_register, but on the way there. 1998-12-24 06:05:48 +00:00
Doug Rabson b7f762137a Implement fpsetmask() and other fp*() functions. Programs should use
#include <ieeefp.h>

to access these functions instead of the i386 specific

	#include <machine/floatingpoint.h>

Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-12-23 11:50:52 +00:00
Søren Schmidt ec4e636d4c Fix NOIMPL -> NOPROTO as per bruce. 1998-12-22 08:59:19 +00:00
Søren Schmidt 81bca0e98c Syscall 168 (poll) is not implemented in the Linux emulator. This
syscall is used by Oracle.

PR:		9154
Submitted by:	Marcel Moolenaar <marcel@scc.nl>
1998-12-21 19:28:13 +00:00
Doug Rabson 20982dfb10 Add LDGP(pv) to suword, subyte, fuword, fubyte so that they can be called
from kernel modules.
1998-12-20 13:21:55 +00:00
Søren Schmidt 9073a41122 Make it compile again.
I have no idea if the new stuff works though.

Broken by: Julian
1998-12-19 19:05:57 +00:00
Julian Elischer 6626c6045c Reviewed by: Luoqi Chen, Jordan Hubbard
Submitted by:	 "Richard Seaman, Jr." <lists@tar.com>
Obtained from:	linux :-)

Code to allow Linux Threads to run under FreeBSD.

By default not enabled
This code is dependent on the conditional
COMPAT_LINUX_THREADS (suggested by Garret)
This is not yet a 'real' option but will be within some number of hours.
1998-12-19 02:55:34 +00:00
Dmitrij Tejblum 8252a465b9 Little reorganization:
- created internal names for fixed-size integral types, like __int32_t. They
  will be used to make several headers self-sufficient.
- <stdlib.h> don't include <machine/types.h> anymore.
- created <sys/inttypes.h>, which can be used as <inttypes.h>.
- declaration of uoff_t and ufs_daddr_t moved to <sys/types.h>.

Reviewed by:	bde
1998-12-19 00:02:34 +00:00
Doug Rabson 65be2aace6 Move some compile flags from the kernel makefile to bsd.kern.mk so that
kernel modules are built with the right flags.

Suggested by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-12-17 22:36:21 +00:00
Bruce Evans 4c56fcdead Removed the cast to a pointer in the definition of PS_STRINGS and
adjusted related casts to match (only in the kernel in this commit).
The pointer was only wanted in one place in kern_exec.c.  Applications
should use the kern.ps_strings sysctl instead of PS_STRINGS, so they
shouldn't notice this change.
1998-12-16 16:28:58 +00:00
Bruce Evans 4f2129fa86 Removed bogus casts of USRSTACK and/or the other operand in binary
expressions involving USRSTACK.
1998-12-16 15:21:51 +00:00
Dmitrij Tejblum 85f118c801 Added 3 new errno values, requred by various standards: EOVERFLOW,
ECANCELED, EILSEQ.

Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping.
Reviewed by:	Dan Nelson <dnelson@emsphone.com>
1998-12-14 18:54:04 +00:00
Eivind Eklund d51523c6c9 Get rid of CTLTYPE_OPAQUE in a SYSCTL_OPAQUE - it is added my the
SYSCTL_OPAQUE macro.
1998-12-09 02:26:45 +00:00
Warner Losh f7c9e34bea If there is no .depends file, use the standard ad-hoc way of ensuring
that the generated files are generated before any of the object files.
Also minor cleanup of dependencies in conf/files that I bogusly added
before.

This should fix the requirement that make depend be done starting from
a clean config directory.  If you don't have a clean directory, make
depend is still required if you want the proper .o's to be recompiled.

Reviewed by: bde
1998-12-07 22:36:54 +00:00
Matt Jacob 0a194dfe3f fix warning messages from previous delta 1998-12-06 00:10:52 +00:00
Matt Jacob 80592d5b75 Fix it so that it works on an eb164 when you have a serial console on com1.
Obtained from:gallatin@freebsd.org
1998-12-05 22:36:31 +00:00
Archie Cobbs 2127f26023 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
Doug Rabson 5b38fe900d Implement 'software completion' for floating point arithmetic. On the
alpha, operations involving non-finite numbers or denormalised numbers
or operations which should generate such numbers will cause an arithmetic
exception.  For programs which follow some strict code generation rules,
the kernel trap handler can then 'complete' the operation by emulating
the faulting instruction.

To use software completion, a program must be compiled with the arguments
'-mtrap-precision=i' and '-mfp-trap-mode=su' or '-mfp-trap-mode=sui'.
Programs compiled in this way can use non-finite and denormalised numbers
at the expense of slightly less efficient code generation of floating
point instructions.  Programs not compiled with these options will receive
a SIGFPE signal when non-finite or denormalised numbers are used or
generated.

Reviewed by: John Polstra <jdp@polstra.com>
1998-12-04 10:52:48 +00:00
Doug Rabson 28ae06aad0 Restore the user HAE all the time, not just when returning to usermode.
This closes a very small window where the use HAE might not be restored
at all.  This only happens when switching to a process which has used the
HAE.
1998-12-02 10:24:56 +00:00
Doug Rabson 5ac82ff587 Enable BWX i/o access. I disabled it by mistake with the last commit.
Pointed out by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-12-02 09:33:27 +00:00
Doug Rabson e63149c330 Add support for 'vmstat -i'.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Obtained from: NetBSD
1998-11-28 09:55:16 +00:00
Doug Rabson d24b518319 Port top to the alpha.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-11-25 09:45:28 +00:00
Kazutaka YOKOTA 570f565d11 Oops, I forgot to update this file when I changed moused recently. 1998-11-22 11:57:59 +00:00
Doug Rabson 75410e3d0e Fix things so that pci interrupts can be registered correctly on apecs
and lca machines (which route PCI interrupts through the ISA PIC).

Reviewed by: dima
1998-11-18 23:53:12 +00:00
Doug Rabson eae8e50443 Add sc_traparg_a0, sc_traparg_a1 and sc_traparg_a2 to the sigcontext
structure for the alpha.  These give extra information about some
signals (such as SIGSEGV) and should be compatible with Digital Unix.

Submitted by: jdp
1998-11-18 23:51:40 +00:00
Dima Ruban fa1303baf8 Remove -U__NetBSD__ 1998-11-18 23:51:17 +00:00
Doug Rabson b0a6dfad26 Definitions for alpha specific device resources. 1998-11-17 10:40:33 +00:00
Doug Rabson 9b0e7f94af Definitions for alpha specific system calls. 1998-11-17 10:40:07 +00:00
Doug Rabson 08b6a4cbee * Add hooks to allow the X server to access I/O ports and memory.
* Update drivers to the latest version of the bus interface.

The ISA drivers' use of the new resource api is minimal.  Garrett has
some much cleaner drivers which should be more easily shared between
i386 and alpha.  This has only been tested on cia based machines.  It
should work on lca and apecs but I might have broken something.
1998-11-15 18:25:17 +00:00
Doug Rabson 225b9157e6 Don't include link_elf.c twice in the link. 1998-11-15 18:15:06 +00:00
Doug Rabson 2f2dcad41b * Change 'struct resource' to 'struct config_resource'.
* Bump config version.
1998-11-15 18:07:35 +00:00
Bruce Evans c25ded316f Finished updating module event handlers to be compatible with
modeventhand_t.
1998-11-15 15:33:52 +00:00
Dima Ruban 9ffad24346 indent 1998-11-15 00:50:59 +00:00
Jordan K. Hubbard 845491fe8d MF22: Bring in some linux sound ioctl support which I committed to 2.2
for PR 7792 but did not bring forward.

Submitted by:	Avatar Liang <avatar@www.mmlab.cse.yzu.edu.tw>
PR:		8656
1998-11-12 00:42:08 +00:00
Mike Smith 2831f40f0b Use an at_shutdown hook to drop back to the SRM in the case where the system
is being halted, rather than hanging waiting for a keypress.

Submitted by:	Andrew Gallatin <gallatin@freebsd.org>
1998-11-11 00:02:25 +00:00
Dima Ruban 46e79a3c0e Add some bogus stuff to make systat/vmstat happy.
Reviewed by:	dfr
1998-11-09 10:47:19 +00:00
Poul-Henning Kamp 5adee71e55 Update interface to timecounter to last change to the generic code. 1998-11-08 19:26:23 +00:00
Nicolas Souchu 710c119cf7 Update configuration files for the perl based makedevops script.
Submitted by: Nick Hibma <nick.hibma@jrc.it>
Approved by:  Doug Rabson <dfr@nlsystems.com>
1998-11-08 18:39:57 +00:00
Nicolas Souchu 7a8ecb9e64 Add semicolon to INTERFACE declarations 1998-11-08 18:35:53 +00:00
Doug Rabson 7095ee912b * Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
  pass a vm_offset_t instead of an int for the offset allowing
  devices with a larger memory map than (1<<32) to be supported
  on the alpha (/dev/mem is one such).

These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
1998-11-08 12:39:07 +00:00
Alexander Langer 9184fb847b Optimize bzero() by unrolling the aligned quadword loop and moving the length
manipulation away from the length comparison.  Measurements on beast.cdrom.com
show >3X improvement over the original code on large block sizes, putting the
performance on par with the optimized assembly code in libc.
1998-11-02 00:14:50 +00:00
Doug Rabson 57250ffb42 * Fix vga_probe() so that it doesn't report a non-vga display adapter as
a vga.
* Fix broken logic in syscons for a failed probe.
* Fix AlphaStation 500/600 so that non-serial consoles are supported.

Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu> (vga bits),
	      Andrew Gallatin <gallatin@cs.duke.edu> (AS500/AS600)
1998-10-31 10:35:24 +00:00
Mike Smith 35d27a0f39 Add the ability to specify where on the at_shutdown queue a handler is
installed.

Remove cpu_power_down, and replace it with an entry at the end of the
SHUTDOWN_FINAL queue in the only place it's used (APM).

Submitted by:	Some ideas from Bruce Walter <walter@fortean.com>
1998-10-30 05:41:15 +00:00
Jordan K. Hubbard 4b3c37b2a8 Put back MFS_ROOT now that it's been fixed correctly. 1998-10-30 01:37:33 +00:00
Jordan K. Hubbard 522bda27ae Fix this correctly - check if mfs_getimage() succeeds before settings
the MFS root unconditionally, just as on the x86.
Prompted by:	msmith
1998-10-30 01:36:40 +00:00
Jordan K. Hubbard 4df550a942 Take MFS_ROOT out for now; for some reason, the alpha GENERIC chokes
and dies if it can't find the MFS root whereas the x86 one seems to sail
past.  Looking at the code, I can't see how either one works, so I'm
confused. :)
1998-10-30 01:17:42 +00:00
Dima Ruban a8bdc29849 Bump VERSREQ to make ``config'' happy.
Obtained from: Makefile.i386
1998-10-29 17:09:36 +00:00
David Greenman 730075613a Added a second argument, "activate" to the vm_page_unwire() call so that
the caller can select either inactive or active queue to put the page on.
1998-10-28 13:37:02 +00:00
Paul Richards a57faa7b13 Fix the interrupt mask generated for enabling/disabling interrupts 8 to 15. 1998-10-25 01:30:16 +00:00
David Greenman 9b827155f8 Decrement the now unused page table page's wire_count prior to freeing it.
It will soon be required that pages have a zero wire_count when being
freed.
1998-10-21 11:38:14 +00:00
Doug Rabson 0c942a8eef R_ALPHA_RELATIVE relocations need to add the value to the existing memory
contents.
1998-10-18 19:04:13 +00:00
Jordan K. Hubbard 2f40a12b31 fixup for the alpha. tag slid forward, since it's benign for the x86. 1998-10-16 10:13:09 +00:00
Peter Wemm aa855a598d *gulp*. Jordan specifically OK'ed this..
This is the bulk of the support for doing kld modules.  Two linker_sets
were replaced by SYSINIT()'s.  VFS's and exec handlers are self registered.
kld is now a superset of lkm.  I have converted most of them, they will
follow as a seperate commit as samples.
This all still works as a static a.out kernel using LKM's.
1998-10-16 03:55:01 +00:00
Doug Rabson 43c6fba4f6 Fix a typo preventing the correct value of kernend from being picked up
from the bootstrap.  Also change some debug printfs from #if 0 to
#ifdef DEBUG_CLUSTER to make it easier to debug startup memory problems.
1998-10-15 22:00:54 +00:00
Doug Rabson e4b0567b9b Change a bogus cast to the correct one. 1998-10-15 09:53:27 +00:00
Peter Wemm 9fd9f49c01 Fix a warning I missed before. 1998-10-14 10:08:35 +00:00
Peter Wemm 68d2bdcbb0 Typo fix. 1998-10-14 10:04:32 +00:00
Peter Wemm da6c15d597 Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules.  Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes.  Essentially this has been untested. :-(

What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.

The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code.  We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).

If this does not work, it needs to be beaten into shape pronto.  Otherwise
it should be backed out before 3.0.

Pre-approved in principle by: dfr
1998-10-14 09:53:25 +00:00
Jordan K. Hubbard 39048e2d62 DB_ELF_SYMBOLS doesn't appear to do anything yet, or if it does it's
not been added to the appropriate options file.  Comment it out to
prevent config(8) warnings.
1998-10-14 00:42:02 +00:00
Jordan K. Hubbard 89041bafbd Sync up with some needed x86 options. 1998-10-13 21:38:46 +00:00
Alexander Langer 2b65ea051a Bring in _BSD_UINT8_T_, _BSD_UINT16_T_, and _BSD_UINT32_T from the i386
ansi.h.
1998-10-12 23:57:58 +00:00
Alexander Langer 514058dc0d Unregister the glibc2 brand at module unload time.
Change the ELF registration/unregistration scheme to be less error prone.
Adding a new brand requires a single addition to linux_brandlist instead of
modifying linux_load(), linux_unload(), and linux_elf_init().

Approved by:	jkh
Reviewed by:	msmith
1998-10-11 21:08:02 +00:00
Gary Palmer 1383f617d2 Make kernel build on alpha again. New kld stuff needs rindex. 1998-10-10 18:32:18 +00:00
Doug Rabson a0ab71761c Add functions for accessing dense and bwx memory for pci devices. These
routines are necessary to allow the use of certain types of hardware on
the alpha, particularly a Myrinet card.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-06 14:18:40 +00:00
Doug Rabson ac43c74df8 Add support for adjkerntz (largely untested). 1998-10-06 08:40:18 +00:00
Doug Rabson 0f222cb034 Fix unaligned accesses when checking DOS MBRs. 1998-10-06 08:38:58 +00:00
Doug Rabson 6516e08825 Add MFS_ROOT support. 1998-10-06 08:38:04 +00:00
John Fieber 98fd9ce8c9 Make async I/O on a socket work.
Although the current Sybase license does not permit running under
emulation, FreeBSD 3.0 is now "Sybase Ready" should the license change.
1998-10-05 16:37:36 +00:00
John Fieber f18bad6e73 Add several missing ioctl handlers. One needed by Sybase, the others
found while looking for the one.
1998-09-30 01:42:53 +00:00
Doug Rabson 63bbbfc70e Update SimOS scsi driver to use CAM. 1998-09-26 14:49:26 +00:00
Doug Rabson 6ecd6bbf9b Don't try to attach an isa bus if there isn't one. 1998-09-26 14:48:19 +00:00
Doug Rabson da653c6148 Start using the new SWI registration system instead of hardwiring everything. 1998-09-26 14:25:32 +00:00
Doug Rabson b1a0cced61 Automatically detect which disk was booted and change the root to that disk. 1998-09-26 12:22:53 +00:00
Mike Smith 09d2cff163 Fix type 0 configuration accesses, and use a virtual rather than physical
address for the LCA PCI configuration register address.

FreeBSD/Alpha now boots on the NoName (aka AXPpci 33, Alpha PC), and probably
also on the Multia (mine hasn't arrived yet, so I can't tell for sure).

Submitted by:	Doug Rabson <dfr@freebsd.org>
1998-09-23 21:23:51 +00:00
Doug Rabson 4e6823805e Add splsoftvm().
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-09-19 09:29:40 +00:00
Doug Rabson 4ada0d2731 Change sd to da and comment out the non-cam TurboChannel scsi drivers.
Fix a typo which prevented VGA consoles from working.
1998-09-18 18:43:52 +00:00
Doug Rabson c6f34b8987 Change version number. 1998-09-18 18:41:49 +00:00
Doug Rabson 2a8d2696cd Cam changes sd to da. 1998-09-18 18:40:59 +00:00
Matt Jacob 3dd37e4387 (requested by gibbs) Remove the SCSI_CAM option (and rework the isp driver
that had depended on it for compilation within or without CAM to use
__FreeBSD_version instead).
1998-09-18 00:46:42 +00:00
Mike Smith 4e138a28a0 Add support for glibc consumers using the new ld-linux.so.2 linker.
I can't say this was the most inspired fix, but it matches the design OK.
1998-09-17 22:08:34 +00:00
Doug Rabson 9604f809cd Merge with the latest i386 syscons. 1998-09-17 09:38:36 +00:00
Doug Rabson 888aeaaa72 Fix printf format errors. 1998-09-17 09:35:31 +00:00
Doug Rabson 7f323059fa Workaround some EB164 wierdness.
Obtained from: NetBSD
1998-09-16 08:24:30 +00:00
Doug Rabson f9f51c39c3 Disable unwanted isa interrupts. 1998-09-16 08:23:51 +00:00
Doug Rabson 129957363e Add cam spls. 1998-09-16 08:23:21 +00:00
Doug Rabson 75275c7630 Port i386 bus_space and bus_dma to alpha. 1998-09-16 08:22:57 +00:00
Doug Rabson 657d6e769c Change to cam. 1998-09-16 08:22:09 +00:00
Doug Rabson bbe7f35658 Add cam software interrupts. 1998-09-16 08:21:12 +00:00
Doug Rabson 3bb8652fa7 Port the i386 bus_dma implementation to alpha. 1998-09-16 08:20:45 +00:00
John Polstra 1a291e0cd4 Add new functions fill_fpregs() and set_fpregs(), like fill_regs()
and set_regs() but for the floating point register state.  The code
is stolen from procfs_machdep.c, and moved out of there into
machdep.c.

These functions are needed for generating ELF core dumps.
1998-09-14 22:43:40 +00:00
John Polstra c8afdc1dcf Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give
the relevant characteristics of the native machine, for building
and checking Elf_Ehdr structures.

Add structures to represent ELF "note" headers.  Add defines for the
note types used in ELF core files.
1998-09-14 20:30:13 +00:00
John Polstra 22d4b0fb41 Add provisions for variant core dump file formats, depending on the
object format of the executable being dumped.  This is the first
step toward producing ELF core dumps in the proper format.  I will
commit the code to generate the ELF core dumps Real Soon Now.  In
the meantime, ELF executables won't dump core at all.  That is
probably no less useful than dumping a.out-style core dumps as they
have done until now.

Submitted by:	Alex <garbanzo@hooked.net> (with very minor changes by me)
1998-09-14 05:36:51 +00:00
Doug Rabson a6ee6725b1 Machine dependant relocations for KLD. 1998-09-11 08:47:02 +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 feb6634586 Device framework code now declared in MI code. 1998-09-07 07:29:30 +00:00
Doug Rabson 26cdc317be Cosmetic changes to the PAGE_XXX macros to make them consistent with
the other objects in vm.
1998-09-04 18:49:35 +00:00
Doug Rabson bd2bbbf2f3 Make SimOS work again. 1998-09-04 08:01:26 +00:00
Doug Rabson 9872f76253 Make this build even if sio is not in the kernel. 1998-09-04 07:58:33 +00:00
Jordan K. Hubbard 2394cd9adb Initial support for using linux X servers under emulation - to use an
XFree86 server, users need to create the following links in their
/compat/linux/dev directory (assuming kernel configured with 4 VTs).

lrwxrwxrwx  1 root  wheel  7 Aug 30 22:59 tty0 -> console
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty1 -> ttyv0
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty2 -> ttyv1
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty3 -> ttyv2
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty4 -> ttyv3

VT switching is still not yet supported. Attempting to switch VT
currently will cause Xserver bus error.

Submitted by:	Chain Lee <chain@110.net>
1998-08-31 06:55:02 +00:00
Doug Rabson 506a7a2ed4 Remove some duplicated devices. 1998-08-30 10:50:30 +00:00
Doug Rabson 2e809930ba Add atomic.s. 1998-08-24 08:48:22 +00:00
Doug Rabson 069e9bc1b4 Change various syscalls to use size_t arguments instead of u_int.
Add some overflow checks to read/write (from bde).

Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags
and vm_object::paging_in_progress to use operations which are not
interruptable.

Reviewed by: Bruce Evans <bde@zeta.org.au>
1998-08-24 08:39:39 +00:00
Doug Rabson 2386a98ddd Use address space numbers to reduce TLB flushes. 1998-08-23 16:05:55 +00:00
Doug Rabson b687821494 Remove bogus unused code. 1998-08-22 10:32:38 +00:00
Gary Palmer 6722fe2d35 Add BREAK_TO_DEBUGGER so that config stops whining 1998-08-21 23:43:15 +00:00
Doug Rabson 19df33b637 Add support for TurboChannel alphas (DEC 3000/300 and 3000/500).
Obtained from: NetBSD
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-20 08:27:11 +00:00
Doug Rabson a5f96f457f Add Miata system type and pull in the LOCATE_PCS macro from NetBSD. 1998-08-17 08:26:12 +00:00
Doug Rabson ca13e4a93b Add breakpoint() for BREAK_TO_DEBUGGER. 1998-08-17 08:21:31 +00:00
Doug Rabson e00c264242 Update to use elf_generic.h. 1998-08-17 08:05:55 +00:00
Doug Rabson e99a8ba0c4 Disable some unnecessary debugging code. 1998-08-17 08:04:42 +00:00
Bruce Evans 86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Doug Rabson d890a393ca I managed to break sparse configuration accesses with my last commit.
Pointed out by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-13 08:11:27 +00:00
Doug Rabson a1eff3a036 Add code from NetBSD to print CIA capabilities and try to detect Pyxis bugs. 1998-08-11 08:51:09 +00:00
Doug Rabson c2d9f943e0 Sync with i386/isa/diskslice_machdep.c 1.31. 1998-08-11 07:17:36 +00:00
Doug Rabson 8a7b91802a Lots of changes, including:
* Support for AlphaStation 200, 250, 255, 400
* Untested support for UDB, Multia, AXPpci33 (Noname)
* Support for Personal Workstation 433a/433au, 500a/500au, 600a/600au (Miata)
* Some minor fixes and improvements to interrupt handling.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu> (AS200, Miata)
Obtained from: NetBSD (some code for AS200, Miata, Noname)
1998-08-10 07:53:59 +00:00
Doug Rabson 6aa91d039a Add support for type1 pci configuration cycles for cia (not pyxis yet).
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:18:44 +00:00
Doug Rabson 88db503390 Add some more useful macros.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:17:39 +00:00
Doug Rabson a8360ebd82 Update so that it should build a working kernel for the platforms supported
so far.
1998-08-07 08:16:31 +00:00
Doug Rabson 29a8d2fd7e Tweaks to console support.
Fixes for AS 600.
1998-08-07 08:15:16 +00:00
Doug Rabson 08b66b4483 Port syscons to the alpha. The driver itself has moved to sys/isa as it will
hopefully become a portable driver usable by all architectures.  The api
support files have had to be copied to sys/alpha/include since userland
programs expect to find them in <machine/*.h>.

All the revision history of the i386 syscons has been retained by a
repository copy.
1998-08-06 09:15:54 +00:00
Kazutaka YOKOTA 88a5f0cca7 1. Reorganized screen saver related code so that both the LKM screen
saver and splash screen can all work properly with syscons.  Note that
the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it
requires additional code from msmith.

- Reorganized the splash screen code to match the latest development
  in this area.
- Delay screen switch in `switch_scr()' until the screen saver is
  stopped, if one is running,
- Start the screen saver immediately, if any, when the `saver' key is
  pressed. (There will be another commit for `kbdcontrol' to support
  this keyword in the keymap file.)
- Do not always stop the screen saver when mouse-related ioctls
  are called.  Stop it only if the mouse is moved or buttons are
  clicked; don't stop it if any other mouse ioctls are called.

2. Added provision to write userland screen savers.  (Contact me if you
are interested in writing one.)

- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to
  support userland screen savers.

3. Some code clean-ups.
1998-08-03 11:30:45 +00:00
Doug Rabson e35d857d64 Cosmetic change to driver registration. 1998-07-31 09:20:35 +00:00
Doug Rabson bb6e8960ac Only perform byte/word accesses in the correct EV56 memory space.
Sparse macros have moved to <machine/swiz.h>.
Fix sparse memory access so that it actually works as intended.
Tidy up sparse configuration access slightly.
1998-07-31 09:17:51 +00:00
Doug Rabson 1ba83e535e Add definitions of EV56 INT1/INT2/INT4/INT8 memory spaces. 1998-07-31 09:14:49 +00:00
Doug Rabson df317c7516 Merge with i386/isa/diskslice_machdep.c 1.30 1998-07-31 09:13: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 25729629a2 Remove spurious printf. 1998-07-30 08:10:26 +00:00
Doug Rabson ab1fdd6291 Fix msgbuf so that it actually works properly. 1998-07-29 18:36:29 +00:00
Bruce Evans e4e6ae1366 Fixed print format errors. 1998-07-29 16:43:00 +00:00
Bruce Evans e33e271f08 Fixed printf format errors.
Use offsetof() instead of null pointer hacks.  Use a home made offsetof()
because including <stddef.h> is not permitted in LKMs.
1998-07-29 15:50:41 +00:00
Doug Rabson 51f14853fd Record the new physical address of the pcb in pmap_swapin_proc.
Third attempt at pmap_remove().  This one actually works properly :-).
1998-07-28 09:34:50 +00:00
Doug Rabson 3260ced375 Macros for accessing alpha sparse device ports and memory. 1998-07-27 09:40:35 +00:00
Doug Rabson 86dd710847 Support the disabled keyword for isa devices. 1998-07-27 09:38:26 +00:00
Doug Rabson 976a1a2b57 Fix a stupid bug preventing gdb from seeing the right value of 'v0'. 1998-07-26 18:47:47 +00:00
Doug Rabson c99399cccd Fix a stupid bug in the new pmap_remove().
Arrange for soft modified/referenced flags to be cleared when a page is freed.
1998-07-26 18:13:28 +00:00
Doug Rabson 72c36e1413 Fix pmap_enter_quick() to stop it hanging when the level 2 pte exists
but isn't valid.

Reimplement pmap_remove() to be much more efficient at removing large
stretches of addresses.

As part of reimplementing pmap_remove() fix pmap_protect() so that it stands
a hope of working.
1998-07-24 09:43:27 +00:00
Doug Rabson b9ca15f807 Add ISA support.
Remove mcclock hack which was only needed because ISA wasn't done yet.
1998-07-22 08:34:19 +00:00
Doug Rabson ec0bebbce7 Add some convenience functions for accessing device memory.
Add a DDB command to allow access to inb/inw/inl from the debugger.
1998-07-22 08:33:30 +00:00
Doug Rabson 53db2ca0b6 Merge KN20AA support from Andrew Gallatin.
Add support for device memory access.
Add support for ISA irqs.
1998-07-22 08:32:17 +00:00
Doug Rabson 31de2a7751 Move the mcclock from root to isa. 1998-07-22 08:30:25 +00:00
Doug Rabson 905f48d3af Add a simple ISA bus. No support for memory mapped devices or DMA as yet. 1998-07-22 08:29:26 +00:00
Doug Rabson dd5f72e1fc Add sio support. 1998-07-22 08:28:24 +00:00
Doug Rabson 68f6efc27f Add platform functions for manipulating PCI irqs.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:27:56 +00:00
Doug Rabson 41fc8fe7b9 Add declaration of {aquire,release}_timer2(). 1998-07-22 08:26:23 +00:00
Doug Rabson bb4752537d Add macros and chipset support for accessing device i/o memory on the alpha. 1998-07-22 08:25:39 +00:00
Doug Rabson 515cfabc48 Add KN20AA support.
Add entries for syscons.
1998-07-22 08:24:39 +00:00
Doug Rabson 237064085b Tweaks to stop config(8) warnings and to avoid an unfinished experiment of
mine.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:23:26 +00:00
Doug Rabson eb7262ea39 Support header for sysbeep() implementation. 1998-07-22 08:21:36 +00:00
Doug Rabson e0fbfbb576 Make ptrace single steps over branches work as intended. 1998-07-22 08:20:57 +00:00
Doug Rabson cbda18ce6e Add support for sio's soft interrupts. 1998-07-22 08:20:15 +00:00
Doug Rabson e17e8bbe72 Support the DEC_KN20AA platform (AlphaStation 500 or 600).
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:19:39 +00:00
Doug Rabson bba326e18d Merge changes from Andrew Gallatin to support different CIA based platforms.
Add code to identify and attach either serial or VGA console as appropriate.
1998-07-22 08:18:34 +00:00
Doug Rabson b50b3bda1d Add code from i386 to support sysbeep(). Doesn't work quite right but it
makes a noise.
1998-07-22 08:16:34 +00:00
Doug Rabson e344c90c80 Change siocn{put,get}c to siogdb{put,get}c to allow a serial console on one
line with serial debugging on another line.
1998-07-22 08:15:34 +00:00
Doug Rabson 3a4215418c Simplify access to PCI config registers. 1998-07-16 13:38:35 +00:00
Doug Rabson a22401deb1 Make ptrace work. 1998-07-15 20:16:28 +00:00
Doug Rabson 6a5694427a Tweaks for cross-building from NetBSD/alpha.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-15 20:12:54 +00:00
Doug Rabson 718c0cbefb Add some debug code. 1998-07-15 20:07:33 +00:00
Doug Rabson a6481f0baf An mc146818a clock attached to an isa bus. 1998-07-15 19:21:31 +00:00
Doug Rabson 28c3132268 Linker script for alpha kernel. 1998-07-15 19:19:24 +00:00
Bruce Evans 37889b394a Changed to the C9x draft spelling of the (unsigned) integral type
suitable for holding object pointers (ptrint_t -> uintptr_t).
Added corresponding signed type (intptr_t).  Changed/added
corresponding non-C9x types for function pointers to match.  Don't
use nonstandard types to implement these types, and don't comment
on them in <machine/types.h>.
1998-07-14 05:09:48 +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 8e8c234f4d Don't bother calling pmap_emulate_reference() from cpu_fork(). It isn't
needed and it panics a DIAGNOSTIC kernel.
1998-07-12 16:30:58 +00:00
Doug Rabson bb8a6f725b Define option DEC_EB164 1998-07-12 16:28:09 +00:00
Doug Rabson 3a130d871a Add entry for prom console. 1998-07-12 16:27:34 +00:00
Doug Rabson 8777a8098d Add some bits and pieces for my test box. 1998-07-12 16:26:52 +00:00
Doug Rabson d538e9fca6 Update to new interrupt api. 1998-07-12 16:23:19 +00:00
Doug Rabson d19af714d3 Implement CIA interrupts.
Obtained from: SRM console magic from NetBSD
1998-07-12 16:17:54 +00:00
Doug Rabson b46e6c4115 Implement intr_create/intr_connect. 1998-07-12 16:16:22 +00:00
Doug Rabson 2895b128c7 Implement promcncheckc. 1998-07-12 16:15:06 +00:00
Doug Rabson a85c203100 Add some debug code.
Always clear TLB in pmap_activate, even if activating curproc's pmap.
1998-07-12 16:13:54 +00:00
Doug Rabson 78e3c75746 Add a couple of sysctls and implement sendsig/sigreturn.
Obtained from: signal code from NetBSD
1998-07-12 16:10:52 +00:00
Doug Rabson 56abfaf4eb Add some generic interrupt dispatch code. 1998-07-12 16:09:30 +00:00
Doug Rabson cefd88ce75 Add definition of p_switchtime. 1998-07-12 16:08:15 +00:00
Doug Rabson 3b7389bd33 Include opt_ddb.h. 1998-07-12 16:07:43 +00:00
Doug Rabson 323df54807 Hardwire the root disk of my test box for now. 1998-07-12 16:07:05 +00:00
Jordan K. Hubbard d14897d381 Quick and dirty support for Linux's mremap. Not used by anything
but quake2 AFAIK.

Submitted by:   Luoqi Chen <luoqi@watermarkgroup.com>
1998-07-10 22:30:08 +00:00
Bruce Evans 1009171eb2 Oops, forgot to modify the pointer-int typedefs from the i386 version. 1998-07-10 02:34:50 +00:00
Bruce Evans 2e480d34aa Added a kernel-only typedef (ptrint_t) giving an integral type that is
least unsuitable for holding an object pointer.  This should have been
used to fix warnings about casts between pointers and ints on alphas.

Moved corresponding existing general typedef (fptrint_t) for function
pointers from the i386 <machine/profile.h> to a kernel-only typedef
in <machine/types.h>.  Kludged libc/gmon/mcount.c so that it can
still see this typedef.
1998-07-10 02:27:16 +00:00
Warner Losh f71f5262b1 Add the ability to suspend as well as hibernate to the system. This
is the kernel part of my commits, the userlevel stuff will be done in
a separate commit.  Add the ability to suspend as well as hibernate to
syscons.  Create a new virtual key like hibernate for suspend.  Update
apm_bios.h to define more apm bios goodies.
1998-07-06 06:29:07 +00:00
Doug Rabson be90e52a12 Add support for kernel gdb. 1998-07-05 12:24:18 +00:00
Doug Rabson 638ccebd00 Use byte/word access in badaddr if relevant. 1998-07-05 12:22:56 +00:00