Commit Graph

3783 Commits

Author SHA1 Message Date
Kazutaka YOKOTA a87be5f49e Removed an obsolete test which prevented mouse movement from quiting
screen saver. Added a missing `break' statement  in set_normal_mode().

Reviewed by: sos
1997-02-28 08:42:35 +00:00
KATO Takenori 75492a101b Synchronize with NetBSD/pc98 patch level 81.
Submitted by:	Naofumi Honda <honda@Kururu.math.hokudai.ac.jp>
Obtained from:	NetBSD/pc98 patch level 81
1997-02-28 08:34:06 +00:00
Bruce Evans 014e652753 Fixed the gcc ellipsis change to work with gcc-1.x. 1997-02-28 07:12:34 +00:00
Justin T. Gibbs bccca068ce Functionalize some code that was repeated throughout the driver.
Fix a bug in the initialization of the busreset_args that left the B channel
args unitialized and the A channel ones initialized to B's vales.  Oops.

If we get a NO_IDENT sequencer interrupt (the reconnecting target didn't
issue an identify or botched it), reset the bus instead of panicing.  We
should be able to recover from this error.

In the AWAITING_MSG handler, order messages by severity.  Since the message
we send is based on a flag on the SCB, it is possible, during error recovery,
to get more than one flag set.  This is fine since any time a new flag is
set, it is meant to take us to a more draconian level of recovery.  This
also ensures that we don't lose any "history" of what the command has gone
through.

When we reset the bus, reset the "send ordered tag" bitmask.

Clear some additional interrupt status when we perform a bus reset.
1997-02-28 03:58:21 +00:00
Justin T. Gibbs 5a02006d3e Fix numerous problems with the abort/recovery code. Highlights include fixing
a race condition in how SDTR and WDTR negotiation are handled, fixes for multi-lun
non-tagged device recovery, and ensuring that the timedout scbs in the waiting queue
are cleaned up.

Fix a problem with SCB paging that caused bogus residuals to be reported.
1997-02-25 03:05:35 +00:00
Alexander Langer a28b3400eb Typo police. 1997-02-24 00:37:43 +00:00
Peter Wemm 6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Justin T. Gibbs 4d04269a37 Fix some more problems in the recovery code.
Cleanup of the disconnected list was broken in the SCB paging case
    (confusion of NULLand SCB_LIST_NULL)
Implement a clean mechanism for determining that we have exited the timeout
    state and test for this in ahc_done instead of all over the place.
Bring back the use of AAP (Auto Access Pause) I don't think it was the
    true cause of the bus hangs people were reporting.
We want to reset the bus if we've been through an Abort action, not if
    we are a recovery SCB (one implies the other, but not vice-versa).
1997-02-19 01:00:51 +00:00
Mike Smith a7d3b81100 Use the same blocks->size-in-MB conversion algorithm as the SCSI code
to avoid overflowing an intermediate value for disks > 2^32 bytes
large.
1997-02-18 23:31:53 +00:00
Justin T. Gibbs df98fb1bb2 Kill the initialization of two old scratch ram variables. They were removed
to make space for the larger message buffer.
1997-02-18 20:23:09 +00:00
Bruce Evans b0a5b85d06 Fixed biosboot to compile with Lite2. <sys/lock.h> is now a prerequisite
for <ufs/ufs/inode.h>.
1997-02-18 15:09:39 +00:00
Justin T. Gibbs 4e605384b5 Don't rely on AAP(Auto Access Pause) when queueing SCBs to the card. This
will increase the overhead of queueing a command, but some recent bug reports
make me believe that AAP isn't really working and that we are losing some
SCBs from the input queue.  Hopefully this will cure that problem.

Fix some bugs in the error recovery code.  Mainly these could cause us to
inadvertantly forget to untimeout an SCB that was recovered causing later
confusion.
1997-02-18 04:25:31 +00:00
Bruce Evans f79ef55e7a Replaced START_ENTRY by _START_ENTRY. -current hasn't got my cleanup
of DEFS.h which renamed it.
1997-02-17 07:21:28 +00:00
Bruce Evans dab159e3d6 Select between the generic math functions and the i387-specific ones
at runtime.

etc/make.conf:
Nuked HAVE_FPU option.

lib/msun/Makefile:
Always build the i387 objects.  Copy the i387 source files at build
time so that the i387 objects have different names.  This is simpler
than renaming the files in the cvs repository or repeating half of
bsd.lib.mk to add explicit rules.

lib/msun/src/*.c:
Renamed all functions that have an i387-specific version by adding
`__generic_' to their names.

lib/msun/src/get_hw_float.c:
New file for getting machdep.hw_float from the kernel.

sys/i386/include/asmacros.h:
Abuse the ENTRY() macro to generate jump vectors and associated code.
This works much like PIC PLT dynamic initialization.  The PIC case is
messy.  The old i387 entry points are renamed.  Renaming is easier
here because the names are given by macro expansions.
1997-02-16 18:26:31 +00:00
David Greenman 0305f20493 Changed timeout for requesting sense from 100ms to 1 second.
Submitted by:	gibbs
1997-02-14 03:13:37 +00:00
Bruce Evans 661e2ccd94 Changed #include order to match better order in 2.2. 1997-02-13 22:48:19 +00:00
Bruce Evans 8363c19687 Get defaults for the boot device (and flags) from the file
"boot.config" (relative to the root directory on the 'a' partition
on the first BSD slice) if it exists.  If it doesn't exist, then
the only visible changes should be that the kernel name isn't reset
to "/kernel" after looking it up fails and that the default name
is now "kernel".

The new function readfile() can be used for other things:
- reading help messages.
- reading splash screens.
- reading userconfig info.
1997-02-13 13:15:47 +00:00
Søren Schmidt cc5625f0ed Oops, cut/paste could be done on tthe WRONG vty :(
pointed out by Kazu.
1997-02-13 11:58:49 +00:00
Bruce Evans a7d00b5bf6 Moved definition of FUNCTION_ALIGNMENT to a machine-dependent place.
Changed it from 4 to 16 for i386's.  It can be anything for i386's,
but compiler options limit it to a power of 2, and assembler and
linker deficiencies limit it to a small power of 2 (<= 16).
We use 16 in the kernel to get smaller tables (see Makefile.i386 and
<machine/asmacros.h>).  We still use the default of 4 in user mode.

Use HISTCOUNTER instead of (*kcount) in the definition of KCOUNT()
for consistency with other macros.
1997-02-13 10:47:29 +00:00
Bruce Evans 47cac30b9a Align text to 16-byte boundaries if profiling is enabled. This will
allow a fourfold reduction in the size of the profiling buffers.  This
goes with rev.1.91 of Makefile.i386 which does the same thing for C
functions.
1997-02-13 08:31:53 +00:00
Mike Pritchard dc14cd9f1b This no longer depends on NFS being defined so that it
can check for an NFS root.  With Lite2, the file system
type can be checked by checking if the rootfs name == "nfs".
1997-02-12 16:46:25 +00:00
Bruce Evans 56a956e530 Use a valid value for MSGSSZ
Don't specify PSM_CHECKSYNC twice.

Submitted by:	MSGSSZ by mi@aldan.ziplink.net
1997-02-12 09:47:31 +00:00
Steven Wallace 1a46116d9d Bug fix for SNDCTL_DSP_GETOSPACE ioctl. It would report 0 bytes
available in buffer when buffer was completely empty.
It now correctly reports the total buffer space available.

Reviewed by:	jkh, davidg
Obtained from:  Linux 1.3.20's sound driver code
1997-02-12 06:56:57 +00:00
Justin T. Gibbs a042d32c0b Fix a bug in the reporting of residuals. The code was relying on the SG_COUNT
filed in the hardware SCB not changing during the course of a transaction.
Since the sequencer now DMAs the hardware SCB back up to the host when it
detects a residual, this is no longer the case.  I added a field to the
"software" scb to mirror this information and it is now used for doing the
residual calculation.
1997-02-11 17:10:37 +00:00
Bruce Evans 3d1713a8a5 Restored changes from rev.1.58-1.60 which were blown away by the
previous commit.
1997-02-11 15:03:31 +00:00
Julian Elischer db03b748e3 really minor cleanup
sc is set to ifp->if_softc so use it..
1997-02-11 09:29:48 +00:00
Mike Pritchard b49b12158f Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.

Also silenced a -Wall warning.
1997-02-10 16:34:16 +00:00
Mike Pritchard 59942ba155 Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.
1997-02-10 16:32:52 +00:00
Darren Reed 4b93480b2a IP Filter is now character device #79 1997-02-10 12:17:45 +00:00
John Dyson 996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
Justin T. Gibbs 21c89fbab3 ahc_search_qinfo->ahc_search_qinfifo
ULTRAENB->FAST20

Add a missing ahc_run_done_queue if a BRKADDRINT occurs.  This should never
happen (haven't heard of one happening), but it was still a bug.

Brought the ordered tag sending code up into the tag code to be clearer.

If we decide we should send an ordered tag, only do so for the target that
timed out instead of all targets.

Initialize the STAILQ in ahc_serach__qinfifo.  This was causing a panic
during some recovery operations.

Remove the unused varable maxtarget.
1997-02-09 03:26:56 +00:00
Poul-Henning Kamp b7a652ab84 I have no idea what this is all about, but it works and Bruce hasn't
complained so it cannot be entirely bad :-)

I include the email that probably explains it for people who already know:

> >Compiling with -O3 inlines functions.  However the function that is being
> >inlined in makeinfo.c (add_word_args()) is a vararg function and must not be
> >inlined.
> >
> >The code in question is K&R style, and AFIK, there is no way for the compiler
> >to determine that the function uses vararg.  Either change the code to use
> >prototypes, or use stdarg, or add a directive to prevent inlining.
>
> Not declaring a varargs function as varargs before it is used gives
> undefined behaviour.
>
> However, in practice the bug is probably in FreeBSD's <varargs.h>, which
> doesn't use gcc's __builtin_next_arg().  gcc should notice that it is
> used and not inline functions that have it.  <stdarg.h.> uses it, but I
> think there's another gcc builtin that it should be using.

Patch attached.  The ellipsis causes gcc to flag this as a varargs function,
and the name "__builtin_va_alist" is special cased in gcc to hide the last
argument in the arglist.

Reviewed by:	bde & phk
Submitted by:	jlemon@americantv.com (Jonathan Lemon)
1997-02-07 20:22:15 +00:00
Kazutaka YOKOTA 445605a6e0 Fix for the Compaq Armada laptop.
The PS/2 mouse device responds to a reset command with a sequence of
ACK(fa), RESULT(aa) and ID(00).  Most PS/2 mice immediately returns
ACK, but spend sometime before sending RESULT. The Armada takes time
before ACK; extra delay is necessary before the call to read ACK.

The problem was reported in comp.unix.bsd.freebsd.misc and the patch
was tested by the reporter. No PR was filed, by the way.
1997-02-07 11:41:45 +00:00
Joerg Wunsch a2f36095e2 The worm(4) driver needs a bdev major # now, too. 1997-02-06 22:20:33 +00:00
Justin T. Gibbs a42f819712 Initialization of a variable got lost in the last commit when I moved
a piece of code into a subroutine.
1997-02-03 17:24:25 +00:00
Justin T. Gibbs c646d245b2 Fix an oversight in the handling of non-tagged abort requests. We need
to search the QINFIFO to remove any possible command that is waiting
otherwise our abort request may not be held up still waiting for the
first command to complete.
1997-02-03 16:29:07 +00:00
Justin T. Gibbs 8ecec21da6 White space cleanup and other cosmetic style changes.
Fix a few panics during error recovery:
1) Stupid mistake in the "no SCB match handler"  where I was using the wrong
   variable (busy_scbid instead of scb_index).
