Commit Graph

3466 Commits

Author SHA1 Message Date
Jordan K. Hubbard
d50a30076c Multiple changes stacked as one commit since they all depend on one another.
First, change sysinstall and the Makefile rules to not build the kernel
nlist directly into sysinstall now.  Instead, spit it out as an ascii
file in /stand and parse it from sysinstall later.  This solves the chicken-n-
egg problem of building sysinstall into the fsimage before BOOTMFS is built
and can have its symbols extracted.  Now we generate the symbol file in
release.8.

Second, add Poul-Henning's USERCONFIG_BOOT changes.  These have two
effects:

	1. Userconfig is always entered, rather than only after a -c
	   (don't scream yet, it's not as bad as it sounds).

	2. Userconfig reads a message string which can optionally be
	   written just past the boot blocks.  This string "preloads"
	   the userconfig input buffer and is parsed as user input.
	   If the first command is not "USERCONFIG", userconfig will
	   treat this as an implied "quit" (which is why you don't need
	   to scream - you never even know you went through userconfig
	   and back out again if you don't specifically ask for it),
	   otherwise it will read and execute the following commands
	   until a "quit" is seen or the end is reached, in which case
	   the normal userconfig command prompt will then be presented.

  How to create your own startup sequences, using any boot.flp image
from the next snap forward (not yet, but soon):

	% dd of=/dev/rfd0 seek=1 bs=512 count=1 conv=sync <<WAKKA_WAKKA_DOO
USERCONFIG
irq ed0 10
iomem ed0 0xcc000
disable ed1
quit
WAKKA_WAKKA_DOO


Third, add an intro screen to UserConfig so that users aren't just thrown
into this strange screen if userconfig is auto-launched.  The default
boot.flp startup sequence is now, in fact, this:

	USERCONFIG
	intro
	visual

(Since visual never returns, we don't need a following "quit").

Submitted-By: phk & jkh
1996-10-05 10:44:07 +00:00
David Greenman
d41fe60984 Oops, missed a chunk in that last commit. 1996-10-04 14:17:32 +00:00
David Greenman
1c41fd74b9 Implemented a more sophisticated mechanism for finding the chip iobase
so that 32Y boards will work.
Fixed bogus indenting and added a pair of parens.
1996-10-04 10:33:13 +00:00
Jordan K. Hubbard
890c2894d8 Make return or newline synonymous with down-arrow in the value editor.
It's a lot easier to whap through multiple changes if you can use the return
key.
1996-10-03 07:51:40 +00:00
Jordan K. Hubbard
a1406d7cf0 Fix stupid typo. 1996-10-03 01:22:22 +00:00
Jordan K. Hubbard
e669728232 Add fxp and vx to list of known device types. 1996-10-03 01:01:01 +00:00
Jordan K. Hubbard
0c8c5f852a scresume erroneously used before declared. Move the function
rather than add another APM ifdef just for the forward decl.
[Boy, sure a lot of warnings in here!]
1996-10-03 00:42:27 +00:00
Søren Schmidt
4a8aeffeb2 Fixed the userconfig problem (and one with ddb as well).
The rudimentary support for a splash page is there, and works, it
just needs a splash page...
1996-10-02 22:00:38 +00:00
Jordan K. Hubbard
1ffb1e5eb6 New support for displaying PCI devices without making you insane.
Submitted-by: msmith [bless his heart]
1996-10-02 08:09:09 +00:00
Paul Traina
14b7c0f2f9 add SC_SPLASH_SCREEN to opt_syscons.h (sigh) 1996-10-02 03:48:09 +00:00
Søren Schmidt
d58801b2ee Fixed the "missing updates" reported by ache.
Moved a little closer to having a splash page capability.
1996-10-01 23:24:09 +00:00
Jordan K. Hubbard
10dce6c9f3 #ifdef another instance of toggle_splash_screen() which Soren missed. 1996-10-01 07:38:14 +00:00
Paul Traina
6e702c9964 Document the Adaptec driver options for tagged command queueing and SCB
paging (with a warning not to use SCB paging) and create an opt_aic7xxx.h
file for these options.
1996-10-01 03:01:06 +00:00
Søren Schmidt
ebe3b2aabd Dont make splash screen the default :) 1996-09-30 23:10:35 +00:00
Søren Schmidt
a221620c79 Fix a couble of nasties regarding mouse pointer and different
resolutions.
Allow middle mouse button to be used for pasting.
Also added the beginnings of support for a splash page.
1996-09-30 23:00:58 +00:00
Bruce Evans
92d0aa20dc Work around UMC8669F and Startech UART bugs by not writing to the
divisor latch registers if the registers wouldn't change.

Use the default console cfcr setting while setting the divisor
latch registers for console i/o.  Input may be messed up by
transiently changing the cfcr.

Use a usual cfcr setting while setting the divisor latch registers
in the probe.  This shouldn't matter, but this is not the place to
test the UART's handling of 5 bit words.

Removed a stale devfs comment.
1996-09-30 12:22:27 +00:00
Bruce Evans
edbfbd9280 Whaddya know, visual userconfig sort of supports pci, but the support
was always disabled because "pci.h" wasn't included.  Now the configured
pci devices are listed and you can edit bogus flags for them.

Fixed bitrot in the disabled code.  A used #include was removed and const
poisoning wasn't fixed.

Removed unused #include.
1996-09-30 11:25:19 +00:00
Bruce Evans
ece15d78ea Added "memory" to clobber list in invlpg(). It needs it if invltlb()
needs it.

Fixed style in invlpg().

Sorted recently renamed functions.

Added prototypes in the non-gcc section for recently added/renamed
functions.
1996-09-29 18:35:07 +00:00
John Dyson
27e9b35e07 Essentially rename pmap_update to be invltlb. It is a very machine
dependent operation, and not really a correct name.  invltlb and invlpg
are more descriptive, and in the case of invlpg, a real opcode.

Additionally, fix the tlb management code for 386 machines.
1996-09-28 22:37:57 +00:00
Bruce Evans
f53687f7b5 Restored my change in rev.1.119 which was clobbered by the previous commit. 1996-09-28 15:28:40 +00:00
John Dyson
9299d3c4bb Move pmap_update_1pg to cpufunc.h. Additionally,
use the invlpg opcode instead of the nasty looking .byte directives.
There are some other minor micro-level code improvements to pmap.c
1996-09-28 04:22:46 +00:00
Bruce Evans
e2e0d560a2 Added -I- to ${INCLUDES}. This makes 4.4Lite's (mis?)use of "foo.h"
for headers in the compile directory work unsurprisingly.  Without
-I-, the search for "foo.h" begins in the directory of the file
that includes it, and the compile directory is only searched because
`-I.' is in ${INCLUDES}.

Removed -I$S/sys from ${INCLUDES}.  It was once necessary to find
things like "param.h" in $S/sys.  Now <sys/param.h> is found in $S.
1996-09-27 16:34:16 +00:00
Peter Wemm
ed82824ef8 Some warning cleanups. There were some needless casts that also caused
gcc -Wcast-qual to scream.  There's still quite a few left, but since I'm
cleaning out my tree, I'll commit these now.
1996-09-27 13:50:59 +00:00
Peter Wemm
32d8f04c11 part 2 of the bsdi compat tweak attempt. I believe that BSDI use both
lcall 7,0 (ie: ldt slot 0) and lcall 0x87,0 (ldt slot 16, it's shifted
three bits to the left).  I was fiddling with this so long ago, I don't
recall the specifics.
1996-09-27 13:38:02 +00:00
Peter Wemm
90af01bef3 Apparently, BSDI have a new system call gate. I was experimenting
with this quite a while ago when somebody reported a BSD/OS 2.1 binary
that wouldn't run.  I'm pretty sure they tried it and I'm pretty sure
they mentioned to me that the patch worked.
1996-09-27 13:33:49 +00:00
Peter Wemm
ad3bbe7a2d Drat, missed this prototype for random_select(). 1996-09-27 13:29:41 +00:00
Peter Wemm
983febf3dc I've been meaning to commit this for months. Implement select()
for /dev/random and /dev/urandom.  Both are always writable, urandom is
always readable, and /dev/random is readable when >= 8 bits are in the
pool.
1996-09-27 13:25:13 +00:00
Paul Traina
b3f3fea5fd Fix a couple of bugs causing false positives 1996-09-26 20:52:13 +00:00
Bruce Evans
388dfa7112 Fixed a few hundred warnings (2400 in LINT) for signed vs unsigned
comparisons in the inb() and outb() macros.  I decided that int args
are OK here.  Any type that can hold a u_int16_t without overflow
is correct, and 32-bit types are optimal.

Introduced a few tens of warnings (100 in LINT) for use of pessimized
(short) types for the port arg.  Only a few drivers are affected by
this.  u_short pessimizations aren't detected.

Added `__extension__' before the statement-expression in inb() so
that it can be compiled without warnings by gcc -pedantic.
1996-09-24 17:47:59 +00:00
Bruce Evans
0c8ea4d48c Eliminated includes of the "temporary" backwards compatibility header
<sys/dir.h> in applications.  Maintained existing (inadequate) ifdefs
for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any
new ones.
1996-09-24 08:08:11 +00:00
Bruce Evans
ebedb5ad97 Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>:
- don't include <sys/ioctl.h> in any header.  Include <sys/ioccom.h>
  instead.  This was already done in 4.4Lite for the most important
  ioctl headers.  Header spam currently increases kernel build
  times by 10-20%.  There are more than 30000 #includes (not counting
  duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
  almost self-sufficient (some ioctl headers still need structs from
  elsewhere).
- uniformized idempotency ifdefs.  Copied the style in the 4.4Lite
  ioctl headers.
1996-09-21 14:59:43 +00:00
Bruce Evans
83f52dabab Include <sys/filio.h> explicitly - don't depend on <machine/soundcard.h>
bogusly defining non-soundcard ioctls.
1996-09-21 14:53:28 +00:00
Bruce Evans
253c0899b2 Don't include <sys/conf.h> for the kernel in disk-related headers.
It is needed for implementation details but very little of it is
needed for the interface.  Include it in the few places that didn't
already include it.

Include <sys/ioccom.h> in <sys/disklabel.h> (as already in
<sys/diskslice.h>) so that all the disk-related headers are almost
self-sufficient.
1996-09-20 17:39:44 +00:00
Bruce Evans
ec55e44ec8 Changed an arg name in the pseudo-prototype for bzero() to match
the prototype.

Put the jump table for i486_bzero() in the data section.  This
speeds up i486_bzero() a little on Pentiums without significantly
affecting its speed on 486's.

Don't waste time falling through 14 nop's to return from do1 in
i486_bzero().

Use fastmove() for counts >= 1024 (was > 1024).  Cosmetic.

Fixed profiling of fastmove().

Restored meaningful labels from the pre-1.1 version in fastmove().
Local labels are evil.

Fixed (high resolution non-) profiling of __bb_init_func().
1996-09-20 16:52:09 +00:00
Poul-Henning Kamp
a6e173ca49 Various de-bogotifications of userconfig. 1996-09-19 08:32:37 +00:00
Poul-Henning Kamp
e8993539b8 Add APM_IDLE_CPU option, that is off by default.
I maintain that it saves more power to simply "hlt" the CPU than to
spend tons of time trying to tell the APM bios to do the same.
In particular if you do it 100 times a second...
1996-09-19 08:28:16 +00:00
Poul-Henning Kamp
1e882d2791 Fix something that has annoyed me since day one of userconfig: when the
<More> prompt receives a 'q', just abandon the list, the user wants out.
1996-09-15 19:35:23 +00:00
Bruce Evans
831031ce00 Attached simple external ddb commands show rtc', show pgrpdump'
and `show cbstat'.  The pgrpdump code was previously controlled by
`#ifdef DEBUG'.
1996-09-14 10:53:48 +00:00
Bruce Evans
2e82980a4c Moved instantiation of `poff' to sys.c. It is no longer used in disk.c.
Saved a few bytes by copying `dosdev' and/or `name' to local variables.
This optimization (for dosdev) was done in one place before but this
was lost in the devread() cleanup.   This optimization (for dosdev)
can almost be done by bogusly declaring dosdev as const, but gcc still
often space-pessimizes code like the following:

	extern const int dosdev; ... foo(dosdev); bar(dosdev);

gcc often doesn't bother to copy dosdev to a temporary local because
the local would have to be preserved in memory across the call to
foo().  OTOH, for

	extern int dosdev; ... auto int dosdev_copy = dosdev; ...
		foo(dosdev_copy); bar(dosdev_copy);

the copy must be made because foo() might alter dosdev.
1996-09-14 07:41:00 +00:00
Bruce Evans
310abe0579 Removed declarations of recently deleted variables and cleaned up
#includes.
1996-09-14 07:38:14 +00:00
Bruce Evans
d154cceba7 Potentially saved a whole 4 bytes and reduced bogusness by eliminating
the pointer to the string "/kernel".  This pointer was once only
statically to once save space, but it has had to be dynamically
initialized for some time, so the static initialization just wastes
space.  The string gets moved to the text section, so the actual
savings may be negative due to padding.
1996-09-14 07:12:02 +00:00
Bruce Evans
4fab2f9bc7 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

pcvt_drv.c:
Partially fixed pccncheckc().  It returned a boolean value instead of
the character that it fetches from the input fifo (if any).  I think
it still discards characters after the first for multi-char input.
1996-09-14 04:30:32 +00:00
Bruce Evans
daed6ffd24 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

syscons.c:
Added missing spl locking in sccncheckc().  Return the same value as
sccngetc() would.  It is wrong for sccngetc() to return non-ASCII, but
stripping the non-ASCII bits doesn't help.
1996-09-14 04:27:46 +00:00
Bruce Evans
40b55a34ae Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:25:32 +00:00
Bruce Evans
8b3fb3e16d Removed another devconf leftover. A fat devconf support function was
still being used just to support printing of the device name in the
probe.  Restored the method used in rev.1.6 and changed it to print
the same strings as the previous revision.

Reviewed by:	Paul Richards
1996-09-14 01:26:16 +00:00
Bruce Evans
c254b6e8db Made debugging code (pmap_pvdump()) compile again so that I can test LINT.
I don't know if it actually works.
1996-09-13 07:10:00 +00:00
Bruce Evans
fddbd6ddb8 Removed another devconf leftover.
Fixed a new #include style bug.
Removed an unused #include.
1996-09-13 06:48:21 +00:00
Bruce Evans
5a175c1c5d Don't compile a 256-byte unused table in the pca driver.
The other 256-byte table in ulaw.h still gets duplicated if both
pca and snd are configured.
1996-09-13 06:29:30 +00:00
Bruce Evans
cefdbb0448 Added undocumented option SPX_HACK. 1996-09-13 05:54:39 +00:00
Satoshi Asami
0e408c25a1 Another round of merge/update.
(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic
(2) Move PC98 specific code out of cpufunc.h (to pc98.h)
(3) Let the boot subtrees look more alike

Submitted by:	The FreeBSD(98) Development Team
		<freebsd98-hackers@jp.freebsd.org>
1996-09-12 11:12:18 +00:00
John Dyson
dba940b46e Primarily a fix so that pages are properly tracked for being
modified.  Pages that are removed by the pageout daemon were
the worst affected.  Additionally, numerous minor cleanups,
including better handling of busy page table pages.  This
commit fixes the worst of the pmap problems recently introduced.
1996-09-12 04:54:55 +00:00
Poul-Henning Kamp
96fc6efbe3 Make userconfig two (default: on) options:
USERCONFIG to enable
	VISUAL_USERCONFIG to get the gui stuff too.
Requested by: pst
1996-09-11 19:53:45 +00:00
Poul-Henning Kamp
078e82404e The intended usage is:
cat /usr/mdec/rawboot /sys/compile/FOO/kernel | fdwrite

That should explain it all  :-)
1996-09-11 19:25:12 +00:00
Poul-Henning Kamp
b679d552d3 Add #ifdef for RAWBOOT.
remove some #if 0 stuff.
1996-09-11 19:23:11 +00:00
Poul-Henning Kamp
8b5d3828b2 Add "rawboot", sort the subdirs. 1996-09-11 19:22:21 +00:00
Nate Williams
aa5167c963 Fixed so that the card will go into promiscuous mode for BPF.
Submitted by:	Bill Kish <kish@osf.org>
1996-09-11 16:11:21 +00:00
John Dyson
690db31d04 A minor fix to the new pmap code. This might not fix the global problems
with the last major pmap commits.
1996-09-11 03:46:41 +00:00
Bruce Evans
b568ea4e01 Removed more devconf leftovers. 1996-09-10 23:31:13 +00:00
Bruce Evans
dad0de774e Removed bogus LARGMEM code and option. The code paniced when
biosextmem > 65536, but biosextmem is a 16-bit quantity so it is
guaranteed to be < 65536.  Related cruft for biosbasemem was
mostly cleaned up in rev.1.26.
1996-09-10 23:07:04 +00:00
Bruce Evans
683cbdf4af Fixed spelling of new SC_KBD_PROBE_WORKS option in options.i386.
It worked because it is spelled correctly in LINT.

Added old obscure syscons options MAXCONS, SLOW_VGA and XT_KEYBOARD.
This file should be sorted both alphabetically and on the module
name by using a consistent prefix for each module, but there is no
consistency in the old options.  E.g., MAXCONS is spelled PCVT_NSCREENS
for pcvt.
1996-09-10 21:38:47 +00:00
Poul-Henning Kamp
980b7c9573 Rather than adding more gunk here, clean some of it up:
devread() had a bogus interface, cleaned up.
	Bread() did an unneeded bcopy(), don't.
Saves 80 bytes and some time.
1996-09-10 21:18:40 +00:00
Peter Wemm
9545a0eaa4 Hack workaround XFree86 switching failure when used with /dev/sysmouse
and xdm, possibly in general.

What was happening was that the server was doing a tcsetattr(.. TCSADRAIN)
on the mouse fd after a write.  Since /dev/sysmouse had a null t_oproc,
the drain failed with EIO.  Somehow this spammed XFree86 (!@&^#%*& binary
release!!), and the driver was left in a bogus state (ie: switch_in_progress
permanently TRUE).

The simplest way out was to implement a dummy scmousestart() routine to
accept any characters from the tty system and toss them into the void.

It would probably be more correct to intercept scwrite()'s to the mouse
device, but that's executed for every single write to the screen.
Supplying a start routine to eat the characters is only executed for the
mouse port during startup/shutdown, so it should be faster.
1996-09-10 19:14:49 +00:00
Bruce Evans
80f495ec7e Backed out last change. It depends on the future change of adding
-I- to CFLAGS.  <sb.h> must currently be used to give the version
of sb.h in the current directory, while "sb.h" in the buggy version
gave the (wrong) version in the source directory.  Searching in the
source directory first is normal, but is the reverse of the order
suggested by the 4.4Lite2 #include style.  -I- will remove the
ambiguities.
1996-09-10 19:09:12 +00:00
Bruce Evans
f313170d3c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
Søren Schmidt
b1538b1658 The poor nsccons variable was gone agian this time hidden by
an ifdef , wonder who broke it this time :)