2) Unbusy the target of an abort request if the command we are trying to
   abort is an untagged transaction.  If we don't, we get a fatal NO_MATCH_BUSY
   condition which "should never happen".
3) When an abort completes, turn off ahc->in_timeout or else the next timeout
   will hit the protective "scb timesout again" panic.
4) Fix a typo that caused the requeued "abort" SCB to have its TAG_ENB and
   disconnect bits to be cleared (missing ~) so that devices would complain
   about overlapped commands.

Be sure to turn off the unexpected busfree interrupt after we do a bus
reset since we are expecting the bus to go free in that case.

Return XS_TIMEOUT instead of XS_DRIVERSTUFFUP in certain scenarios.  XS_TIMEOUT
allows for retries, XS_DRIVERSTUFFUP does not.

Allow commands with SDTR and WDTR negotiation to be tagged.  The SCSI II spec
says that you probably should not do this for fear of hitting bogus devices.
The driver did this in the past for almost two years without any problem,
and not doing it causes problems during error recovery to a tag capable device
as the number of openings is higher than two and we'll start sending it
tagged commands causing "overlapped commands attempted" type errors.  The
real fix needs to happen in the generic SCSI layer which can limit the
number and type of transactions to a device during error recovery efficiently.

Give ourselves at least 100ms to perform a request sense instead of relying
on the original timeout to be long enough to complete this new command as
well as the one that generated the condition.

Removed some redundant code.
1997-02-03 02:16:16 +00:00
KATO Takenori d5605f2a31 Deleted i386_cpus[]. i386_cpus[] is a static variable in identcpu.c.
Found-by: lint
1997-02-02 10:43:35 +00:00
Joerg Wunsch c37ddbb8bd Correct the usage of fea0. It's an EISA driver now, so the ISA usage
is bogus.

Also, correct a stale comment about non-existing EISA support.
1997-02-01 19:53:12 +00:00
Bruce Evans d1adf9f099 Fixed the SMC fifo bug fix. sioopen() hung while input was streaming in
with <= 100 usec between each character arrival time.  This didn't happen
until rev.1.75 of clock.c because DELAY(100) used to delay for closer to
80 usec than 100 usec, and the minimum time between character arrivals is
87.8 usec at the maximum supported speed of 115200 bps 8N1.

Clear DCD timestamp flag on close (the input timestamp flag is already
cleared).
1997-02-01 16:04:16 +00:00
David Greenman e4c46b5e82 Removed PG_N from here, too. Some machines don't like it and it's unnecessary. 1997-01-30 20:22:02 +00:00
David Greenman 3def491346 Removed unnecessary PG_N flag from device memory mappings. This is handled
by the CPU/chipset already and was apparantly triggering a hardware bug that
causes strange parity errors.
1997-01-30 19:36:58 +00:00
Søren Schmidt ac59a2c67c Fixed the "switch to next screen" command (normally bound to the
key "print scrn".
It used to stop at the first non-open vty, now it skips the non-open
ones and thereby enable one to cycle around all open vty by pressing
"print scrn".
1997-01-30 15:12:17 +00:00
Kazutaka YOKOTA 50c193eb05 Removed reference to PSM_NO_RESET which is no longer available. 1997-01-30 11:59:36 +00:00
Bruce Evans 49a116737e Estimate an initial overhead of 0 usec instead of 20 usec in DELAY().
I have code to calibrate the overhead fairly accurately, but there
is little point in using it since it is most accurate on machines
where an estimate of 0 works well.  On slow machines, the accuracy
of DELAY() has a large variance since it is limited by the resolution
of getit() even if the initial delay is calibrated perfectly.

Use fixed point and long longs to speed up scaling in DELAY().
The old method slowed down a lot when the frequency became variable.
Assume the default frequency for short delays so that the fixed
point calculation can be exact.

Fast scaling is only important for small delays.  Scaling is done
after looking at the counter and outside the loop, so it doesn't
decrease accuracy or resolution provided it completes before the
delay is up.  The comment in the code is still confused about this.
1997-01-29 22:51:44 +00:00
Bruce Evans 160da193e0 Fixes and workarounds for Hayes ESP:
- don't uselessly initialize the fifo "DMA" bit at attach time.
- initialize the fifo "DMA" bit at open time.  Without this, the device
  interrupts for every character received, reducing input performance
  to that of an 8250.
- don't uselessly initialize the fifo trigger level to 8 (scaled to
  256) at attach time.
- don't scale the fifo trigger level to 512 bytes.  The driver's pseudo-
  dma buffer has size 256, so it can't handle bursts of size 512 or 256.
  It should be able to handle the second lowest ftl (2 scaled to 64).
- don't reset the fifos in siostop().  Reset triggers a hardware bug
  involving wedging of the output interrupt bit  This workaround
  unfortunately requires ESP support to be configured.
1997-01-29 21:50:02 +00:00
Bruce Evans 26add14927 Disabled logging of masked exceptions on exit. Keep the side effect of
saving the state (see rev.1.17).
1997-01-29 13:46:28 +00:00
Justin T. Gibbs 54dd351d93 Add 1997 to my copyright.
If we can, use timeouts instead of DELAYs when dealing with a bus reset.
This prevents us from holding up the whole machine for a noticible amount
of time (especially for a real time app).

Make a pass over the timeout/error handling code.  Aborts are more
reliable.  We actually handle parity errors correctly now instead of
locking up the bus.  Added code to properly clean up disconnected SCBs
down on the card during error handling.  Improved robustness in several
areas.

If we are using defaults, but are an Ultra card, negotiate at 20MHz instead
of 10.

Don't attempt to handle any commands for 100ms after a reset has occured.
This is the minimum time before a target will respond to selection.  Also
disable the busfree interrupt before doing a bus reset.  This prevents the
driver from getting confused by an "unexpected busfree".
1997-01-29 05:27:03 +00:00
Bruce Evans d73ffacdf6 Removed bogus options CHILD_MAX and OPEN_MAX. 1997-01-27 12:39:39 +00:00
Bruce Evans 488600a422 Added KBD_MAXRETRY and PSM_NO_RESET. 1997-01-27 11:54:56 +00:00
Bruce Evans 4bc24b97bc Added lots of undocumented options KBD*, MSG*, NBUF, NMBCLUSTERS, PSM*,
SEM* and SHM*.  These are already supported in the options files.  I
mostly used the default value plus 1.  This ensures that the LINT kernel
depends on the options headers.
1997-01-27 11:37:16 +00:00
Bruce Evans 4123678332 Sync with <pci/pcibus.h>. pcibus.c unfortunately still compiled (with
only 3 or 4 warnings) when pb_maxirq went away.
1997-01-25 18:51:01 +00:00
Justin T. Gibbs c2f69d249e 93cx6.c:
Style nit.  Backslashes in macro weren't aligned.

aic7xxx.c:
Preserve the value of STPWEN in SXFRCTL1 during initialization.  STPWEN
controls low byte termination and is setup by the PCI probe front end.
1997-01-24 21:59:32 +00:00
Bruce Evans f42cf36fa8 Fixed some formatting bugs (mostly regressions in rev.1.48). Replaced
some magic numbers by pmap constants.  Cosmetic.
1997-01-24 20:37:57 +00:00
Bruce Evans d9cca175bc Initialize CR0_MP in setregs() in case npx0 is disabled or not configured.
Disabling npx0 works right now.

Don't reference `npxdriver' if npx0 is not configured.  Not configuring
npx0 doesn't quite work yet.

Don't clear potential non-npx pcb flags in setregs().
1997-01-24 19:01:54 +00:00
David E. O'Brien 8819cbef39 KNF style police.
Reported by:	Bruce
Thanks to:	Bruce for also providing a diff.
1997-01-24 12:39:11 +00:00
Søren Schmidt 0d3f983ad2 Add save/restore cursor as pr SCO screen(HW) manpage.
Fix ESC[2J to not move cursor home
Clear mouse cutmarking on more cases.
Minor changes by me.

Submitted by:	ache
1997-01-23 20:00:45 +00:00
Garrett Wollman 6a4c899092 Put newlines after log messages.
Submitted by:	seki@sysrap.cs.fujitsu.co.jp PR#2563 (but the patch didn't
		apply)
1997-01-23 16:17:09 +00:00
John Dyson 7e64cb7a96 Remove some dead code from trapwrite.
Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1997-01-23 01:30:59 +00:00
Justin T. Gibbs 71318ca3ea Remove some unnecessary overhead in the command complete processing. It
should be nearly impossible to overflow the QOUTFIFO (worst case 9 command
have to complete with at least 6 of them requiring paging on an aic7850),
so don't take the additional PIO hit to guard against this condition.  If we
don't see our interrupt in time, the system has bigger problems elsewhere.
If this ever does happen, the timeout handler will notice and retry the
command.

Remove the ABORT_TAG sequencer interrupt handler.  This condition can't happen
with the new SCB paging scheme.

Fix a few bugs noticed by Dan Eischen <deischen@iworks.InterWorks.org>
that could prevent ULTRA from being negotiated to drives above ID 7 and
also could allow an SCB to be passed to ahc_done twice during error recovery.

Fix a bug notice by Rory Bolt <rory@atBackup.com>.  It turns out that a
sequencer reset will actually start the sequencer running regardless of the
state of the pause bit.  This could lead to strange problems with loading
the sequencer.
1997-01-22 18:05:31 +00:00
John Dyson 8130eff80a Fix I386 copyout support. The new page-table management code will
not lazy-fault page table pages.  Update the copyout support to take
that into account.  This should fix some segfault problems on such
machines.

After a short test period, we'll move this into 2.2.

Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1997-01-22 06:15:27 +00:00
Søren Schmidt dc31ce3ddb Fix the bug that caused CTRL & ALT keys to be hanging sometimes after
an X seesion. Really stupid error of me, and I've been looking at
this code SO many times. Thanks to Kazutaka YOKOTA for seeing this..

Submitted by:	Kazutaka YOKOTA
1997-01-20 08:05:15 +00:00
Søren Schmidt cf35b775cb Oops, the position of the savefont code was wrong, cur_console
wasn't set yet.
1997-01-19 17:34:14 +00:00
David E. O'Brien bcd60335fc Add bits to identify AMD K5 and K6 cpu's.
Tested only on my AMD K5 PR-133.  Bit values for K6 taken from AMD document
on how to test such things.

2.2 Candidate.
1997-01-19 01:56:55 +00:00
Søren Schmidt 6b2c8fd9c3 Oops! I commented out the waiting for retrace loops, because the
one in draw_mouse causes spontanious hangs on my p5-100 when I
move the mouse excessively. Forgot that on the last commit, so
using the mouse or destructive cursor would produce large amounts
of flicker..
1997-01-18 15:53:48 +00:00
Joerg Wunsch e4107dcf00 This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) up
to -current.

Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me
a chance to test this.  Only the PCI driver is tested though.

One final patch will follow in a separate commit.  This is so that
everything up to here can be dragged into 2.2, if we decide so.

Reviewed by:	joerg
Submitted by:	Matt Thomas <matt@3am-software.com>
1997-01-17 23:54:45 +00:00
Joerg Wunsch b05ee6a563 Finally import the 960801 of Matt Thomas' DEC FDDI driver. I'm
importing it onto a vendor branch first, in the hope that this will
make future maintenance easier.

The conflicts are (hopefully) unimportant.  More commits that actually
bring this into the source tree will follow.

Submitted by:	Matt Thomas (thomas@lkg.dec.com)
1997-01-17 23:19:49 +00:00
Jordan K. Hubbard f099c183d8 Add Intel EtherExpress Pro/10 Ethernet adapter to list of supported
devices.
1997-01-17 17:27:14 +00:00
KATO Takenori b2f4ff0875 Fixed unit select code in atapi_probe (PC98 specific). 1997-01-17 16:58:38 +00:00
Søren Schmidt 171b420b11 Bruce pointed out a bogon:
cur_console is NULL when copy_font() is first called from scinit().  This
is apparently harmless when scinit() is called early from sccninit() -
page 0 is apparently mapped r/w then, and 0->status contains suitable
garbage.  However, when there is a serial console, scinit() is first
called from scattach() when the page tables are completely initialized,
so the NULL pointer causes a panic.

Submitted by:	bruce
1997-01-17 15:49:13 +00:00
KATO Takenori a84bc4735a Moved the definition of LPC_ENA into #else ... #endif. Changed
comment of LPC_ENA.
Submitted by:	Bruce Evans <bde@freebsd.org>
1997-01-17 14:40:39 +00:00
Jordan K. Hubbard 0942673f33 Adjust ex0 entries properly after talking with Javier. 1997-01-17 14:19:04 +00:00
Nate Williams 4ee1132018 Bring back the fix from 1.32 that got spammed by recent changes. 1997-01-16 18:57:19 +00:00
Bruce Evans 6bed7e5140 Guard against the i8254 timer being uninitialzed if DELAY() is
called early for console i/o.  The timer is usually in BIOS mode
if it isn't explicitly initialized.  Then it counts twice as fast
and has a max count of 65535 instead of 11932.  The larger count
tended to cause infinite loops for delays of > 20 us.  Such delays
are rare.  For syscons and kbdio, DELAY() is only called early
enough to matter for ddb input after booting with -d, and the delay
is too small to matter (and too small to be correct) except in the
PC98 case.  For pcvt, DELAY() is not used for small delays (pcvt
uses its own broken routine instead of the standard broken one),
but some versions call DELAY() with a large arg when they unnecessarily
initialize the keyboard for doing console output.  The problem is
more serious for pcvt because there is always some early console
output.

Guard against the i8254 timer being partially or incorrectly
initialized.  This would have prevented the endless loop.

Should be in 2.2.
1997-01-16 18:28:20 +00:00
KATO Takenori 280a2265d9 - Modified for PC-98.
- Included IBM-PC specific code in #ifndef PC98.
1997-01-16 14:56:16 +00:00
Bruce Evans 5131d64e0c Removed option EXTRAVNODES. All versions of FreeBSD-2.x have a sysctl
variable `kern.maxvnodes' which gives much better control over vnode
allocation than EXTRAVNODES (except in -current between 1995/10/28 and
1996/11/12, kern.maxvnodes was read-only and thus useless).
1997-01-16 13:16:10 +00:00
Jordan K. Hubbard 3b20426160 Add the ex driver (Intel EtherExpress Pro/10).
I have no idea if this works since I don't have one of the cards to test.
I also don't know what the LINT and GENERIC entries should look like,
so I just made up some values for now and left them commented out.
Someone who knows the factory settings for a Pro/10, please contact me!

Submitted-By: Javier Martín Rueda <jmrueda@diatel.upm.es>
1997-01-16 12:19:21 +00:00
Bruce Evans 7d350e7256 Fixed printing of small offsets. E.g., -4(%ebp) is now printed
as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is
defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as
GMON_PROF_HIRES+0x4(%ebp).
1997-01-16 11:27:11 +00:00
Jordan K. Hubbard 827d623ef8 Document INCLUDE_CONFIG_FILE. 1997-01-16 07:43:27 +00:00
David Greenman 649c409d03 Fix bug related to map entry allocations where a sleep might be attempted
when allocating memory for network buffers at interrupt time. This is due
to inadequate checking for the new mcl_map. Fixed by merging mb_map and
mcl_map into a single mb_map.

Reviewed by:	wollman
1997-01-15 20:46:02 +00:00
Bruce Evans e0611bb287 Fixed longstanding annoying warning about a type mismatch. pmap doesn't
really uses pt_entry_t internally, so don't use it here.

Fixed range checking for writing.  The partial page (if any) following
etext wasn't writable.
1997-01-15 19:24:12 +00:00
Søren Schmidt b6b9dfa17e Upgrade the kbdio rutines to provide queued kbd & mouse events.
Minor other updates to syscons by me.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-15 18:16:32 +00:00
John Fieber b8a83a83ca Make the sound drivers work with DEVFS.
If you have something other than a Soundblaster 16, please try
this out!
1997-01-15 03:42:30 +00:00
Garrett Wollman e7d4c83b3f Update from driver author. Closes PR#2421.
Submitted by:	 seki@sysrap.cs.fujitsu.co.jp
1997-01-14 18:24:59 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman 477180fbc8 Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom.  Get rid of the
abominable multi_kludge.  Update all network interfaces to use the
new machanism.  Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).
1997-01-13 21:26:53 +00:00
Nate Williams db7e7a7213 Just 'warn' the user that they are mixing dedicated drivers and generic
code if the option 'LINT_PCCARD_HACK' is specified (which should only
be used in LINT).

Demanded by:	bde
1997-01-13 05:22:40 +00:00
Nate Williams ec0ae37d10 Added options 'LINT_PCCARD_HACK' which (will very soon) allow LINT to
compile again.  The code to protect users from combining the dedicated
PCCARD drivers and the generic code is a warning if the above option
is included in the config file.

Demanded by:	bde
1997-01-13 05:21:09 +00:00
Mike Smith 995ee89c33 - Add [?] key and corresponding helptext/pager.
(helptext from Philippe Regnauld)
 - Make introfunc() work with serial terminals.
   (submitted by Jean-Marc Zucconi)
 - Eliminate excessive statusline redraw during screen updates.
   (requested by Peter Wemm)
 - Some trivial output formatting dinks.
1997-01-13 04:13:15 +00:00
John Dyson b447ce90f5 When we changed pmap_protect to support adding the writeable
attribute to a page range, we forgot to set the PG_WRITEABLE
flag in the vm_page_t.  This fixes that problem.
1997-01-11 23:50:42 +00:00
Nate Williams 796c9a39d8 Moved pccard_configure() to the end of the configure() list. This
avoids problems with the PCIC controller grabbing an interrupt that
another card needs.

Closes PR: kernel/2405

Reviewed by:	bde
1997-01-11 17:41:36 +00:00
John Dyson 9b5a5d81be Prepare better for multi-platform by eliminating another required
pmap routine (pmap_is_referenced.)  Upper level recoded to use
pmap_ts_referenced.
1997-01-11 07:19:02 +00:00
KATO Takenori af4342c037 Staticize the functions rtc_inb, rtc_outb, rtc_serialcombit, and
rtc_serialcom.  These functions are only used by PC98.
1997-01-10 17:11:09 +00:00
Poul-Henning Kamp ceb85496fa kern/2433: Multiple AHA1542 scsi controllers don't work
Reviewed by:	phk
Submitted by:	Virgil Champlin <champlin@pa.dec.com>
1997-01-10 08:45:55 +00:00
Poul-Henning Kamp 2a66b46b42 i386/2427: 2.2-BETA ft driver panics when there're no floppy drives
Reviewed by:	phk
Submitted by:	hosokawa@jp.FreeBSD.org
1997-01-09 12:50:07 +00:00
Nate Williams 62ce633d36 Make the code more consistant by using the INTR*MASK macros througout the
code.

Reviewed by:	bde

[
Bruce suggest removing the macros completely, but I'm not up to that
task quite yet.
]
1997-01-08 16:12:56 +00:00
Nate Williams 7323d74ac0 Changed magic # 0xa0000 -> ISA_HOLE_START since it's now defined. 1997-01-08 05:56:55 +00:00
Nate Williams 58eb96aa43 > The extra include of <sys/time.h> is because apm uses microtime() and my
> <sys/param.h> doesn't include <sys/time.h>
>
> I removed the NAPM check since it's wasteful to check twice.  apmprobe()
> checks the unit number, and that's the right check.

Submitted by:	bde
1997-01-07 15:36:34 +00:00
Bruce Evans 71fa328eb5 Made minimal changes to make this work again (it depended on devconf).
swapgeneric.c hasn't had anything to do with swapping for some time.
It just makes the -a boot option actually work, and breaks the static
configuration of rootdev and dumpdev.  It should be reorganized to
only support -a.
1997-01-07 01:12:18 +00:00
Nate Williams 16d2ae1333 - Cleanup up the driver (remove un-needed parameters, white-space,
etc..), plus add a better display suspend function.
- Changed the Copyright's to reflect the new 'jp.FreeBSD.org' email
  address.

Submitted by:	nate & HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
1997-01-06 06:02:03 +00:00
KATO Takenori 1a6a2fcd2d Undo RCS keyword change to keep the original `$NetBSD$'.
Pointed out by:	j@uriah.heep.sax.de (J Wunsch)
1997-01-05 07:10:19 +00:00
Nate Williams f0b608a75e Minor white-space and comment cleanups. No functional change.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-05 06:50:22 +00:00
Nate Williams 99642b0121 Fix for PR/2333 - psm0 panics if no mouse attached:
The problem is that `psmopen()' doesn't validate a pointer before
  using it.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-05 06:29:40 +00:00
Bruce Evans 639cfb9f88 Reenabled i586_optimized_copyin/out yet again. 1997-01-04 13:57:17 +00:00
Bruce Evans 363e4cc182 Fixed context switching of FPU state after a fault in
i586_optimized_copyin/out.
1997-01-04 13:56:18 +00:00
Bruce Evans ab372207b2 Fixed botched tables:
- the operands for bt, bts, arpl and `enter' were reversed.
- btr was reported as bts (with the correct operand order).
- cmpxchg was misplaced.  It was misplaced differently in the
  comments.  It is misplaced differently again in the i486 manual.
  I put it where the i586 manual and gas say it is.