Submitted by:	 ache
1996-09-09 19:02:26 +00:00
Søren Schmidt
47382cd1e0 Make syscons replicate a mousesystems mouse on minor 128..
This enables other consumers of the mouse, to get it info via
moused/syscons.
In order to use it run moused (from sysconfig), and then tell
your Xserver that it should use /dev/sysmouse (mknod sysmouse c 12 128)
and it a mousesystems mouse. Everybody will be happy then :)
Remember that moused still needs to know what kind of mouse you
have..

Comments welcome, as is test results...
1996-09-08 21:31:56 +00:00
John Dyson
5070c7f8c5 Addition of page coloring support. Various levels of coloring are afforded.
The default level works with minimal overhead, but one can also enable
full, efficient use of a 512K cache.  (Parameters can be generated
to support arbitrary cache sizes also.)
1996-09-08 20:44:49 +00:00
John Dyson
b8e251a56d Improve the scalability of certain pmap operations. 1996-09-08 16:57:53 +00:00
Poul-Henning Kamp
40f3771f7f Various cleanups for remanents of devconf. 1996-09-08 10:44:18 +00:00
Søren Schmidt
fa630ea6eb Fixed another little both in the devconf removal. 1996-09-08 10:28:23 +00:00
Jordan K. Hubbard
885e672626 Finish what phk started here in removing devconf. The ATAPI_STATIC case
was still broken, as was the normal case since atapi_attach() was called
internally.
1996-09-08 01:31:27 +00:00
Bruce Evans
a7265255cc Fixed another easy case of const poisoning in the kernel. Cosmetic.
(A pointer to a const was misused to avoid loading loading the same
value twice, but gcc does exactly the same optimization automatically.
It can see that the value hasn't changed.)
1996-09-07 21:47:53 +00:00
Bruce Evans
24c074ad8d Remove boot2 when the size test fails so that rebuilding without fixing
the problem doesn't bogusly succeed.

Print size failures to stderr instead of stdout and don't print bells
and whistles.
1996-09-07 21:16:44 +00:00
Bruce Evans
6074a34497 Saved 48 bytes (46 before padding) using assorted nano-optimizations:
- avoiding strcmp("?" saved 12 bytes.  gcc inlined the strcmp()
  but this takes as much or more code as a function call.  The
  inlining was bogus because the strcmp() in the bootstrap isn't
  standard.

- using a char instead of an int for the boolean `last_only' saved 8
  bytes.  Booleans should usually be represented as chars on the i386.

- simplifying the return tests saved 9 bytes.

- using putc instead of printf to print a newline saved 3 bytes of code
  and 2 bytes of const data.

- avoiding `else's by always doing the else clause and fixing it up
  saved 4+8 bytes.
1996-09-07 21:06:43 +00:00
Bruce Evans
ae6e81ef56 Saved 48 bytes (56 before padding) by moving a variable declaration.
gcc always generates large code for accesses to globals.  For locals
it only generates large code if there are more than 128 bytes of
locals.  It sorts scalar locals after array locals to pessimize for
space in the usual case when there are more (static) references to
scalars than to arrays.

Saved another 16 bytes (13 before padding) by adding a `continue'.

Fall-through tests normally save space, but here one of them made
gcc do space-unoptimal register allocation (it allocates ch in %bl
because preserving this register across function calls is "free",
but comparisions with %bl take one byte fewer than comparsions with
%bl).
1996-09-07 20:18:04 +00:00
Nate Williams
8d250e2915 Disable 'suspend' as it tends to lockup computers with the current APM
driver.
1996-09-07 17:52:56 +00:00
Nate Williams
7d674f8643 Unused file. 1996-09-07 17:51:54 +00:00
Nate Williams
db81a742b3 APM_DSVALUE_BUS is no longer with the addition of the correct fix to
machdep.c.  We no longer walk on the data segment the BIOS sets up.
1996-09-07 17:41:22 +00:00
Satoshi Asami
c9da8434ea Yet another merge. Remove support.s by deleting memcopy. Remove
autoconf.c by merging icu.h.  Fix a couple of typos.

Submitted by:	The FreeBSD(98) Development Team.
1996-09-07 02:14:47 +00:00
Paul Traina
53809eab9c Add option SC_KBD_PROBE_WORKS to syscons driver.
If you define this, it means your keyboard is actually probable using the
brain-dammaged probe routine in syscons, and if the keyboard is NOT found,
then you don't want syscons to activate itself further.

This makes life sane for those of us who use serial consoles most of the
time and want "the right thing" to happen when we plug a keyboard in.
1996-09-06 23:35:54 +00:00
Paul Traina
61238661b6 Add ATAPI_STATIC, ATAPI, and SC_KBD_PROBE_WORKS options. 1996-09-06 23:33:45 +00:00
Paul Traina
c52fcce8a5 Bannish ATAPI and ATAPI_STATIC #defines to opt_atapi.h. 1996-09-06 23:32:55 +00:00
Poul-Henning Kamp
9d616cb5db Remove these three devconf files entirely. 1996-09-06 23:11:42 +00:00
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Julian Elischer
7fae9bcd24 Back out the previous changes
I just couldn't get the code to be as small as it should have gotten..

atill a LITTLE bigger than before as I need to allow the
default string to have options as well
1996-09-05 21:12:06 +00:00
Søren Schmidt
c771590aa7 Fixed a panic when switching to 40x25 mode, and cursor was beyond the
new buffer.
1996-09-04 22:24:19 +00:00
Julian Elischer
bf709d2564 3 changes:
1/ Makefile:  the maximum size for boot2 is 7.5K not 7K,
so don't complain until it reaches THAT size..
newfs leaves 8K and boot 1 is 512k. leaving 7.5K becasue the disklabel
is considered to part of the boot2 file.

[512  boot1][512 disklabel][     7K boot2 code        ]
[boot1 file][               boot2 file                ]

2/ Boot2.S: move the soring of the default name read from block 2 to AFTER
clearing the BSS.

3/ boot.c:
Move the parsing of the command line into the
place it's called for clarity.. alsoi comment it a bit and clean it
up a bit.. for some reason this seems ot have made it a little
larger, but I can't work out why.. maybe bruce might have ideas?
compensated for by shrinkage elsewhere..

the practical result of this is htat the default string can now contain args
e.g. if you change the default string to have -gd
then the machine will boot to the dgb debugger stub by default..
this is mostly useful with the nextboot utility..
as it now allows you to remotely force a machine to reboot into
the debugger.
1996-09-04 18:28:36 +00:00
Satoshi Asami
30cb1d45ae More merge.
(1) Remove mk30line (moved to /usr/sbin, but not in our source tree yet)

(2) Delete unneeded (well, harmful now :) code to prohibit #including
    of isa_device.h from PC98 sources.

(3) Remove files now equal to their ISA/PC-AT counterparts.

Submitted by:	The FreeBSD(98) Development Team
1996-09-04 09:52:31 +00:00
Bruce Evans
6bce784d06 Changed type of ni_dirp in struct namei' from caddr_t to const char *'
so that the compiler can see that it is OK to use const strings in
NDINIT().  Some emulators want to use paths of the form "/compat/foo".
Removed the casts that hid the non-problem.  Didn't fix the missing
consts in syscalls.master that hid the non-problem.
1996-09-03 23:17:15 +00:00
Bruce Evans
f58609f0c6 Fixed some more easy cases of const poisoning in the kernel. Cosmetic. 1996-09-03 22:19:16 +00:00
Nate Williams
a390940e3f Cleaned up version of my 'extended BIOS' patch. This one is commented
better and much simpler to understand, and works just as well (better)
as a bonus.

Submitted by:	bde
1996-09-03 18:50:36 +00:00
Satoshi Asami
1225e2435d Second phase of merge, get rid of more machine-independent-dependencies.
Get rid of pc98/pc98/pc98_device.h.

Submitted by:	The FreeBSD(98) Development Team
1996-09-03 10:24:29 +00:00
Søren Schmidt
3b1a310b4b Fixed a couple of bugs in the mousepointer code.
Changed update strategy slightly.
Make set_mode & copy_font externally visible.
1996-09-01 18:16:06 +00:00
David Greenman
eaed89032e Change an splclock that needs to be an splhigh into an splhigh.
Reviewed by:	bde
1996-09-01 10:10:12 +00:00
Nate Williams
e3bc07db0d If the basemem value supplied by the bootblocks, differs from the value
returned by the RTC, use the bootblock supplied value.  Also, map the
'stolen by BIOS' memory in the same manner as the ISA-hole memory, since
it is really an extenstion of the BIOS.  This is necessary for 32-bit
BIOS functions such as APM support on laptops, and the loss of memory
for non-necessary functions seems to be at most 4k.

Reviewed by:	phk
Obtained from:  email conversation with jtk@atria.com
1996-09-01 02:16:07 +00:00
Bruce Evans
09a8dfa260 Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
Jordan K. Hubbard
43d1f899b2 77 cyy Cyclades Ye/PCI serial card 1996-08-31 07:04:04 +00:00
Paul Traina
e1889269a7 Improvements from Bruce Evans 1996-08-30 17:03:46 +00:00
Bruce Evans
1f403fcfbf Cleaned up interrupt masking by declaring the state variable in a
machine-dependent macro and passing it to all machine-dependent
macros.

Eliminated the state variable for the GUPROF case.
1996-08-28 20:15:32 +00:00
Andrey A. Chernov
89e01b4e03 Add g to flags help 1996-08-28 18:39:24 +00:00
Andrey A. Chernov
a6f2461bdf Add g option to usage line 1996-08-28 18:33:15 +00:00
Bruce Evans
3a4c46bd22 Fixed restoral of nsscons variable. The tty for /dev/console was lost.
A warning was introduced.
1996-08-28 18:20:22 +00:00
Bruce Evans
7ba5dc0f7e Use "" instead of <> for a header in the current directory. 1996-08-28 18:00:25 +00:00
Bruce Evans
5eba77c97c Use (full) <> paths instead of ambiguous "" paths for headers not in
the current directory.
1996-08-28 17:54:17 +00:00
Paul Traina
d42c2de85c Clean up formatting and fix an & -> && bug pointed out by bde 1996-08-28 17:49:33 +00:00
Paul Traina
f8f0b4798e Support for GDB remote debug protocol.
Sponsored by: Juniper Networks, Inc. <pst@jnx.com>
1996-08-27 19:45:58 +00:00
Wolfram Schneider
8830dd31e3 Add hints to the file ./LINT and the handbook. 1996-08-27 16:25:53 +00:00
Peter Wemm
3bd9f6db7a Unconditionally null-terminate string read into spkr driver.
Submitted by: Ikuo Nakagawa <ikuo@isl.intec.co.jp>, PR#1488, but using
	Bruce Evans <bde@zeta.org.au>'s fix.
1996-08-24 03:24:39 +00:00
John Dyson
4acf48dabc Another attempt at making multi-sector mode work. 1996-08-23 02:52:44 +00:00
Andrey A. Chernov
d17e5f0b6f Add /usr/sbin to sysctl because /usr/sbin not in standard path 1996-08-21 16:31:34 +00:00
Julian Elischer
269fb9d764 Collect all the functioons concerned with rebooting into one place
also add the at_shutdown callout list, and change the one user of
the present (broken) method (the vn driver) to use the new scheme.
1996-08-19 20:07:07 +00:00
Peter Wemm
64599735d8 s/ETHER_MIN_LAN/ETHER_MIN_LEN/ 1996-08-19 13:51:30 +00:00
Julian Elischer
516d61eba9 oops somehow this dissppeared along the way..
now I've started working on this again, I discovered it..
1996-08-19 02:42:40 +00:00
Joerg Wunsch
8a4f8ad912 Fix a couple of typos that sneaked in with Poul's ETHER_* mega-commit.
Reviewed by:	phk
1996-08-18 07:58:13 +00:00
Peter Wemm
cb70011ceb restore nsccons variable from rev 1.115 that was deleted in rev 1.136
during phk's staticize/cleanup commits.  pstat needs it, the MAXCONS
option is not visible anywhere else, and pstat uses it to find the bounds
of the sccons[MAXCONS] array, which varies.
1996-08-16 10:16:32 +00:00
Satoshi Asami
56086e0d72 Add comment about fxp device (Intel EE Pro/100B). 1996-08-15 10:41:34 +00:00
Joerg Wunsch
3f0aecd3b5 Fix two minor oddities introduced by my yesterday's patches:
. preserve a multi-char sequence in a small static buffer inside
  pccngetc(), so it won't be clobbered later (used to happen when
  breaking into DDB user Ctrl-Alt-ESC), and

. simplify the ``keystroke is present'' determination in sgetc(), thus
  making pccncheck() actually working without waiting for a keystroke.
1996-08-12 21:31:07 +00:00
Garrett Wollman
9f0a4b33d9 Back out mistaken local change that sneaked in on the last commit. 1996-08-12 20:03:16 +00:00
Garrett Wollman
0b5b0f16a9 Don't declare the user_ldt functions unless USER_LDT is defined.
Eliminates an obnoxious warning.
1996-08-12 19:57:10 +00:00
Peter Wemm
08424dfaa3 Extend the poll code so that it can periodically scan the host cards
for work regardless of whether there was an interrupt.  This needs more
work, it should be able to run better when there are more than 3 host
cards present, ie: all cards in polling-only mode with no IRQ.  (The
host cards have a choice of 3 irq's, 11, 12, or 15, or just polling)
1996-08-12 17:12:07 +00:00
Bill Paul
89e85b2828 Apply my small patch to make detection of ATAPI CD-ROMs happen a
little more reliably. So far I've received a couple of positive
responses and no objections to these changes.

There are two one-line changes:

- In wdprobe(), when testing the error status of drives, don't
  unconditionally decide that there is no controller present if we
  read back a value of 0x81 (drive 0 okay, drive 1 failed) twice
  in a row. This may be caused by having an ATAPI CD-ROM jumpered
  as a master on the controller with no slave.

- In wdgetctlr(), when checking for a status of WDCS_READY, check the
  value twice. The first time may be bogus. This stops a phantom wd2
  device from being detected when an ATAPI CD-ROM is attached to the
  secondary controller alone as a slave. (This can cause installation to
  fail when sysinstall attempts to open the phantom device and wedges the
  system as a result. This has bitten me a couple of times on some
  Gateway 2000 machines.)
1996-08-12 00:53:02 +00:00
David Greenman
11282a57ce Add support for i686 machine check trap. 1996-08-11 17:41:25 +00:00
David Greenman
150022d8fc Defined T_MCHK exception for i686; renumbered T_RESERVED to 29. 1996-08-11 17:29:39 +00:00
Joerg Wunsch
fae988778b Fix many long-standing bugs and problems with pcvt, namely:
. make pccncheck() work even when interrupts are disabled, so the
  ``Press a key on the console...'' procedure will work,
. make kernel colors #ifndef, so they can be overridden from the
  config file,
. use shutdown_nice() instead of cpu_reset() if Ctrl-Alt-Del is
  enabled,
. allow pccngetc() to return more than a single character, so the
  arrow keys will work (and thus visual UserConfig!),
. fix a warning.

This closes all know PRs related to pcvt, in particular #845, #1236,
and #1265.  PR #991 is a duplicate for 845, and PR #1283 has already
been fixed earlier in rev 1.11 of pcvt_conf.h.

Submitted by:	Ulf Kieber (kieber@sax.de), for the kernel color fix
1996-08-10 22:14:36 +00:00
Joerg Wunsch
b458c95f75 Teach UserConfig about ANSI (DEC?) ``application mode'' arrow key
sequences (ESC O A, as opposed to ESC [ A).
1996-08-10 22:06:09 +00:00
Peter Wemm
7c34c352e3 Add recognition for the AMD 5x86 CPU models.
Submitted by: A JOSEPH KOSHY <koshy@india.hp.com>
1996-08-10 08:04:24 +00:00
Peter Wemm
b05a2d987d Trivial cosmetic tweak to make the i[56]86 CPU MHz reprting round to the
nearest .01 Mhz rather than simply truncating it downwards.

This hack makes this 89.999928 Mhz clock correctly round to the closer
90.00-MHz rather than 89.99-MHz:
  > i586 clock: 89999928 Hz, i8254 clock: 1193152 Hz
  > CPU: Pentium (90.00-MHz 586-class CPU)
1996-08-10 06:35:35 +00:00
David Greenman
aea6ddfd4f This diff adds support for the HP PC Lan+ cards (model numbers: 27247B
and 27252A) in FreeBSD's `ed' driver.

Submitted by:	A JOSEPH KOSHY <koshy@india.hp.com>
1996-08-07 11:18:23 +00:00
Poul-Henning Kamp
26a8b0bf7e Megacommit to straigthen out ETHER_ mess.
I'm pretty convinced after looking at this that the majority of our
drivers are confused about the in/exclusion of ETHER_CRC_LEN :-(
1996-08-06 21:14:36 +00:00
Nate Williams
d0dc9fdb98 Fix memory leak bug in the path parsing code which never released it's
buffer in certain error conditions.  Sync up the code to that in NetBSD
where applicable.

Reviewed by:	Gary Jennejohn <garyj@munich.netsurf.de>
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
Obtained from:	NetBSD sources
1996-08-05 20:52:30 +00:00
Poul-Henning Kamp
218e61c915 Remove a spurious message. 1996-08-04 20:04:57 +00:00
Poul-Henning Kamp
c2069b2c84 Reduce reset timeout. "only" 16 seconds (!) for a 512K board. 1996-08-04 20:04:11 +00:00
Poul-Henning Kamp
78a5a8f486 Update driver.
Obtained from: NetBSD
1996-08-04 10:58:17 +00:00
Poul-Henning Kamp
ab2460e4a6 Replace about 60 lines of code with a call to ether_ioctl().
This can be done for most of our ethernet drivers.
1996-08-04 10:57:29 +00:00
Peter Wemm
78ee1461b7 make si.c compile in kernels without COMPAT_43. 1996-08-03 00:21:44 +00:00
Bruce Evans
70e53371c4 Eliminated i586_ctr_rate. Use i586_ctr_freq instead. 1996-08-02 21:16:27 +00:00
Bruce Evans
d9927d1118 Eliminated i586_ctr_rate. Use i586_ctr_freq instead.
Changed i586_ctr_bias from long long to u_int.  Only the low 32 bits
are used now that microtime uses a multiplication to do the scaling.
Previously the high 32 bits had to match those of rdtsc() to prevent
overflow traps and invalid timeval adjustments.
1996-08-02 21:16:13 +00:00
Bruce Evans
41ae0562ed Reduced division by i586_ctr_rate to multiplication by i586_ctr_multiplier. 1996-08-02 20:17:50 +00:00
Nate Williams
992eae3421 When I hit [Ctrl]+8, appeared 9 instead of 8. It may not be critical but
surprised me. ;-)

Submitted by:	tacha@tera.fukui-med.ac.jp <Tatoku Ogaito>
Obtained from:	NetBSD/GNATS
1996-08-01 22:38:30 +00:00
Garrett Wollman
13f588f83e Add an fls() inline function which does the opposite operation to
ffs().  (That is to say, it searches in the opposite direction.)
1996-08-01 20:29:28 +00:00
Bruce Evans
85acc6887d Eliminated pcb_inl. It was always 0 because context switches don't occur
in interrupt handlers.
1996-07-31 12:36:11 +00:00
David Greenman
b1508c72f4 Converted timer/run queues to 4.4BSD queue style. Removed old and unused
sleep(). Implemented wakeup_one() which may be used in the future to combat
the "thundering herd" problem for some special cases.

Reviewed by:	dyson
1996-07-31 09:26:54 +00:00
Bruce Evans
3817d2ffa1 Fixed longstanding bug of not checking dumpdev' or setting dumplo'
early enough when the dump device is specified in the config file.

Removed stale comment about configuration root and swap devices.

Don't bother clearing dumplo when dumpdev is set to NODEV.  Everything
is controlled by dumpdev.

Fixed the kern.dumpdev sysctl.  Writes were handle bogusly.
1996-07-30 20:30:49 +00:00
Bruce Evans
98a51b2b94 Synced with sio.c: added support for TIOCDCDTIMESTAMP and simplified
timestamp code.
1996-07-30 19:50:37 +00:00
Bruce Evans
33ded19fc2 Fixed the machdep.i8254_freq and machdep.i586_freq sysctls. Writes were
handled bogusly.

Centralized the setting of all the frequency variables.  Set these
variables atomically.  Some new ones aren't used yet.
1996-07-30 19:26:55 +00:00
Andrey A. Chernov
58db4b5a8f Fix GIO_ATTR ioctl return to match SYSV 1996-07-30 15:20:08 +00:00
John Dyson
67bf686897 Backed out the recent changes/enhancements to the VM code. The
problem with the 'shell scripts' was found, but there was a 'strange'
problem found with a 486 laptop that we could not find.  This commit
backs the code back to 25-jul, and will be re-entered after the snapshot
in smaller (more easily tested) chunks.
1996-07-30 03:08:57 +00:00
John Dyson
78d4346178 Fix a problem with a DEBUG section of code. 1996-07-29 14:22:46 +00:00
John Dyson
b7fb357273 Fix an error in statement order in pmap_remove_pages, remove the pmap
pte hint (for now), and general code cleanup.
1996-07-29 03:08:51 +00:00
John Dyson
da54aa7fc4 Fix a problem that pmap update was not being done for kernel_pmap. Also
remove some (currently) gratuitious tests for PG_V...  This bug could
have caused various anomolous (temporary) behavior.
1996-07-28 20:31:27 +00:00
John Dyson
adef72483b Move a couple of the initialization commands to the right place. Multi
sector mode was not getting re-initialized when needed.
1996-07-27 19:01:10 +00:00
Atsushi Murai
826702b23d Under the heavy load for transmiting condition, it will be write error
and then never accept for sending packet from upper layer anymore
(i.e. ping -f )
Reviewed by:	David Greenman <dg@root.com>
Submitted by:	amurai@spec.co.jp
1996-07-27 12:40:31 +00:00
John Dyson
4f4d35edf0 This commit is meant to solve a couple of VM system problems or
performance issues.

	1) The pmap module has had too many inlines, and so the
	   object file is simply bigger than it needs to be.
	   Some common code is also merged into subroutines.
	2) Removal of some *evil* PHYS_TO_VM_PAGE macro calls.
	   Unfortunately, a few have needed to be added also.
	   The removal caused the need for more vm_page_lookups.
	   I added lookup hints to minimize the need for the
	   page table lookup operations.
	3) Removal of some bogus performance improvements, that
	   mostly made the code more complex (tracking individual
	   page table page updates unnecessarily).  Those improvements
	   actually hurt 386 processors perf (not that people who
	   worry about perf use 386 processors anymore :-)).
	4) Changed pv queue manipulations/structures to be TAILQ's.
	5) The pv queue code has had some performance problems since
	   day one.  Some significant scalability issues are resolved
	   by threading the pv entries from the pmap AND the physical
	   address instead of just the physical address.  This makes
	   certain pmap operations run much faster.  This does
	   not affect most micro-benchmarks, but should help loaded system
	   performance *significantly*.  DG helped and came up with most
	   of the solution for this one.
	6) Most if not all pmap bit operations follow the pattern:
		pmap_test_bit();
		pmap_clear_bit();
	   That made for twice the necessary pv list traversal.   The
	   pmap interface now supports only pmap_tc_bit type operations:
	   pmap_[test/clear]_modified, pmap_[test/clear]_referenced.
	   Additionally, the modified routine now takes a vm_page_t arg
	   instead of a phys address.  This eliminates a PHYS_TO_VM_PAGE
	   operation.
	7) Several rewrites of routines that contain redundant code to
	   use common routines, so that there is a greater likelihood of
	   keeping the cache footprint smaller.