- fucompp was misplaced.
- the rr table for(s) some versions of fstp, fcom and fcomp was non-null.
  This caused some invalid opcodes to be reported as "" instead of as
  "<bad instruction>".
- the word and long versions of the fi* instructions were reversed.
- aaa and daa were reversed.

Fixed bugs involving unusual operand sizes:
- 32-bit registers weren't always forced for bswap or for moves to and
  from special registers.
- the operand sizes weren't reported for [l]call or [l]jmp.
- displacements weren't truncated mod 2^16 when the operand size was
  16-bit.
- too-large displacements and offsets were fetched, and too-large
  offsets were reported, when the operand size was 16-bit.
- sign extended immediate bytes were extended too far when the operand
  size was 16-bit.

Fixed bugs involving usual operand sizes:
- 8-bit source registers weren't forced for mov[sz]b[wl].
- 16-bit source registers weren't forced for mov[sz]w[wl].
- immediate bytes were sometimes reported as sign extended even for
  byte operations.  Same for immediate words in word operations.
- the immediate byte was not reported as sign extended for `push'.

Finished Pentium support:
- cpuid, cmpxchg8b and rsm were missing.

Finished i287 support:
- fneni, fndisi and fsetpm were missing.  These are harmless nops on
  later FPUs.

Improvements:
- report invalid opcodes 0xd6 and 0xf1 using .byte.  They are special
  in not causing invalid operand exceptions when executed.
- report the immediate byte for unusual aam and aad instuctions.
  Immediate bytes other than 0x0a always worked and are documented to
  work on Pentiums.
1997-01-04 13:47:30 +00:00
KATO Takenori 74649f8e8f Change types of wdp_cylinders, wdp_heads and wdp_sectors in struct
wdparams from short into u_short.  If wdp_cylinders is short, it
overflows and cause serious sign extension bug when large IDE HDD is
used.  These members are only used for initialization of u_long
variables in both 3.0-current and RELENG_2_2 branch.

I believe this should be in 2.2.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-01-04 10:28:01 +00:00
Stefan Eßer 8c39a12760 Add code to copy the LDT, if required.
This code was sent to me by Bruce Evans, and seems to fix some
possible kernel panic in case of an execution error. It did not
cause any problems on my system, but I did never observe the
problem this patch is supposed to fix, anyway.

This patch is a NOP, unless the kernel is built with "options
USER_LDT", and doesn't affect the GENERIC kernel for this reason.

I want to have it in 2.2: it fixes a bug ...

Submitted by:	bde
1997-01-02 01:43:09 +00:00
Jordan K. Hubbard 08cd925b65 A couple of changes for proper mpu401 recognition, and an opl3 patch
taken from the voxware-3.5 distribution.  Also some changes to the SB
and MPU IRQs to reflect more common/default settings.

Submitted-By: Brian Campbell <brianc@netrover.com>
1996-12-30 22:26:26 +00:00
Joerg Wunsch a32a2879a6 Apply a similar fix as in gsc.c rev 1.23.
Pointed out by:	bde
1996-12-30 21:17:13 +00:00
Joerg Wunsch effbfcfdc6 Apparently, someone changed the gsc driver to allocate one big buffer
at device attach time, instead of allocating and freeing buffers as
necessary. But he or she forgot to remove the line that invalidated
the buffer when the device is closed. Therefore, after using the
device for the first time, the buffer was incorrectly invalidated and
that caused a page fault on the second, and subsequent uses.

Closes PR # kern/2319: Using Genius GS-4500 scanner...

Submitted by:	jmrueda@diatel.upm.es (Javier Martmn Rueda)
1996-12-30 20:42:47 +00:00
John Dyson d0aea04fe0 Let the VM system know that on certain arch's that VM_PROT_READ
also implies VM_PROT_EXEC.  We support it that way for now,
since the break system call by default gives VM_PROT_ALL.  Now
we have a better chance of coalesing map entries when mixing
mmap/break type operations.  This was contributing to excessive
numbers of map entries on the modula-3 runtime system.  The
problem is still not "solved", but the situation makes more
sense.

Eventually, when we work on architectures where VM_PROT_READ
is orthogonal to VM_PROT_EXEC, we will have to visit this
issue carefully (esp. regarding security issues.)
1996-12-30 05:31:21 +00:00
Bruce Evans 2f4b60c5a9 Fixed keeping track of interrupt nesting level across ASTs. It sometimes
became -1, and this recently became fatal if an address error occurs in
copyin/out/etc.
1996-12-29 22:05:23 +00:00
John Dyson 5e0c727879 Superficial clean-up of useracc calls. (The useracc usage of
B_READ/B_WRITE is bogus anyway.)  Might as well make the call prettier
anyway.
1996-12-29 02:29:41 +00:00
John Dyson f486bc1d64 Allow pmap_protect to increase permissions. This mod can eliminate
the need for unnecessary vm_faults.
Submitted by:	Alan Cox <alc@cs.rice.edu>
1996-12-29 02:27:07 +00:00
Bruce Evans 5a9c69e7af Disabled i586-optimized copyin and copyout again. The fault handler
is still broken - it doesn't restore the floating point state.

2.2-BETA users should disable it using npx0 flags 0x04 the same as
2.2-ALPHA users should have.
1996-12-28 12:19:25 +00:00
Andrey A. Chernov 1aa5ebd104 Turn off qcam_debug flag by default
Should go in 2.2
Reviewed by: pst
1996-12-28 05:45:18 +00:00
Bruce Evans b75504fdc2 Use breakpoint() instead of Debugger() in siointr1(). Debugger() doesn't
work in fast interrupt handlers because it calls db_printf() which uses
%es for string stuff and %es isn't initialized.
1996-12-23 19:57:33 +00:00
Bruce Evans 078d4ac997 Added undocumented SCSI_DELAY and SCSI_NCR_* options. SCSI_DELAY gets
tested a lot in GENERIC, but the others weren't in any config file and
some of them were broken.
1996-12-23 19:04:20 +00:00
Bruce Evans 392cefd10c Fixed quoting of MAXDSIZ and DFLTDSIZ. The quoting rules changed when
they were put in an options header.

Should be in 2.2.
1996-12-23 18:23:14 +00:00
Joerg Wunsch b38d58142b Cosmetic (wrt. the screen display) change: when re-enabling a device,
make sure it won't go into the PCI section.  Disabling and re-enabling
ed0 made it to the wrong section.

Submitted by:	msmith
1996-12-23 12:33:08 +00:00
Jordan K. Hubbard 5f1f670543 *Ahem* - opt_rlimit.h does not exist in the LKM case. This was another
2.2 build-breaker.. :(
1996-12-23 06:37:23 +00:00
Joerg Wunsch 2c966b7fdc Fix a bug in the wt driver that could cause memory corruption.
Closes PR # kern/1065.

While i was at it, also reject IO requests that are not an integer
multiple of the device blocksize.

Submitted by:	vak@crox.net.kiae.su (Serge V.Vakulenko)
Confirmed by:	Georg-W. Koltermann (gwk@cray.com)
1996-12-23 01:53:13 +00:00
Jordan K. Hubbard 553435cfa7 Someone needs to teach Nate about the C pre-processor in general and the
workings of #error in particular.  He also broke the 2.2 build with this
change, leading me to wonder whether or not the changes were ever even
tested.  Folks, I'm happy to see people work directly on 2.2 like
this and will continue to encourage Nate to make direct commits, but
please TEST before committing!  I think that's a more than reasonable
prerequisite, and this code could never have worked at all, leading me to
believe that Nate skipped this most basic of steps.
1996-12-23 01:24:44 +00:00
Joerg Wunsch e9822d926c Make DFLDSIZ and MAXDSIZ fully-supported options.
"Don't forget to do a ``make depend''" :-)
1996-12-22 23:17:09 +00:00
John Dyson d43f0f0a78 Document MAXDSIZ and DFLDSIZ. This is a 2.2 candidate change. 1996-12-22 18:28:50 +00:00
Poul-Henning Kamp 94801746f6 Add & Document MD5 option. 1996-12-22 10:38:41 +00:00
Nate Williams e5328857de PCCARD support safety belts.
Don't allow people to use the 'dedicated' drivers at the same time as
the generic support code, as it can cause all sorts of problems
including kernel crashes.

[ definite 2.2 material ]
1996-12-21 17:53:39 +00:00
Poul-Henning Kamp 544d046f79 Give MFS_ROOT priority over NFS as root filesystem.
2.2 candidate.
1996-12-21 16:43:35 +00:00
Stefan Eßer 56ecc3824a Mention amd driver in comment regarding PCI drivers. 1996-12-21 02:09:04 +00:00
Bruce Evans bb65f5a1cc Fixed lseek() on named pipes. It always succeeded but should always fail.
Broke locking on named pipes in the same way as locking on non-vnodes
(wrong errno).  This will be fixed later.

The fix involves negative logic.  Named pipes are now distinguished from
other types of files with vnodes, and there is additional code to handle
vnodes and named pipes in the same way only where that makes sense (not
for lseek, locking or TIOCSCTTY).
1996-12-19 19:42:37 +00:00
Joerg Wunsch 741d5385e8 Test in mseopen() whether the device has been configured at all, and
refuse the open intent with ENXIO otherwise.

Closes PR # bin/2226.

Reviewed by:	bde
1996-12-19 18:33:13 +00:00
KATO Takenori 95d98df162 Submitted by: Naoki Hamada <nao@sbl.cl.nec.co.jp>
Support 3COM 3C569 network card on PC98.
1996-12-19 10:31:10 +00:00
Alexander Langer df5080050d Hawaii-Five-Typo 1996-12-19 00:26:22 +00:00
Bruce Evans 7a1fadc47a Added a missing prototype. 1996-12-18 19:14:35 +00:00
Bruce Evans 959c02787e Only handle copyin/out/etc faults when not in an interrupt handler.
This makes unexpected faults (in an interrupt handler) more likely
to crash properly.  It could be done even better (more robustly and
more efficiently) using lazy fault handling.
1996-12-18 19:12:01 +00:00
Bruce Evans 115abf2097 Fixed formatting of KERN_DUMPDEV.
Should be in 2.2.
1996-12-18 18:53:00 +00:00
Bruce Evans d43190805d Disabled half-baked disk statistics support. It didn't actually generate
statistics, so it just wasted scarce disk table slots and screen space.
1996-12-18 17:44:31 +00:00
Bruce Evans 07addd421e Initialize the upper 16 bits of the memory sizes properly (to 0).
They were garbage that happened to be 0 in many cases.  (real_to_prot()
happens to leave the value of the real-mode %cr0 in %eax and the
memory-size BIOS calls usually don't touch the upper bits of %eax.
The upper 16 bits of %cr0 are usually 0 at boot time, at least on
486's.

Should be in 2.2.
1996-12-18 15:38:23 +00:00
Bruce Evans db7e362115 Moved the printing of the BIOS geometries from cpu_startup() into
configure() where it always belonged.  It was originally slightly
misplaced after configure().  Rev.138 left it completely misplaced
before the DEVFS, DRIVERS and CONFIGURE sysinits by not moving it
together with configure().

Restored the printing of bootinfo.bi_n_bios_used now that it can
be nonzero.
1996-12-18 15:03:10 +00:00
Stefan Eßer e69742d795 Add Tekram DC390/390T driver "amd0", which is expected to work with
generic AMD 53c974 PCI SCSI controllers as well.
1996-12-18 11:43:33 +00:00
Stefan Eßer 92cc16b276 Add comment for "amd" driver: Tekram DC-390(T) and generic AMD 53c974 PCI SCSI. 1996-12-18 01:37:22 +00:00
Stefan Eßer f8fc022510 Add driver for AMD 53c974 SCSI (Tekram DC390/390T).
Remove MAX_LUN=2 option for NCR driver: FAILSAFE does
no longer imply MAX_LUN=1.
1996-12-18 01:30:19 +00:00
Steven Wallace 427c6821f0 In the IBCS2 semctl system call, the last parameter arg is passed by
value, but in the FreeBSD semctl system call implementation, is passed
by  reference.

Submitted by:	 msagre@cactus.fi.uba.ar <Miguel Angel Sagreras>
1996-12-17 19:52:25 +00:00
Mike Smith 8f1f1c884c Increase the allowable port address from 0x2000 to 0xffff to aid in
making PCI look like ISA.

Closes pr kern/860.

Prompted-by: peter's buglist mailout (excellent idea btw 8)
1996-12-17 06:59:01 +00:00
David Greenman fee444b87b Fix nbuf calculation /4 -> /8. 2.2 already has it this way.
Reviewed by:	dyson
1996-12-17 04:19:41 +00:00
Stefan Eßer b88a895923 Remove "options MAXLUN=2" since the ncr driver will probe for 8 LUNs
now anyway, even if compiled with FAILSAFE defined.
1996-12-15 16:31:18 +00:00
Stefan Eßer 1fbb6d68b2 Update comment for "ncr" SCSI controllers (add Symbios and new chips) 1996-12-15 16:24:07 +00:00
KATO Takenori c9cfeed054 Fix typo. 1996-12-15 10:07:09 +00:00
Peter Wemm 825ba339df Add missing -I so that probe_keyboard.c can find <i386/isa/kbdio.h>. :-(
(Why, oh why did this include file end up in isa/ rather than include/ ?)
1996-12-15 01:25:54 +00:00
Jordan K. Hubbard c40e48ec21 Make the USERCONFIG_BOOT semantics closer to what was original
intended.
1996-12-14 22:18:43 +00:00
Joerg Wunsch dc38d02c45 Fix the breakage i've introduced with the EISA slot feature, by
depending the addition on NEISA > 0.
1996-12-14 22:02:58 +00:00
Joerg Wunsch c111c7c745 Add a small hack to UserConfig that allows to override the number of
EISA slots to probe.  This is mainly intended to allow installing the
system on an HP Netserver with an on-board AIC7xxx EISA SCSI
controller, that is sitting on EISA slot # 11.

Documentation updates explaining this hack will follow shortly.

Note that this can go away again as soon as the EISA device probing
is more intelligent about the address space clash with the PCI address
space.

2.2 candidate.

Not objected by:	freebsd-core :)
1996-12-14 18:07:17 +00:00
Garrett Wollman 59562606b9 Convert the interface address and IP interface address structures
to TAILQs.  Fix places which referenced these for no good reason
that I can see (the references remain, but were fixed to compile
again; they are still questionable).
1996-12-13 21:29:07 +00:00
Bruce Evans c08d58eade Moved nonstandard compiler profiling options out of config. Just print
the profiling level in config and decide what to do in makefiles.

Makefile.i386:
Align functions to 16-byte boundaries if profiling is enabled.  This
will allow a fourfold reduction in the size of the profiling buffers.
1996-12-13 12:46:28 +00:00
Jordan K. Hubbard 0b3870cb60 Close PR#2198:
I've added an installation from optical disk drive facility.
	This enables FreeBSD to be installed from an optical disk, which
	may be formatted in "super floppy" style or sliced into MSDOS-FS
	and UFS partitions.

	Note:  ncr.c should be reviewed by Stefan Esser <se@freebsd.org>
	and cd.c by Joerg Wunsch <joerg@freebsd.org> before bringing this
	into 2.2.

Submitted-By: Shunsuke Akiyama <akiyama@kme.mei.co.jp>
1996-12-13 07:55:14 +00:00
Steven Wallace 8bb9c4c7ea Soften range-check for LDTs.
Reviewed by:	bde
1996-12-12 17:57:50 +00:00
David Greenman a7e4f840ca Fix allocation for exech_map to be 16*PAGE_SIZE rather than 32*PAGE_SIZE
so that it is scaled the same as exec_map (16 concurrent exec'ers).
1996-12-12 04:20:50 +00:00
Martin Renters 204c7704d9 Two fixes:
makerom checksum check calculation was a no-op
	nb8390.c had a bug which caused packet_len to be incorrect
	for packets which wrapped in the buffer.
Submitted by:	Linux developers (I lost the email with their names)
1996-12-11 19:33:38 +00:00
John Dyson ab608804ed One minor mod to set the limit of nbufs to 2048 from 1536. More important
fix to exech_map, it used 32*ARG_MAX, and it should use 32*PAGE_SIZE.
1996-12-11 05:52:15 +00:00
Garrett Wollman d051845d36 Don't depend on <net/if.h> including <sys/time.h> 1996-12-10 18:01:27 +00:00
Bruce Evans 9d12c4da86 Give up early for empty partitions. The offset for an empty
partition is 0, which is outside the slice unless the disk is
dangerously dedicated.  There is little error checking later, and
following garbage metadata outside the slice usually caused crashes,
Empty 'a' partitions are fairly easy to create by cloning the label
for the whole disk.

Fixed a missing newline in a related error message.
1996-12-10 14:07:42 +00:00
David Greenman fb5831565c 1) Implement SIOCSIFMTU in ether_ioctl(), and change ether_ioctl's return
type to be int so that errors can be returned.
2) Use the new SIOCSIFMTU ether_ioctl support in the few drivers that are
   using ether_ioctl().
3) In if_fxp.c: treat if_bpf as a token, not as a pointer. Don't bother
   testing for FXP_NTXSEG being reached in fxp_start()...just check for
   non-NULL 'm'. Change fxp_ioctl() to use ether_ioctl().
1996-12-10 07:29:50 +00:00
KATO Takenori 40e070f293 Delete $NetBSD$, and add $Id$.
2.2 candidate.
1996-12-09 15:36:54 +00:00
Mike Smith c2ce3df1da Improve the explicitness of the "you cannot do anything with PCI
devices" message.

Closes conf/2130.
1996-12-09 05:13:19 +00:00
Steven Wallace 9ce8b2a2f6 Perform special sigset() check.
Make sure signal is not blocked.  If it is, return SIG_HOLD instead
of handler and unblock the signal.
1996-12-08 02:24:10 +00:00
Søren Schmidt 2092b5ac38 Fix the broken support for monochrome VGA's.
It was MY fault after all, damn..
1996-12-07 22:33:05 +00:00
KATO Takenori 4e8f1851bf Obtained from: NetBSD/pc98 based on NetBSD 1.2
Add a missing file of bs driver.  It's a 2.2 candidate.
1996-12-07 12:31:05 +00:00
John Dyson 807cf4006d Make LKM's build again. I have added the allegedly broken
ACTUALLY_LKM_NOT_KERNEL until the real fix comes through.  Whatever
flag that is used to indicate building LKMs will have be be substituted
in the future.  This allows proper selection of the usage of the
efficient, single instruction in the kernel, but alas, doesn't allow
for use in userland or LKMs :-(.  Them's the breaks!!!
1996-12-07 05:08:37 +00:00
John Dyson 66f61b8256 Change endian.h so that when a kernel is compiled without I386_CPU, and
with one of the following (I486_CPU,I586_CPU,I686_CPU) so it can take
advantage of the very quick bswap insn.  This keeps LKMs from being
built to take advantage of the insn, but also makes sure that the LKMs
can be run on all CPUs.  (The LKMs don't pick up the CPU options :-( ).
1996-12-07 03:46:20 +00:00
Bruce Evans 2c5136653b Fixed handling of modem status changes. Only the most common case of
connect/hangup in !CLOCAL mode was handled correctly.  mgetty and ppp
didn't work because they turn on CLOCAL and poll for carrier (or RI?).
1996-12-05 12:43:30 +00:00
John Dyson 3596818baa Clean-up of the new buffer kva allocation code. Also, there was an
error in the !BOUNCE_BUFFERS case.
1996-12-05 04:28:52 +00:00
Nate Williams 5881846048 Better fix for the previous overflow problem using the code from
ogetrlimit().

Suggested by:	bde
1996-12-05 03:14:14 +00:00
Nate Williams abcdd6ed84 'ulimit' can overflow the int return value, so avoid the overflow by
subtracting one if ulimit returns -1.

Submitted by:	Miguel Angel Sagreras <msagre@cactus.fi.uba.ar>
1996-12-05 01:45:08 +00:00
Satoshi Asami 778128e3f9 Replace sbic driver (WD33C93 SCSI card driver) with new bs driver.
Submitted by: The FreeBSD(98) Development Team
Obtained from: NetBSD/pc98 based on NetBSD 1.2
1996-12-04 04:32:52 +00:00
Satoshi Asami f48465862b Synchronize with the RELENG_2_2 branch.
Definite 2.2 candidate.

Submitted by: The FreeBSD(98) Development Team
1996-12-04 04:21:30 +00:00
Justin T. Gibbs 2ca3e32777 Clear the busfree interrupt when one occurs, after a SELTO, or a bus reset. 1996-12-03 17:06:00 +00:00
Poul-Henning Kamp 673f8923d0 PR kern/2141:
function ed_attach_NE2000_pci() in if_ed.c passes
        an uninitialized block of memory (got with malloc())
        to ed_attach. This prevents a proper initialization
        of the device descriptor and in my case causes a panic
        during the probe, while printing out device info.

Reviewed by:	phk
Submitted by:	Luigi Rizzo <luigi@iet.unipi.it>
1996-12-03 16:08:00 +00:00
Nate Williams c80383505d Update the bootblocks to use the new definitions that changed in the
recent psm/syscons/kbdio code update.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1996-12-03 03:32:15 +00:00
Bill Fenner 66ff6a3c1b Add IP_OPTIONS and the multicast-related setsockopts to the
list of IP setsockopts the Linux emulator recognizes.

Explicitly disallow IP_HDRINCL since Linux's handling of
raw output is different than BSD's.

Closes PR#kern/2111.

Submitted by:	y-nakaga@ccs.mt.nec.co.jp (Yoshihisa NAKAGAWA)
1996-12-03 02:52:29 +00:00
Søren Schmidt 1f9d9075e4 Alot of fixes from kazu:
1. All the suggestions earlier made by Bruce: renaming some symbols,
stricter error checking, removing redundant code, etc.

2. The `psm' driver preserves the default counter resolution and
report rate, whatever they are after reset. (Based on reports and
suggestion from Nate and Rob Bolin).