1996-07-27 03:24:10 +00:00
Peter Wemm
66b8e416e6 ttysleep() can return EWOULDBLOCK, not ETIMEDOUT as the comment in tty.c
suggests.

Pointed out by: bde
1996-07-26 16:55:37 +00:00
Peter Wemm
446fe15067 Apply a bandaid to a problem elsewhere in the driver, when the process is
blocked in a write() while waiting for the output to drain, sleep only
for tp->t_timeout, not forever.  This only seems to happen when there is
either a modem lockup holding the hardware flow control down, or due to
some problem in the driver with processes attempting to write after the
modem has hung up (eg: elm, tf).
1996-07-26 13:47:38 +00:00
Poul-Henning Kamp
fe1624a4ff Revert my bdevsw change for wcd.c, Bruce pointed out that
this driver has bogus open/close entries.
1996-07-24 13:35:34 +00:00
Poul-Henning Kamp
cba8a5ddd3 Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.
Saves about 280 butes of source per driver, 56 bytes in object size
and another 56 bytes moves from data to bss.

No functional change intended nor expected.

GENERIC should be about one k smaller now :-)
1996-07-23 21:52:43 +00:00
Satoshi Asami
92b4f2e0df Update to current state of PC98 world.
Submitted by:	The FreeBSD(98) development team
1996-07-23 07:46:59 +00:00
Poul-Henning Kamp
7c60604ada Add yet another kludge to this driver. Man page update to follow. 1996-07-21 09:28:50 +00:00
Joerg Wunsch
3135240845 Post-commit review by Bruce. Mostly stylistic changes.
Submitted by:	bde
1996-07-21 08:20:51 +00:00
Joerg Wunsch
5eb14f7e7c Replace the annoying calls to Debugger() by panic()'s in the
#ifdef DIAGNOSTIC case, and a warning only otherwise.