3. The `psm' driver now does not check the so-called sync. bit in the
first byte of the data packet by default, so that the tapping feature
of ALPUS GlidePoint works (based on reports from Louis Mamakos). I
tested the code with ALPUS Desktop GlidePoint (M/N GP101) and found
no problem; tapping worked. It appears ALPUS produces several models
of GlidePoint. I hope the other models are OK too.

The check code can still be activated by defining the PSM_CHECKSYNC
option in the config file. (The bit checking slightly reduces, if not
completely eliminates, weird mouse behavior cased by unsynchronized
mouse data packets. It also helps us to detect if the mouse interrupt
can ever be lost. But, well, if there are devices which cannot be
supported this way...)

4. The `psm' driver does not include the protocol emulation code by
default. The code can still be compiled in if the PSM_EMULATION option
is specified in the config file. Louis Mamakos suggests the emulation
code is putting too much in the kernel, and `moused' works well.
I will think about this later and decide if the entire emulation
code should be removed.

5. And, of course, the fix in `scprobe()' from Bruce to cure the
UserConfig problem. My code in `kbdio.c' is slightly different from
his patch, but has the same effect. There still is a possibility that
`scprobe()' gets confused, if, for whatever reasons, the user holds
down a key for very long time during the boot process. But we cannot
cope with everything, can we?