People who want them to break into the debugger can always set the
breakpoint explicitly.  The existing behaviour was a misfeature from
the beginning, in the (wrong) assumption that the SCSI controller must
always be of essential importance to the entire system.
1996-07-20 22:02:44 +00:00
Joerg Wunsch
f4de22acc7 Correct the timer2 acquiration and release, it must happen at splclock.
Also slightly reformatted so that it meets at least partially style(9),
and makes navigating through the functions easier.
1996-07-20 18:48:54 +00:00
Joerg Wunsch
99211adf2c Major cleanup of the timerX_{acquire,release} stuff. In particular,
make it more intelligible, improve the partially bogus locking, and
allow for a ``quick re-acquiration'' from a pending release of timer 0
that happened ``recently'', so it was not processed yet by clkintr().
This latter modification now finally allows to play XBoing over
pcaudio without losing sounds or getting complaints. ;-)  (XBoing
opens/writes/closes the sound device all over the day.)

Correct locking for sysbeep().

Extensively (:-) reviewed by:	bde
1996-07-20 18:47:23 +00:00
Stefan Eßer
76af5a923c Last night (local time :) I accidently checked in an intermediate version
of this patch, which had not actually been reviewed by Joerg or Paul!
(I'll better stop committing files after midnight ...)

I'm now commiting the latest code, which has been reported to work.

Minor correction to the previous commit message for this file:
The first PCI Lance in a system will get a name of lnc1, the second
will be known as lnc2 and so on. An arbitrary number of cards is
supported in a system ...
1996-07-19 17:18:20 +00:00
Atsushi Murai
0ed091876d Add interrupt register set up with original register value
before attaching. Without this fix, 3c579(EISA) never make
any H/W inturrupt.
Reviewed by:	"Justin T. Gibbs" <gibbs@freefall.freebsd.org>, nao@sbl.cl.nec.co.jp and owner-current on mailing list ;-)
Submitted by:	amurai@spec.co.jp, nao@sbl.cl.nec.co.jp
1996-07-19 13:20:05 +00:00
Stefan Eßer
c268c94f6b FINALLY: PCI support for the Lance Ethernet driver.
This code applies to several systems with integrated Ethernet
chip, for example from HP or Compaq. It should also support
PCI Ethernet cards based on the AMD PCI Lance chip.

This code has been reviewed (visually) by Paul Richards and
tested (using an ISA Lance board) by Joerg Wunsch.
Since the parameters to nearly each and every single function
had to be changed (generally from unit number to lnc_soft*),
there is some potential for buglets having crept in ...

BEWARE: If you had lnc0 configured to have the ISA probe find
your PCI Lance, then it should now be found by the PCI probe,
and should be automatically configured as pci1 (!!! note the "1").

Reviewed by:	paul, joerg
1996-07-18 22:03:47 +00:00
Julian Elischer
75d050aeaa some internal modems need LOTS of time to generate an interrupt
on demand.. increase DELAY from 1000 uS to 10000uS
1996-07-17 22:07:23 +00:00
Joerg Wunsch
cb9bf21103 Introduce two /dev/audio compat alias names for flushing and draining
the pcaudio device.  Now, XBoing sounds much better...
1996-07-17 20:18:56 +00:00
Bruce Evans
65d98215ea Fixed adjustment of `time' when timer0 is released. 27465 was 27645 in
a comment and in code that was only used when pcaudio was closed.  The
maximum error was 66 usec.
1996-07-17 11:26:05 +00:00
Nate Williams
20073b6d10 Moved declaration of zbuf outside of #ifdef DEVFS code. 1996-07-15 18:22:07 +00:00
Bruce Evans
6450111c1b Quick fix for previous commit: don't free zbuf on close since it may be
in use in another process that blocked in uiomove().
1996-07-15 05:23:04 +00:00
John Dyson
f381a0c010 Almost gratuitious improvement of the performance of reading
/dev/zero.
1996-07-14 06:05:53 +00:00
David Greenman
4611b39710 Enable transmit complete interrupt...
(author's explaination):

 Bit 15 is the flag to request a transmit complete interrupt.  The
driver was apparently written to minimize interrupts, and if not for a
3-COM design quirk, everything would be just ducky.
 Prior to loading the outbound packet into the FIFO, the driver checks
to see if there's enough space to contain the packet.  If not, the
driver requests a transmit-available interrupt when there is
sufficient room.  Unfortunately, the card is continuing to process the
prior FIFO, and by the time the driver sets the threshold for a
transmit available interrupt, the space is already available.  When
this occurs, the 3COM card ignores the interrupt request, and the
driver is hung waiting for an interrupt that will never occur.
There's probably a more elegant solution, but requesting the transmit
complete interrupt was the easiest to implement.  An alternative fix
might be to check free FIFO space again, after requesting the transmit
available interrupt, but I haven't bothered pursuing this.  Since the
patch, my 3C590 (PCI, same FIFO interface as 3C509) has been rock
solid.

Submitted by:	mevans@candle.com (Mike Evans)
1996-07-13 10:49:53 +00:00
Bruce Evans
cba2a7c614 Staticized a few variables.
Fixed warnings about unused variables.
1996-07-12 07:41:34 +00:00
Bruce Evans
73571d2d9e Removed "optimization" using gcc's builtin memcpy instead of bcopy.
There is little difference now since the amount copied is large,
and bcopy will become much faster on some machines.
1996-07-12 07:18:12 +00:00
Bruce Evans
82ffff7ab3 Renamed upa to p0upa to match p0upt.
Cleaned up some comments.
1996-07-12 06:48:55 +00:00
Bruce Evans
3222e6db68 Export `dumpmag' to utilities but not to the kernel.
Restored a truncated comment.
1996-07-12 06:09:49 +00:00
Bruce Evans
f3460ead96 Fixed cloned comments about npx traps to match context. 1996-07-12 06:03:14 +00:00
Bruce Evans
ec275eb27f Moved the definition of DEBUGMSG() from asm.h to start.S. This macro
is only appropriate to use in the special environment of start.S (real
mode plus some conventions about not saving registers), and asm.h is
supposed to be for generic macros.