Submitted by:	Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
1996-12-01 19:05:50 +00:00
Bruce Evans 4eb73cdaff Removed all references to b_cylinder (aka b_cylin). It was evil and
hasn't been used for a year or two since disksort() started sorting
on b_pblkno.
1996-12-01 16:34:41 +00:00
John Dyson 621d520e2f Fix a problem with the new buffer_map management code. Additionally,
decrease the size of buffer_map to approx 2/3 of what it used to be
(buffer_map can be smaller now.)  The original commit of these changes
increased the size of buffer_map to the point where the system would
not boot on large systems -- now large systems with large caches will
have even less problems than before.
1996-12-01 15:46:40 +00:00
Bruce Evans c252c2507e Fixed input of BREAKs when IGNPAR is set and IGNBRK is not set. BREAKs
are always together with Framing Errors and they were incorrectly
treated as FE's and discarded.

Reorganized the BREAK/FE/PE tests.

Found by:	NIST-PCTS
1996-11-30 15:52:56 +00:00
Bruce Evans eea9b0845f Reset h/w fifos (if any) in siostop(). Now ttyflush() works fairly well
with sio devices (not perfectly, since there is no way to flush the tx
holding register on 8250-16450's.  I'm not sure if resetting the fifos
flushes the tx shift register).

Reminded by:	NIST-PCTS
1996-11-30 15:29:31 +00:00
Bruce Evans 4670f800ec Fixed sloppy clearing of TS_BUSY. Don't clear it until the transmitter
is completely empty.  There is no interrupt for output completion, so
poll for it every 10 ms after output is nearly complete.  Now ttywait()
works right.

Reminded by:	NIST-PCTS
1996-11-30 15:19:19 +00:00
Bruce Evans 38e81cedcf Throw away input if CREAD is not set. POSIX requires no characters to be
received in this case even if the hardware doesn't have a CREAD bit.

Found by:	NIST-PCTS
1996-11-30 15:03:05 +00:00
Bruce Evans 9924e17950 Cleaned up CONSPEED changes. `comdefaultrate' gives the default
speed for the "com" console, not for general purpose "com" ports,
so there was no need to split it into comdefaultrate and condefaultrate.
1996-11-30 14:51:04 +00:00
Bruce Evans 4cea724a81 Reenabled i586-optimized copyin/out.
Should be in 2.2.  Don't put it there for a while.
1996-11-30 14:08:44 +00:00
John Dyson 6f235fb2f9 Relax the constraints on the bswap opcode (it works on non-byte
registers.)  Also clean up some namespace pollution, and remove
gcc-1 support (nothing really works with it anymore anyway.)
Submitted by:	Bruce Evans <bde@freebsd.org> and me.
1996-11-29 16:22:22 +00:00
Bruce Evans 9dde46b7a0 Fixed EFAULT handling in i586_copyin() and i586_copyout(). Use a
consistent stack frame in fastmove() so that only one new fault handler
is necessary.

Should be in 2.2.  Harmless until the i586 versions are reenabled.
1996-11-29 14:32:30 +00:00
Bruce Evans c827accd9a Don't print bootinfo.bi_n_bios_used in cpu_startup() since it is always
zero because no drivers have had a chance to change it.
1996-11-29 13:19:26 +00:00
Bruce Evans 388ddab632 Don't clobber the SIGCONT bit in the signal mask in sigreturn(). Use
the `sigcantmask' macro to get the correct set of unmaskable signals.

Found by: NIST-PCTS.
1996-11-29 13:12:14 +00:00
Jordan K. Hubbard 94172f9618 Correct name in probe type. Closes PR# 2122 (with a change, since the PR
did not actually use the correct name either :-).
Submitted-By: Toyonori Fujiura <toyo@exiv.pearnet.org>
1996-11-29 12:26:30 +00:00
John Dyson 64a6e05c28 Clarified the comment about removing other CPU defs. Specifically,
I added the suggestion to remove the I386_CPU def if possible.
1996-11-29 07:08:48 +00:00
John Dyson f8b4081443 Support the appropriate use of bswap instruction on non-I386 builds.
Per Wayne Scott of Intel, the old sequence took 20cycles!!! on a P6.
Another nice side-benefit is that the kernel is about 3K smaller!!!
Submitted by:	Wayne Scott <wscott@ichips.intel.com>
1996-11-29 07:04:03 +00:00
Poul-Henning Kamp b61e2e6afe I broke psm.c and none of the 5 reviewers noticed :-) 1996-11-28 17:18:56 +00:00
Poul-Henning Kamp ff301e1b9b Add a timeout here, just like in if_ed.c
Reviewed by:	phk
Submitted by:	Luigi Rizzo <luidi@labinfo.iet.unipi.it>
1996-11-28 09:54:38 +00:00
Poul-Henning Kamp be2806f309 Make intro command a NO-OP if no VISUAL_USERCONFIG 1996-11-27 22:53:10 +00:00
Poul-Henning Kamp 9009c7d68d Waste less space. 1996-11-27 22:52:25 +00:00
Andrey A. Chernov f0b48537e8 Remove warning at AHC_SCBPAGING_ENABLE, not needed now 1996-11-27 22:52:09 +00:00
Poul-Henning Kamp 07c48e4bb0 Make a kernel with DDB but without sio possible again. This is only
a stopgap measure, a more complete solution is on somebodys whiteboard
(and we all know that THAT means :-).

Reviewed by:	pst
1996-11-25 18:39:25 +00:00
Peter Wemm 31461d3a75 Back out my previous change here. aic7xxx_asm is only a stdio program
that runs in the host's build environment, not the kernel's environment.
1996-11-24 08:15:11 +00:00
Peter Wemm 34429f3d2d Fix my previous (untested) commit. The probe routine now appears to work
again.

Something needs to be done about this in 2.2, since the code there doesn't
even compile anymore since the syscons/kbdio/psm merge into 2.2.
1996-11-24 08:06:01 +00:00
Peter Wemm f2a58aec0a Make this compile again after the syscons/psm/kbdio changes that removed
the keyboard IO port definitions from <machine/console.h>.

Note: I do not have a machine available to test this yet,  I sent this
for review to several people who have not replied.

This is also totally busted in 2.2, which has half of the syscons/psm/kbdio
changes in it.  This really desperately needs to be tested and fixed
in 2.2 as well.
1996-11-23 07:38:25 +00:00
Justin T. Gibbs ccddabb0c7 Add code to the SCSIINT handler for unexpected busfrees and handling immediate
SCBs in response to a busfree.

When re-queueing an SCB that returned with QUEUE FULL status, reset its timeout.

Ensure that aborted SCBs have an error code set in there xs before it gets
passed back up with scsi_done.