Removed some unnecessary parentheses.
1996-07-12 05:42:02 +00:00
Bruce Evans
18f63e25c1 Moved the definition of `bsize' out of a DO_BAD144 ifdef so that this
compiles when DO_BAD144 is not defined.
1996-07-12 05:35:47 +00:00
Bruce Evans
1cc273db90 Moved the definition of dflt_name to the correct file (table.c is only for
explicitly initialized data) and made it conditional on NAMEBLOCK.
1996-07-12 05:25:47 +00:00
Bruce Evans
b830e63502 Fixed some speling, punctuation.. and spac ing errors. 1996-07-12 05:17:37 +00:00
Bruce Evans
0873c1f1c7 Fixed operand order for shld and shrd.
Finished the constant poisoning that was begun in rev.1.14.  Consts
aren't very poisonous (or useful) unless -Wcast-qual is in CFLAGS,
and it isn't in the default CFLAGS.
1996-07-12 04:40:21 +00:00
Bruce Evans
6ab46d52a5 Don't use NULL in non-pointer contexts. 1996-07-12 04:12:25 +00:00
Nate Williams
68753bffb7 Add some comments explaining what APM_DSVALUE_BUG does no that I know
what it does and why it's needed.  Now I have to figure out how to fix
the bug. :)

[ No functional changes ]
1996-07-11 16:35:12 +00:00
Jordan K. Hubbard
0375cce8bc Merge. 1996-07-11 11:18:45 +00:00
Julian Elischer
93e0e11657 Adding changes to ipfw and the kernel to support ip packet diversion..
This stuff should not be too destructive if the IPDIVERT is not compiled in..
 be aware that this changes the size of the ip_fw struct
so ipfw needs to be recompiled to use it.. more changes coming to clean this up.
1996-07-10 19:44:30 +00:00
Nate Williams
6774cdb846 Whee. Fix two bugs which ended up cancelling each other out.
apm_setup.s was storing apm_cs16_base and apm_cs32_base addresses in
each others slots, and apm.c was reversing the result so the bugs
cancelled out, but the code looked wrong.

No functional differences unfortunately.

Submitted by:	dave edmondson <davided@sco.com>
1996-07-10 15:09:48 +00:00
Jordan K. Hubbard
9f5c1d518e Clean out some historical cruft. 1996-07-10 03:35:59 +00:00
Julian Elischer
c9f36013e5 make the NAMEBLOCK changes conditional on that preprocessor variable,
and add more documentation of the option in the Makefile
also CORRECT the variable mentioned in the README.
1996-07-09 02:28:20 +00:00
Garrett Wollman
b184bc75f3 Fix something that's been bugging me for a long time: move the CPU
type identification code out of machdep.c and into a new file of its
own.  Hopefully other grot can be moved out of machdep.c as well
(by other people) into more descriptively-named files.
1996-07-08 19:44:39 +00:00
Joerg Wunsch
960710e6ea Add the ability to specify bootflags. This is similar to boot_i386(8),
except for the root f/s options that don't seem to be useful.
1996-07-06 14:18:56 +00:00
Julian Elischer
9ed24653f7 Obtained from: Whistle Communications
Add code to the boot blocks to allow the user to place default boot strings
on block 1 of the disk (2nd block), should the correct magic numbers be present.

If the correct options are used it will 'delete' the name used from block1,
thereby assuring that if the boot fails it won't be stuck in an infinite loop.

the boot strings are set by the utility "nextboot"
(not yet checked in, but being tested.)
By default these changes should have no effect on existing installations
and if compiled without the NAMEBLOCK option should be essentially identical
to the old ones.
1996-07-05 19:55:05 +00:00
John Hay
d805b866fa This driver supports the SDL Communications RISCom/N2 ISA cards that is
based on the HD64570 chip. Both the 1 and 2 port cards is supported.

Line speeds of up to 2Mbps is possible. At this speed about 95% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the X.21 interface is tested. The others may need
tweaks to the clock selection code.
1996-07-05 18:51:59 +00:00
Bruce Evans
f6b4ae3c82 Added or restored #include of <machine/md_var.h>. Some declarations
moved from <machine/cpufunc.h> to better places.
1996-07-01 20:29:10 +00:00
Bruce Evans
7baccf64d3 Fixed lots of warnings about unportable casts of pointers to volatile
variables: don't depend on the compiler generating atomic code to set
the variables - use inline asm to specify the atomic instruction(s)
explicitly.
1996-07-01 20:16:10 +00:00
Bruce Evans
a111a7f827 Moved declarations of non-cpu things from <machine/cpufunc.h> to better
places.
1996-07-01 18:12:24 +00:00
Bruce Evans
d2700ee639 Use the standard timer (interrupt) frequency while calibrating the clocks.
Testing with the high frequency of 20000 Hz (to find problems) only found
the problem that this frequency is too high for slow i386's.

Disable interrupts while setting the timer frequency.  This was unnecessary
before rev.1.57 and forgotten in rev.1.57.  The critical (i8254) interrupts
are disabled in another way at boot time but not in the sysctl to change
the frequency.
1996-07-01 18:00:47 +00:00
Joerg Wunsch
c683ac7c95 Enable ktrace by default, accompanied by a small reminder about the
implications (4 KB bloat, slight slowdown of syscalls).

Reviewed by:	freebsd-hackers
1996-06-30 09:39:29 +00:00
Peter Wemm
dcca5a532d Fix typo that prevented the initial/lock state devices from working
correctly (accessing the lock device was not possible).
1996-06-30 04:56:05 +00:00
Joerg Wunsch
a9e9062ca1 Bump various timeouts in scprobe(). This finally fixes the broken
keyboard reset one of my earlier commits has been causing.
1996-06-27 21:36:11 +00:00
Gary Palmer
2aba17b378 Correct comment relating to pty's. There can be 256 (probably
higher actually, but that's all our MAKEDEV supports at this time)
1996-06-26 19:42:06 +00:00
Søren Schmidt
da040b2280 Fixed bug in pasting 8bit char (ache).
Added linefeeds in cuts that extend beyond one line.
Prepared for the mousefunctions to be used in nontext modes.
1996-06-26 13:04:53 +00:00
John Dyson
f43467241e When page table pages were removed from process address space, the
resident page stats were not being decremented.  This mode corrects
that problem.
1996-06-26 05:05:52 +00:00
Bruce Evans
c673fe98d7 Added #include of <machine/md_var.h>. This will be needed when
some declarations are moved from <machine/cpufunc.h> to better
places.
1996-06-25 20:31:01 +00:00
Bruce Evans
79df6d8597 trap.c:
Fixed profiling of system times.  It was pre-4.4Lite and didn't support
statclocks.  System times were too small by a factor of 8.

Handle deferred profiling ticks the 4.4Lite way: use addupc_task() instead
of addupc().  Call addupc_task() directly instead of using the ADDUPC()
macro.

Removed vestigial support for PROFTIMER.

switch.s:
Removed addupc().

resourcevar.h:
Removed ADDUPC() and declarations of addupc().

cpu.h:
Updated a comment.  i386's never were tahoe's, and the deferred profiling
tick became (possibly) multiple ticks in 4.4Lite.

Obtained from:	mostly from NetBSD
1996-06-25 20:02:16 +00:00
Bruce Evans
93f4b1bf1b Save John Polstra's initial fix for profiling for reference. The
multiplication in addupc() overflowed for addresses >= 256K, assuming
the usual profil(2) scale parameter of 0x8000.  addupc() will go away
soon.

Submitted by:	John Polstra <jdp@polstra.com>
1996-06-25 19:25:25 +00:00
Søren Schmidt
ad0c0c784f Change the way moused talk to syscons, now its only delivering mouseevents
via an ioctl (MOUSE_ACTION).
Fixed a couple of bugs (destructive cursor, uncut, jitter).
Now applications can use the mouse via the MOUSE_MODE ioctl, its
possible to have a signal sent on mouseevents, makeing an event loop
in the application take over mouseevents.
1996-06-25 08:54:57 +00:00
John Dyson
cb87c9be58 Limit the scan for preloading pte's to the end of an object. 1996-06-25 00:39:21 +00:00
Justin T. Gibbs
356cbcce49 Fix problem with scb flag handing that crept in with the SCB paging support.
This only affected userland initiated device resets (using the reset command
from cdplay for instance).

Convert some spaces to tabs.
1996-06-23 20:02:37 +00:00
Andrey A. Chernov
e72a188ebc Oops, forget the fact that LINT compiles (fixing previos PAS commi) 1996-06-23 19:46:46 +00:00
Andrey A. Chernov
5839779af2 Describe the way how to add OPL for PAS without conflict 1996-06-23 19:41:34 +00:00
Bruce Evans
ea959743cb Moved declarations of static functions to the correct file. This fixes
hundreds of warnings from -Wunused in lkm/syscons/*.
1996-06-23 17:12:05 +00:00
Bruce Evans
6fe10f76c3 Removed unused #include. Linux doesn't support SCO consoles. 1996-06-23 17:08:11 +00:00
Bruce Evans
5c496ee31e Don't (re)define or use ACTUALLY_LKM_NOT_KERNEL - use the existing
definition of QCAM_MODULE for everything involving LKM'ness.

Makefile:
Don't add -I/sys to CFLAGS.  bsd.kmod.mk adds the correct (relative)
path.
1996-06-23 14:41:55 +00:00
Bruce Evans
a675c0c67e Describe MAXMEM better. Enable it by default. (It's a positive option.
Only negative options in LINT should be enabled.)
1996-06-23 13:28:04 +00:00
Peter Wemm
17b944a6a7 When writing the settings for stop bits and output hardware flow control,
things tend to work better if you write the settings to the correct
register.. (*blush*).  This subtle bug has been haunting me for ages, and
will solve a few problems that have been reported to me.

Also, take a shot at fixing the serial BREAK processing, what was there
before never really worked.  (There is a PR on this I think)
1996-06-21 21:35:01 +00:00
Søren Schmidt
ab35f219ac Oops, fix a bug that caused updates to the screen to happen, without
anything actually changed, in this case the mousepointer logic.
1996-06-21 11:31:09 +00:00
Søren Schmidt
de4d1b835e Some news for syscons (long overdue):
Real support for a Textmode mousecursor, works by reprogramming the
charset. Together with this support for cut&paste in text mode.
To use it a userland daemon is needed (moused), which provides
the interface to the various mice protokols.
Bug fixes here and there, all known PR's closed by this update.
1996-06-21 07:19:18 +00:00
David Greenman
1293685583 Properly account for non-page aligned buffers. 1996-06-20 08:07:30 +00:00
David Greenman
ac269d78be Minor KNF formatting change to vmapbuf() and vunmapbuf(). 1996-06-20 01:47:21 +00:00
Nate Williams
a85fadfc45 Macro expressions should be fully parenthesized! Fix the MAXMEM
definition although it would work as it was written.

options        "MAXMEM=(128*1024)"

Suggested by:	bde
1996-06-19 15:37:52 +00:00
John Dyson
0157d6d925 Clean up vmapbuf and vunmapbuf significantly. The previous code was
very rough.
1996-06-19 03:39:24 +00:00
Nate Williams
b279668708 Document MAXMEM option.
[ Closes PR#1334, slightly modified by me ]

Submitted by:	James Raynard <james@jraynard.demon.co.uk>
1996-06-18 23:21:28 +00:00
Julian Elischer
34b5fca760 As we have appletalk protocol support we might as well show
how to get it..
1996-06-18 10:20:16 +00:00
John Dyson
6ead3edd9c Clean-up the new VM map procfs code, and also add support for executable
format file "etype".  It contains a description of the binary type for
a process.
1996-06-18 05:16:00 +00:00
Bruce Evans
9b2b0822b7 Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.h
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn').  isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).
1996-06-18 01:22:40 +00:00
Peter Wemm
e999a90a90 This time, get rid of the struct copies that were really causing gcc to
call memcpy..  It seems that gcc would not inline the implicit call
when copying from a volatile...
1996-06-17 18:52:53 +00:00
Bill Paul
afe0e92aa8 Stomp another compiler warning: sc_devfs_token[] should only be declared
if DEVFS is #defined.
1996-06-17 17:21:35 +00:00
Bruce Evans
f0ea07bffb Reduced nesting of #includes in random.h and adjusted isa/random_machdep.c
to match (pc98/random_machdep.c probably requires a similar change).  This
is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are
kludges to work around incorrect layering.
1996-06-17 16:47:43 +00:00
Bruce Evans
7d64a7fe80 Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Original version by John Hay.

Simplified timestamp code by reading the time exactly when necessary.
This may slow down the interrupt handler with extra calls to microtime(),
but only in bad configurations - the input fifo should normally be
disabled if timestamps on input are being used, since otherwise the
timestamp won't be precisely associated with any particular input event.
The interrupt handler remains slowed down by one test and branch for
each input (and now DCD change) event - avoiding this is not practical
yet.

The simplifications also fixed:
- timestamps for input sometimes being clobbered by output and modem
  status interrupts.
- valid timestamps not being available unless the port is configured with
  vector siointrts.  siointrts no longer exists.
- compiler warnings about siointr* in some configurations.

Simplified timestamp and probe code by depending on recent changes in
microtime() and DELAY() to preserve the interrupt enable flag.
1996-06-17 14:23:39 +00:00
Bruce Evans
16263f7a8b In getit(), use read_eflags()/write_eflags() to preserve the interrupt
enable flag instead of enable_intr() to restore it to its usual state.
getit() is only called from DELAY() so there is no point in optimising
its speed (this wasn't so clear when it was extern), and using
enable_intr() made it inconvenient to call DELAY() from probes that need
to run with interrupts disabled.
1996-06-17 12:50:22 +00:00
Bruce Evans
b7911dc3bb In microtime(), use pushfl/popfl to preserve the interrupt enable flag
instead of sti to it restore to its usual state.  pushfl/popfl is
actually faster in protected mode on Pentiums (4+3 cycles instead of 9),
and using sti made it extremely inconvenient to call microtime() from
fast interrupt handlers.  pushfl/popfl is a couple of cycles slower than
sti on 486's and a couple more cycles slower on 386's, but the relative
cost of using it is not large since microtime() has to use slow i/o
instructions on the old cpus.
1996-06-17 12:43:04 +00:00
John Dyson
ef743ce6ed Several bugfixes/improvements:
1) Make it much less likely to miss a wakeup in vm_page_free_wakeup
	2) Create a new entry point into pmap: pmap_ts_referenced, eliminates
	   the need to scan the pv lists twice in many cases.  Perhaps there
	   is alot more to do here to work on minimizing pv list manipulation
	3) Minor improvements to vm_pageout including the use of pmap_ts_ref.
	4) Major changes and code improvement to pmap.  This code has had
	   several serious bugs in page table page manipulation.  In order
	   to simplify the problem, and hopefully solve it for once and all,
	   page table pages are no longer "managed" with the pv list stuff.
	   Page table pages are only (mapped and held/wired) or
	   (free and unused) now.  Page table pages are never inactive,
	   active or cached.  These changes have probably fixed the
	   hold count problems, but if they haven't, then the code is
	   simpler anyway for future bugfixing.
	5) The pmap code has been sorely in need of re-organization, and I
	   have taken a first (of probably many) steps.  Please tell me
	   if you have any ideas.
1996-06-17 03:35:40 +00:00
Joerg Wunsch
9306343284 Explain the options for the `od' driver. 1996-06-16 20:04:47 +00:00
Peter Wemm
bde5e68a33 Fix cut/paste error; a read-only variable should have been read/write. 1996-06-16 13:32:16 +00:00
Nate Williams
771acaaa0a Whoops, I accidentally deleted a necessary ":" which is part of the
parameters to printf() using the "D" format.  (Why this even worked on
my box during testing I don't know, but as soon as I powered it on/off
it quite working.)
1996-06-15 00:43:03 +00:00
Nate Williams
333f7d7bb6 At long last, we know have support for the 3C589 in a FreeBSD release
using the existing files using the existing PCCARD support.  Now that
this is in place I would like to fixup the PCCARD hooks and remove the
if_zp driver.  At this point, we support everything we used to support
*AND MORE* with the PCCARD code.

Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp> (via the Nomad release)