Fix a few KNF nits.
1996-11-22 08:28:45 +00:00
Peter Wemm 2fa4e5a7fc Set a more explicit #include path for building aix7xxx_asm, otherwise it
uses /usr/include/sys/*, which may point to a different build tree.  I'm
not sure that this is necessary, but there was a question mark over what
/usr/include/sys points to when building the "user mode" binaries in the
kernel code, especially when building the smp tree.

I suspect that the "right" line here is to use ${INCLUDES}, but that
causes warnings about unused static inline functions in stdio.h and ctype.h
1996-11-22 04:27:43 +00:00
Justin T. Gibbs 3d9a12be07 Update comment and disable SCB paging for Rev E cards since paging, at least
in its current form, will not work with these cards.
1996-11-21 06:19:13 +00:00
Nate Williams 3d989d58d8 Fix UserConfig w/syscons.
The 'getchar' function in syscons (sccngetc) is used by UserConfig to
get keyboard input from the user.  When it was modified to use the
shared keyboard port routines it used the port passed in during the
probe routine.  Since the probe routine was not yet called, the port was
set to 0, which is obviously not going to work.

Pre-initialize sc_port to IO_KBD which is really a kludge, but it's how
the previous driver did it's job.

Found by:	remote GDB
1996-11-19 17:08:10 +00:00
John Dyson 9970cd3721 Improve the caching of small files like directories, while not
substantially increasing buffer space.  Specifically, we double
the number of buffers, but allocate only half the amount of memory
per buffer.  Note that VDIR files aren't cached unless instantiated
in a buffer.  This will significantly improve caching.
1996-11-17 02:11:01 +00:00
Jordan K. Hubbard a6c8c374a8 Commit AWE32 changes I forgot in my first round. Whoops! 1996-11-16 02:24:23 +00:00
Justin T. Gibbs 74bb76f011 Be even more careful in how we manipulate the QOUTQCNT variable. Now we
do reset it from the QOUTCNT register inside a pause/unpause.  This now happens
once per command complete interrupt in the paging case (one interrupt can be
for multiple completed commands).  I may introduce a counter and do a lazy
update in the future, similar to what is done with the QINCNT.

Enhance the QUEUE FULL condition handling so that the number of openings will
be reduced.  This has become more important now that the driver is faster.
This code really belongs in the gerneric SCSI layer, as will be the case once
3.0 gets the code from the 'SCSI' branch.

Add some #if 0'd out trace code I've been using to help debug sequencer
problems.

Fix the SCB paging problem that I was seeing.  This was only on my 7850
controller and stems from the fact that its QINFIFO can only handle 3bit
SCB identifiers.  This means that you can only have 8 transactions open at
a time with the current paging scheme to these controllers.  The code added
to enforce this is generic in that it tests for the number of relevent bits
that the QINFIFO can store and adjusts the max accordingly.  It may be possible
to come up with a scheme that allows for more than 8 commands at a time, but
I don't know that it is worth the effort simply to fix a low end card.  The
aic7880 still can do 255.

This problem may be related to what Andrey was seeing since I don't have n
aic7770 rev E chip here to test on, but as soon as someone probes one of these
cards with this new code, the dmesg output will tell the whole story.
1996-11-16 01:19:14 +00:00
Justin T. Gibbs 11b5ea7239 Since there have been so many reports of the Memory Mapped I/O to the
aic7xxx cards failing on certain motherboards, reverse the logic used to
control this feature.  AHC_FORCE_PIO is replaced with AHC_ALLOW_MEMIO.
GENERIC no longer needs to specify the AHC_FORCE_PIO option since this is
the default.
1996-11-16 01:09:20 +00:00
Bruce Evans f020427513 Disabled i586-optimized copyin and copyout. They usually panic if the
user supplies a bad address, because they push a lot of stuff that the
fault handler doesn't know about onto the stack.  This has been broken
for more than half a year despite being tested for almost half a year
in -current.
1996-11-15 20:27:14 +00:00
Jordan K. Hubbard 431995f177 This is the new AWE32 driver, with support for the AWE32's fancy MIDI
synthesizer.  The utilities for this will appear as port submissions soon
afterwards, according to the submitter.

Submitted-By: Randall Hopper <rhh@ct.picker.com>
Written-By: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
1996-11-15 18:36:25 +00:00
Jordan K. Hubbard 9be435aa17 Break my own rule again - I didn't think this stuff was going to come back
with the copyright stuff fixed so soon (this should be merged into 2.2 when
you have a chance, Poul).

This is the new AWE32 driver, with support for the AWE32's fancy MIDI
synthesizer.  The utilities for this will appear as port submissions soon
afterwards, according to the submitter.

Submitted-By: Randall Hopper <rhh@ct.picker.com>
Written-By: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
1996-11-15 18:35:35 +00:00
Nate Williams 5fa39f9bde Disable mouse acceleration by default to be the same as the previous
driver.
1996-11-15 17:30:29 +00:00
Garrett Wollman d4e29514fc Patches from driver author in PR#2010.
Submitter requests that this patch be merged into 2.2.

Submitted by:	seki@sysrap.cs.fujitsu.co.jp
1996-11-15 16:15:56 +00:00
Garrett Wollman f283fbcac1 Fix RFC 1650 stats... should have read the doco more carefully.
Fixes PR#2011

Submitted by:  seki@sysrap.cs.fujitsu.co.jp
1996-11-15 16:07:03 +00:00
Jordan K. Hubbard e1d2ff9f44 Change this back to movl for -current since it seems to work there.
Bruce says that movl is broken in -stable, which would certainly explain
why this didn't work there.
1996-11-15 09:00:56 +00:00
Søren Schmidt 73e0f79f04 Only poll the keyboard if the data left in the buffer is from the
kbd, not if its from the psm device.
1996-11-15 08:45:24 +00:00
Jordan K. Hubbard 3dc9f2bb59 Rename sb.h to sb_defs.h and pas.h to pas_defs.h so there's no
possibility of conflict with the versions in the compile dir.
1996-11-15 08:30:39 +00:00
Nate Williams 7e4de6f7c6 KNF'ify. 1996-11-15 06:22:48 +00:00
Nate Williams cf3328ad27 KNF'ify and fix boo-boo I made in last commit. 1996-11-15 06:17:36 +00:00
Nate Williams 9b8322ec09 Removed 2.1-compatability code and made the debugging less verbose by
default.
1996-11-15 05:41:34 +00:00
Nate Williams 8fcd7d6f5b New PS/2 mouse drive which uses the new 'shared' keyboard/psm read
routines.  An older version of this was tested successfully on all of my
systems with PS/2 mice.  This was brought in without testing because it
is necessary due to the previously committed syscons changes.

Submitted by:	Kazutaka Yokota <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1996-11-15 05:30:52 +00:00
Søren Schmidt 6a90d9750d Finally a start at sharing the kdb controller routines between
syscons and psm, curtesy Kazutaka Yokota with minor changes by
me. This contains an update of the psm driver as well.
This also fixes the breakage that I introduced to the psm driver by
making syscons poll for keyboard events in the atempt to fix the
hanging keyboard problem.

It works perfectly for me, and I'd like to hear from all that
have had keyboard/ps/2 mouse problems if this is the cure...

Submitted by:	 Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
1996-11-14 22:19:17 +00:00
Jordan K. Hubbard 6de3a3bb17 movl instruction should have been lea (this is why userconfig didn't
work in 2.1).

Spotted-by-the-keen-eyes-of: Don Lewis <Don.Lewis@tsc.tdk.com>
1996-11-14 15:55:21 +00:00
Jordan K. Hubbard d5ca121e12 TRUE/FALSE are used even outside of VISUAL_USERCONFIG - move them accordingly.
Submitted-By: Don Lewis <Don.Lewis@tsc.tdk.com>
1996-11-14 13:57:23 +00:00
Satoshi Asami 7c219eac8f Some more updates.
wdreg.h: Delete wd_ctlr macro.  PC98 version of wd.c treats it as a
variable.

GENERIC98: Delete ep0 entry. Current ep driver write I/O port 0x100.
This clobbers ICW of i8259, because upper 8bits of address line is not
masked on mother board.

if_fe.c: Merge from revision 1.18 of sys/i386/isa/if_fe.c.

pc98.c: Globalize dmapageport, because SCSI driver use this
variable.

wd82371.c: Yet another merge.

These are 2.2 candidates.

Submitted by:	The FreeBSD(98) Development Team
1996-11-14 08:46:21 +00:00
Andrey A. Chernov 7dbff5bf98 Change WARNING line about SCB paging to:
# WARNING: with AHC_TAGENABLE set can be dangerous on Adaptec 2842
1996-11-13 22:50:32 +00:00
Bruce Evans 750059bbc5 Don't fiddle with RTS if RTS flow control is off. This gives applications
almost complete control over RTS (control of its initial value is still
missing).

This fixes PR 1644 for sio.

The author of PR 1644 wants it in 2.1.6 and 2.2.  This may be safe since
the complications are only in rarely used cases that I hope I've covered.
1996-11-13 18:31:57 +00:00
Satoshi Asami 3c6350967c Another round of resync and some added sound support.
sys/pc98/i386/machdep.c: sync with i386/i386/machdep.c
sys/pc98/conf/options.pc98: sync with i386/conf/options.i386

sys/i386/isa/sound: DMA auto initialize mode support for PC98.
contributed by: Akio Morita <amorita@bird.scphys.kyoto-u.ac.jp>

Definite 2.2 material, I believe.

Submitted by:	The FreeBSD (98) Development Team
1996-11-13 02:00:17 +00:00
Bruce Evans b430a4f0ed Fixed buffer overflow for large values in editval(). The buffers were
one too small for (hex) 12345678 and 4 too small for -1234567890.  Large
values can be created by config and userconfig although not (previously)
by visual userconfig.

Fixed a sign extension bug for backspacing on "negative" hex values in
editval().

Increased field width and range for `flags' so that all possible values
can be displayed and edited.
1996-11-12 20:00:24 +00:00
Bruce Evans a8c33fd1e8 Removed another #include of opt_temporary.h.
YA2.2C.
1996-11-12 14:54:16 +00:00
Bruce Evans 3c10da63aa Removed #include of "opt_temporary.h". All the temporary options went
away, so this header is no longer generated.

This change should be in 2.2.  The old version shouldn;t have been in
2.2 (blush).
1996-11-12 13:36:52 +00:00
Bruce Evans 679f1a2242 Fixed spelling error in previous commit. This did not compile. 1996-11-12 09:51:16 +00:00
Andrey A. Chernov 8ba1fe211b Near AHC_SCBPAGING_ENABLE add following comment
# WARNING: can effectively kill your disks with some controllers
(I am the victim of -current kernel, inodes wiped completely)
1996-11-12 06:43:24 +00:00
Søren Schmidt 65e925d16f 1. Avoid a race in scclose(). tty.c has kludges so that the race is
actually harmless.

2. Fixed code to match comment in scintr().

3. Don't allow even root to take control of the machine when securelevel > 0.
   I've secured the accesses to PSL_IOPL in all drivers and asked pst to
   review it, but he seems to be busy.  Write access to /dev/kmem and
   other critival devices currently leaks across raisings of securelevel
   via open fd's, so there may as well be a similar leak for PSL_IOPL.

4. (Most important.)  Don't corrupt memory beyond the screen buffers if
   the cursor happens to be off the 80x25 screen when syscons starts.

5. Fix console cursor update (not perfect yet).
Submitted by:   bruce
~
1996-11-11 22:21:03 +00:00
Nate Williams a7320980f6 Removed (now unused) XT_KEYBOARD option. 1996-11-11 22:04:31 +00:00
Nate Williams 6620cf7868 Removed 'XT_KEYBOARD' option from syscons. Document new-style way of
getting the same behavior using the flags, which can be done inside of
UserConfig.  (Also document other syscons flags which were previously
undocumented).

Requested by:	bde
1996-11-11 22:01:56 +00:00
Bruce Evans 1fe048505d Replaced I586_OPTIMIZED_BCOPY and I586_OPTIMIZED_BZERO with boot-time
negative-logic flags (flags 0x01 and 0x02 for npx0, defaulting to unset = on).
This changes the default from off to on.  The options have been in current
for several months with no problems reported.

Added a boot-time negative-logic flag for the old I5886_FAST_BCOPY option
which went away too soon (flag 0x04 for npx0, defaulting to unset = on).

Added a boot-time way to set the memory size (iosiz in config, iosize in
userconfig for npx0).

LINT:
Removed old options.  Documented npx0's flags and iosiz.

options.i386:
Removed old options.

identcpu.c:
Don't set the function pointers here.  Setting them has to be delayed
until after userconfig has had a chance to disable them and until after
a good npx0 has been detected.

machdep.c:
Use npx0's iosize instead of MAXMEM if it is nonzero.

support.s:
Added vectors and glue code for copyin() and copyout().
Fixed ifdefs for i586_bzero().
Added ifdefs for i586_bcopy().

npx.c:
Set the function pointers here.
Clear hw_float when an npx exists but is too broken to use.
Restored style from a year or three ago in npxattach().
1996-11-11 20:39:03 +00:00
Bruce Evans f806e8f0f1 Fixed pessimized (short) i/o port type.
The change in if_epreg.h affects if_epreg.o and 3c5x9.o.

These changes are probably harmless, but I can't test them.
1996-11-11 17:11:08 +00:00
Bruce Evans 435b9481cd Fixed pessimized (short) i/o port types. 1996-11-11 16:32:43 +00:00
Bruce Evans af01acf80b Fixed pessimized (short) i/o port type. 1996-11-11 15:57:40 +00:00
Bruce Evans 11874b34bf Fixed pessimized (short) i/o port type.
Obtained from:	SCSI branch
1996-11-11 15:29:15 +00:00
Bruce Evans 6a32566a7d Preserve %esi and %edi for get_diskinfo(). See the logs for similar fixes
in bios.S.  I only fixed the case that is known to be broken here.

Should be in 2.2.
1996-11-11 14:27:12 +00:00
Bruce Evans 2e2d9bc760 Preserve %esi and %edi for all BIOS calls. This is probably only necessary
for get_diskinfo(), whose BIOS call sets %es:%edi in some cases, although
most documentation says that it doesn't change %edi in the cases that
happened to matter (for hard disks).

This shall be in 2.1.6 and 2.2.

Submitted by:	Tor.Egge@idt.ntnu.no
		(except I kept the unnecessary preservation of %edx and %ecx)
1996-11-11 14:03:33 +00:00
Mike Smith 4f731c9f37 Update the database of known devices (people, please consider this when you
are adding new drivers...) to match, as best I can tell, majors.i386.

Improve behaviour when attempting to save changes for devices that should
 not be changeable.  Now correclty avoids non-device items, PCI devices and
 devices with no isa_device structure.

Submitted by:	(observations from) joerg, bde
1996-11-11 09:09:37 +00:00
Justin T. Gibbs 30136d82b2 Clean up the memory mapped/Programmed I/O stuff so that the driver completely
uses one or the other.  This required some changes to the ahc_reset()
function, and how early the probes had to allocate their softc.

Turn the AHC_IN/OUT* macros into inline functions and lowercase their names
to indicate this change.  Geting AHC_OUTSB to work as a macro doing
conditional memory mapped I/O would have been too gross.

Stop setting STPWEN in the main driver and let the PCI front end do it
instead.  It knows better.

Add the clearing of the QOUTQCNT variable during command complete processing
in the SCB paging case.

Go back to doing unconditional retries for the QUEUE FULL status condition.
This is really a kludge, but the code to handle it properly is on the SCSI
branch and will not make it into 2.2.
1996-11-11 05:24:46 +00:00