[ This works on both my 3C589B and 3C589C ]
1996-06-14 22:11:38 +00:00
Nate Williams
8ca7c1c4a0 Better code for switching the ethernet transceiver.
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)

[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]

Reviewed by:	nate
Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-06-14 21:28:35 +00:00
Satoshi Asami
ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
Satoshi Asami
f7ef42a091 Document LINT.
Reminded by:	jkh, j, bde
1996-06-14 09:42:52 +00:00
Stefan Eßer
21219d2116 Change CONF1_ENABLE_MSK to 0x7ff00000 in another attempt to decide
whether a system could possibly support PCI configuration mechanism 1
(or whether it rather is an EISA only system ...).
1996-06-13 21:50:41 +00:00
Satoshi Asami
d7629dff3b A fast memory copy for Pentiums using floating point registers.
It is called from copyin and copyout.

The new routine is conditioned on I586_CPU and I586_FAST_BCOPY, so you
need

options "I586_FAST_BCOPY"

(quotes essenstial) in your kernel config file.

Also, if you have other kernel types configured in your kernel, an
additional check to make sure it is running on a Pentium is inserted.
(It is not clear why it doesn't help on P6s, it may be just that the
 Orion chipset doesn't prefetch as efficiently as Tritons and friends.)

Bruce can now hack this away. :)
1996-06-13 07:17:21 +00:00
Joerg Wunsch
6b1d48f79c Externalize the declaration of dc_list. This is required in order to
get a ``generic'' kernel (``config kernel swap generic'') to compile.
1996-06-12 15:10:30 +00:00
John Dyson
419702a468 Fix a very significant cnt.v_wire_count leak in vm_page.c, and some
minor leaks in pmap.c.  Bruce Evans made me aware of this problem.
1996-06-12 06:52:12 +00:00
Gary Palmer
a01e62f093 Add -Wunused to try and catch any future offenders
Reviewed by:	bde
1996-06-12 05:54:46 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Gary Palmer
10a466c7d3 Clean up -Wunused warnings. Also clean up a -Winline warning while here.
Reviewed by:		bde
1996-06-12 05:04:51 +00:00
Gary Palmer
7b3628096c Clean up -Wunused warnings.
Reviewed by:	 Greg Ungerer <gerg@stallion.oz.au>
1996-06-12 04:26:36 +00:00
Nate Williams
22ceda90c7 Fixed GET/SETIPDOMAIN ioctl on /dev/socksys, which is used by various
other socket functions (gethostname() for one).

Reviewed by:	sef
1996-06-12 01:10:26 +00:00
Paul Traina
8f33d986bc Move warning messages under bootverbose 1996-06-11 16:11:27 +00:00
Paul Traina
6d715e951e Put clock calibration #defines in opt_clock.h to ease reconfiguration 1996-06-11 16:02:55 +00:00
Poul-Henning Kamp
8364338f09 We are developing a device driver of Smart Capture Card.
Smart Capture Card is a kind of video capture card, PCMCIA type II,
and made by IBM Japan co.. Unfortunately, it is sold in Japan now.

The device driver is working on the latest pccard-test package by
Tatsumi HOSOKAWA and bsd-nomads. Some applications are also working.
For example, xscc is a video moniter client on X-window, vic-2.7b2 is
a video conference tool.

We have a contract with IBM Japan. From the contract, we cannot release
the source code exept the permit of IBM Japan. But I think they will
permit us in few weeks.

Reviewed by:	phk
Requested by:	ohashi@mickey.ai.kyutech.ac.jp (Takeshi OHASHI)
1996-06-10 15:30:33 +00:00
Peter Wemm
b8484eb34b *blush* I used EXTRAVNODES everywhere else, but put EXTRA_VNODES in the
example here.. :-(
1996-06-10 08:15:29 +00:00
Alexander Langer
ff6f025aab Clarify the meaning of IPFIREWALL_VERBOSE. Add IPFIREWALL_VERBOSE_LIMIT. 1996-06-10 00:50:34 +00:00
Justin T. Gibbs
1ffa43c082 Detect and report dataphase overruns. Put the adapter into 'Bit Bucket'
mode when this occurs and allow the target to complete the transaction.
Force a retry on overruns since they are usually caused by termination or
cable problems.
1996-06-09 17:33:18 +00:00
Martin Renters
3042aad3e1 Add a check in the SMC probe to verify that the card has an ethernet
address that starts with 0000C0xxxxxx.  This prevents the probe code
from finding GUS cards.

Pointed out by: Seppo Kallio <kallio@kanto.cc.jyu.fi>
1996-06-09 14:44:17 +00:00
Joerg Wunsch
2e60812e3a Fix the spl handling. There's still the effect that the timers have
sometimes already been released at the time pcaclose() is called, but
this is now prevented from deadlocking by checking for a running timer
at the start of pca_wait().

At least, i can now play xboing again with pcaudio, this used to hang
the entire system previously within a few seconds.
1996-06-09 14:23:13 +00:00
Andrey A. Chernov
88926e45d5 Implement CDIOCCLOSE 1996-06-09 12:17:53 +00:00
Jordan K. Hubbard
43b74d6191 Bring back the `config file in the kernel' feature from the 1.x days. This
is conditionalized by the INCLUDE_CONFIG_FILE option in your kernel config
file and is not turned on by default.

Submitted-By: Bill Pechter <pechter@shell.monmouth.com>
1996-06-08 23:27:16 +00:00
Nate Williams
32d18afb14 Change the 'sysi86()' function not implemented' printf to be called only
when compiled with -DDIAGNOSTIC.  Almost all significant SCO binaries
I've run call an unsupported function and run correctly.  Given that
they aren't needed, the messages only clutter up the logfiles and
console.
1996-06-08 17:12:45 +00:00
Bruce Evans
87bc5d1973 Removed unnecessary forward declarations of incomplete structs. 1996-06-08 11:21:19 +00:00
Bruce Evans
d85327d7bc Stop using the alias pcb_ptd' for pcb_tcc.tss_cr3'. Use the (existing)
alias `pcb_cr3' instead.  That is still one alias too many, but is convenient
for me since I've replaced the tss in the pcb by a few scalar variables in
the pcb.
1996-06-08 11:03:19 +00:00
Peter Wemm
80b53b4fd5 Eliminate a struct copy that gcc doesn't inline and ends up as a call to
memset().
1996-06-08 10:18:12 +00:00
Bruce Evans
6f74588381 Removed bogus `altfmt' code. No alternative formats are supported, but
altfmt was abused to sometimes screw up the disassembly of the bytes
following unconditional jump instructions.  Gas doesn't pad to a longword
boundary like the comment said - that is the programmer's responsibility.
1996-06-08 10:15:48 +00:00
Bruce Evans
5610112b22 Fixed calculation of the number of cylinders. wdp_cylinders (was
wdp_fixedcyl) gives it directly.  wdp_removedcyl is "reserved" except
in ancient ATA-1 drafts and shouldn't be added.  This fixes PR 1288.

Changed some fields and comments in struct wdparams to match a less-
ancient ATA draft.

Fixed bit number for `rdy' in status string.
1996-06-08 10:03:38 +00:00
Bruce Evans
7dad0d7ef9 Removed recently introduced unnecessary #includes of <machine/cpu.h>
(bootverbose isn't there in -current) and nearby unnecessary #includes.
1996-06-08 09:37:51 +00:00
Bruce Evans
e7f1854cb7 Fixed group and permissions for devfs devices (group operator was games;
permissions 0640 was 0600).
1996-06-08 09:18:27 +00:00
Bruce Evans
7cc1644db3 Fixed existence, minor numbers, group and permissions for devfs devices
(locked devices weren't created; minor numbers didn't depend on the unit
number; group operator was games; permissions 0640 was 0600).
1996-06-08 09:17:51 +00:00
Bruce Evans
5e0fc49ea8 Replaced some memcpy()'s by bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these.  I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized.  Now it is only used for one struct
copy in si.c.
1996-06-08 08:18:00 +00:00
Justin T. Gibbs
41f6ef7ee2 Bring back the loop in RESTART_SEQUENCER. It seems to be necessary for
the aic7850.  Go back to autoATN on parity errors.
1996-06-08 06:55:01 +00:00
John Dyson
886d3e1150 Adjust the threshold for blocking on movement of pages from the cache
queue in vm_fault.

Move the PG_BUSY in vm_fault to the correct place.

Remove redundant/unnecessary code in pmap.c.

Properly block on rundown of page table pages, if they are busy.

I think that the VM system is in pretty good shape now, and the following
individuals (among others, in no particular order) have helped with this
recent bunch of bugs, thanks!  If I left anyone out, I apologize!

Stephen McKay, Stephen Hocking, Eric J. Chet, Dan O'Brien, James Raynard,
Marc Fournier.
1996-06-08 06:48:35 +00:00
Nate Williams
d52ead1462 When uname() returns the system name, try to use the unqualified domain
name (ie; strip off the domain).  Given a hostname 'fooey.bar.com', the
previous code returned a system name of 'fooey.ba', instead of the more
correct 'fooey'.  SCO uses 'uname' for many things, including some of
it's socket code so this patch is necessary for running certain legacy
SCO apps. :)

A variant of this code has been running on my box for 2 months now.
1996-06-08 06:01:29 +00:00
Jordan K. Hubbard
b3e41931c9 A trailing patch Jim left out of the last commit.
Submitted-by: james
1996-06-07 22:55:14 +00:00
Nate Williams
3b17c1c3f8 Added index as a 'standard' file. It could be added as 'optional' for
ibcs2, but I felt it might be useful in other code as well at a later
point.
1996-06-07 22:26:59 +00:00
Andrey A. Chernov
7b2305f78e Describe ATAPI_STATIC (it seems lkm variant never work) 1996-06-07 15:50:08 +00:00
John Dyson
475dca82bb Fix a bug in the pmap_object_init_pt routine that pages aren't taken
from the cache queue before being mapped into the process.
1996-06-07 02:36:08 +00:00
John Dyson
3ccd871cad I missed a case of the page table page dirty-bit fix. 1996-06-05 06:36:21 +00:00
John Dyson
6b6f000870 Keep page-table pages from ever being sensed as dirty. This should fix
some problems with the page-table page management code, since it can't
deal with the notion of page-table pages being paged out or in transit.
Also, clean up some stylistic issues per some suggestions from
Stephen McKay.
1996-06-05 03:31:49 +00:00
Nate Williams
beca01611f Bring in changes from if_ep.c for PCCARD driver.
Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.
1996-06-04 21:41:01 +00:00
Nate Williams
e78325798b Freudian slip. Change M_DEVBUG -> M_DEVBUF.
Submitted by:	 "Stephen F. Combs" <combssf@salem.ge.com>
1996-06-04 17:50:28 +00:00
Nate Williams
f421018241 Fix typo. in the APM_DSVALUE_BUG code that I missed.
Obtained from:	Someone on the mailing list (sorry, I forgot who)
1996-06-04 17:37:46 +00:00
Søren Schmidt
70013b5739 Added missing CR0_NW define for Cyrix 486DLC support. It's still not
stable on my hardware, but its better... *sigh*

Obtained from: NetBSD
1996-06-03 19:37:38 +00:00
John Dyson
3943b4ea05 Don't carry the modified or referenced bits through to the child
process during pmap_copy.  This minimizes unnecessary swapping or creation of
swap space.  If there is a hold_count flaw for page-table
pages, clear the page before freeing it to lessen the chance of a system
crash -- this is a robustness thing only, NOT a fix.
1996-06-02 22:28:53 +00:00
Joerg Wunsch
3fda1b129f Be slightly more verbose during configure() in the bootverbose case.
This breaks the long silence after the ``npx0'' message and allows to
track some of the problems regarding the root f/s decisions.
1996-06-02 18:58:39 +00:00
Joerg Wunsch
89cabf8664 Hide the ``wrong signature'' message behind bootverbose. It's
annoying for people who don't have a bus mouse.
1996-06-02 18:57:17 +00:00
John Dyson
c2b39c9910 Fix the problem with pmap_copy that breaks X in small memory machines. Also
close some windows that are opened up by page table allocations.  The
prefaulting code no longer uses hold counts, but now uses the busy
flag for synchronization.
1996-06-01 19:19:21 +00:00
Paul Traina
53df9ccfca Fix ioctl() operations...nasty typo 1996-05-31 17:35:07 +00:00
Justin T. Gibbs
2ee75088b4 Fix a regression. Turn off the selection hardware during a selection timeout
before clearing the SELTO interrupt.  We used to do this in the past, but
this outb got lost.

Turn ATN on ourselves as appropriate during a parity error instead of relying
on ENAUTOATNP.

Don't use a loop in RESTART_SEQUENCER.  Its not necessary.
1996-05-31 06:32:09 +00:00
Peter Wemm
ee323f62ad Jump some hoops to have the *.s code being able to be run through both an
ansi and traditional cpp.

The nesting rules of macros are different, which required some changes.
Use __CONCAT(x,y) instead of /**/.
Redo some comments to use /* */ rather than "# comment" because the ansi
  cpp cares about those, and also cares about quote matching.
1996-05-31 01:08:08 +00:00
Peter Wemm
fd54183bb9 Instead of: cpp blah file.s | as -o file.o, use instead:
cc -c -x assembler-with-cpp -o file.o file.s.

This means that any cpp fatal errors will now be detected, as well as
running *.s files through an ansi cpp instead of a traditional cpp.

(fixes to allow *.s to compile under both ansi and traditional to follow)
1996-05-31 01:01:24 +00:00
John Dyson
f35329ac0f This commit is dual-purpose, to fix more of the pageout daemon
queue corruption problems, and to apply Gary Palmer's code cleanups.
David Greenman helped with these problems also.  There is still
a hang problem using X in small memory machines.
1996-05-31 00:38:04 +00:00
Peter Wemm
114a8cff43 Add an option "EXTRA_VNODES" to cause an extra number of vnode structures
to be allocated at boot time.  This is an expensive option, as they
consume physical ram and are not pageable etc.  In certain situations,
this kind of option is quite useful, especially for news servers that
access a large number of directories at random and torture the name cache.
Defining 5000 or 10000 extra vnodes should cut down the amount of vnode
recycling somewhat, which should allow better name and directory caching
etc.

This is a "your mileage may vary" option, with no real indication of
what works best for your machine except trial and error.  Too many will
cost you ram that you could otherwise use for disk buffers etc.

This is based on something John Dyson mentioned to me a while ago.
1996-05-31 00:20:34 +00:00
Peter Wemm
c15b6c4bc6 When estimating the time (in ms) left to drain the output queue based
on the baud rate, dont get upset if it's been hung up by setting B0.
Instead, sleep for a short time, as the host controller takes a while
to go through the state changes.
1996-05-30 23:41:35 +00:00
Justin T. Gibbs
c2d50bea44 Merge in changes for NetBSD/OpenBSD.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:20:17 +00:00
Justin T. Gibbs
0262313ddc Merge in changes for NetBSD/OpenBSD.
Add a panic for attempts to page in a non paged out SCB.

Re-order some of the interrupt routine for better performance.

NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:19:59 +00:00
John Dyson
256951297d The wrong address (pindex) was being used for the page table directory. No
negative side effects right now, but just a clean-up.
1996-05-29 05:09:07 +00:00
Gary Palmer
d9378aac9a Clean up the warnings produced by the recent PCI code. Requested by
SE since he doesn't have good access right now
1996-05-27 22:32:23 +00:00
Poul-Henning Kamp
b13f884281 Cleanup the last of the assembly time "-KERNBASE" relocations. 1996-05-27 06:51:46 +00:00
Peter Wemm
d2dc185840 Fix the warnings about "cant inline call to xxx" by reordering two
functions.  It seems gcc wants to have seen the definitions of the
function before it will insert it inline in a caller.
1996-05-27 06:02:52 +00:00