Commit Graph

3466 Commits

Author SHA1 Message Date
Sujal Patel
e89054370f Add audio mixer ioctls.
Only writing to the mixer is implemented.
1996-11-05 02:04:37 +00:00
Guido van Rooij
b3ac88f13f New vx driver for:
3COM 3C590 Etherlink III PCI,
        3COM 3C595 Fast Etherlink PCI,
        3COM 3C592 Etherlink III EISA,
        3COM 3C590 Fast Etherlink EISA,
        3COM 3C900 Etherlink XL PCI and
        3COM 3C905 Fast Etherlink XL PCI.

This driver is based on OpenBSD's driver. I modified it to run under FreeBSd
and made it actually work usefully.
Afterwards, nao@tom-yam.or.jp (HAMADA Naoki) added EISA support as well as
early support for 3C900 Etherlink XL PCI and 3C905 Fast Etherlink XL PCI.
He also split up the driver in a bus independant and bus dependant parts.

Especially the 3c59X support should be pretty stable now.

Submitted by:	partly nao@tom-yam.or.jp (HAMADA Naoki)
Obtained from:partly OpenBSD
1996-11-04 22:17:20 +00:00
Søren Schmidt
10661203e7 Fix the hanging keyboard problem under Xaccel. Apprently we are loosing
an interrupt somewhere. The solution here is to check for keyboard
input each time the screen update timer ticks. Not pretty, but works.
1996-11-04 21:01:08 +00:00
Bruce Evans
fd25850c96 Don't clobber max_ncyls, ending up guessing thetotal number of cylinders as
the number in the 4th slot.

Fixes PR 1893.

Should be in 2.1.5 and 2.2.
1996-11-04 17:40:43 +00:00
John Dyson
5c2a644a47 Fix a problem with running down processes that have left wired
mappings with mlock.  This problem only occurred because of the
quick unmap code not respecting the wired-ness of pages in the
process.  In the future, we need to eliminate the dependency
intrinsic to the design of the code that wired pages actually
be mapped.  It is kind-of bogus not to have wired pages mapped,
but it is also a weakness for the code to fall flat because
of a missing page.

This show fix a problem that Tor Egge has been having, and also
should be included into 2.2-RELEASE.
1996-11-03 03:40:47 +00:00
Joerg Wunsch
bb6382fae2 Fix the broken EOF handling in the floppy driver. The most obvious
appearance of this bug was the malfunctioning -M option in GNU tar (it
worked only by explicitly specifying -L).

Reviewed by:	bde, and partially corrected accoring to his comments

Candidate for 2.2, IMHO even for 2.1.6.
1996-11-02 23:31:11 +00:00
Joerg Wunsch
4441bd4c1b Avoid touching the LEDs too early in the game. After the recent
changes to the keyboard code in pcvt, this update_led() very often
caused pcvt to hang early at boot time.

(Eventually, a better solution should be found, but the simple
omission serves well as a workaround for something that is actually a
show-stopper class problem.)

Candidate for 2.2.
1996-11-02 23:28:06 +00:00
Poul-Henning Kamp
59a95186d2 Fill in the bios-geometry array in struct bootinfo.
2.2 candidate.
1996-11-02 14:46:27 +00:00
Satoshi Asami
ce8ba0cdf6 The last update/merge of PC98 stuff before 2.2. The whole
pc98/pc98/sound directory has vanished now!

Submitted by:	FreeBSD(98) Development Team
1996-11-02 10:41:28 +00:00
Paul Traina
39daae723d add in CONSPEED option which controls console serial port speed 1996-11-02 02:26:06 +00:00
Paul Traina
7fe8c7a026 add in CONSPEED option 1996-11-02 02:25:22 +00:00
Paul Traina
6564e095d3 Rationalize support for serial consoles running at baud rates other than 9600
baud.  This isn't particularly beautiful, but neither is it disgustingly
gross.
1996-11-02 02:24:39 +00:00
John Hay
75c66a120a if_sr.c corrupted the global variable `ticks'.
Cosmetic changes:
if_sr_.c won't compile with a K&R compiler, so there is no need to cast
the timeout arg to the (wrong) type.
Submitted by:	bde
1996-10-31 20:22:40 +00:00
Julian Elischer
d13d3630fd Further improved version of hadling a HALT when there is no console. 1996-10-31 00:57:28 +00:00
Satoshi Asami
e30f001135 More merge and update.
(1) deleted #if 0

    pc98/pc98/mse.c

(2) hold per-unit I/O ports in ed_softc

    pc98/pc98/if_ed.c
    pc98/pc98/if_ed98.h

(3) merge more files by segregating changes into headers.

  new file (moved from pc98/pc98):

    i386/isa/aic_98.h

  deleted:

    well, it's already in the commit message so I won't repeat the
    long list here ;)

Submitted by:	The FreeBSD(98) Development Team
1996-10-30 22:41:46 +00:00
Julian Elischer
75680b05c6 if there is no console, cngetc should act like getc and return -1
make callers aware of this in those cases where it can occur.
1996-10-30 21:40:25 +00:00
Poul-Henning Kamp
0cf34a4a5f Pass right arp to bpf_mtap(). 1996-10-30 08:50:26 +00:00
Satoshi Asami
4d2d765487 Another round of merge/updates.
(1) Add #ifdef PC98:

	sys/pc98/boot/biosboot/boot2.S

 (2) Fix bug that made it impossible to boot from sd's other than unit 0:
	sys/pc98/boot/biosboot/sys.c

 (3) Delete redundant $Id$:

	sys/pc98/pc98/clock.c (reject$B$5$l$k$+$b$7$l$J$$(B)

 (4) unt -> u_int:
	sys/pc98/pc98/if_ed.c

 (5) Add support for rebooting by the hot-key sequence:

	sys/pc98/pc98/kbdtables.h

 (6) Display now looks like PC/AT version:

	sys/pc98/pc98/npx.c

 (7) Change comment to match that of PC/AT version:

	sys/pc98/pc98/pc98.c

 (8) Add function prototypes:

	sys/pc98/pc98/pc98_machdep.c

 (9) Include PC98 headers:

	sys/pc98/pc98/sound/adlib_card.c
	sys/pc98/pc98/sound/audio.c
	sys/pc98/pc98/sound/dev_table.c
	sys/pc98/pc98/sound/dmabuf.c
	sys/pc98/pc98/sound/midi_synth.c
	sys/pc98/pc98/sound/midibuf.c
	sys/pc98/pc98/sound/opl3.c
	sys/pc98/pc98/sound/oatmgr.c
	sys/pc98/pc98/sound/sb16_dsp.c
	sys/pc98/pc98/sound/sb16_midi.c
	sys/pc98/pc98/sound/sb_card.c
	sys/pc98/pc98/sound/sb_dsp.c
	sys/pc98/pc98/sound/sb_midi.c
	sys/pc98/pc98/sound/sb_mixer.c
	sys/pc98/pc98/sound/sequencer.c
	sys/pc98/pc98/sound/sound_config.h
	sys/pc98/pc98/sound/sound_switch.c
	sys/pc98/pc98/sound/soundcard.c
	sys/pc98/pc98/sound/sys_timer.c

(10) Merge in PC98 changes:

	sys/i386/isa/sound/os.h

(11) Deleted as result of 9. and 10. above:

	sys/pc98/pc98/sound/ad1848_mixer.h
	sys/pc98/pc98/sound/aedsp16.c
	sys/pc98/pc98/sound/coproc.h
	sys/pc98/pc98/sound/finetune.h
	sys/pc98/pc98/sound/gus_hw.h
	sys/pc98/pc98/sound/gus_linearvol.h
	sys/pc98/pc98/sound/hex2hex.h
	sys/pc98/pc98/sound/mad16.h
	sys/pc98/pc98/sound/midi_ctrl.h
	sys/pc98/pc98/sound/midi_synth.h
	sys/pc98/pc98/sound/opl3.h
	sys/pc98/pc98/sound/os.h
	sys/pc98/pc98/sound/pas.h
	sys/pc98/pc98/sound/sb_mixer.h
	sys/pc98/pc98/sound/soundvers.h
	sys/pc98/pc98/sound/tuning.h

Submitted by:	The FreeBSD(98) Development Team
1996-10-29 08:37:02 +00:00
John Hay
ebcdcb982a Add support for the SDL RISCom N2pci cards. Bring in the enhancements
made to the Arnet driver.
1996-10-29 03:53:21 +00:00
John Hay
c2b3cc824d Remove some unnecessary code in the interrupt handler.
Check that a received packet isn't longer than MCLBYTES. This will
sometimes happen if a cable is plugged into or removed from a live
system.
Try to cater better for early receive interrupts.
1996-10-28 19:40:01 +00:00
John Hay
21b4a6992c A #define really don't need a ; at the end. 1996-10-28 19:35:37 +00:00
Warner Losh
ac1ad962f7 comaptibles->compatibles 1996-10-28 17:16:40 +00:00
Justin T. Gibbs
8c64b9a600 Add basic support for the 398X cards as multi-channel SCSI host adapters.
This involves expanding the support of the SEEPROM routines to deal with
the larger SEEPROMs on these cards and providing a mechanism to share
SCB arrays between multiple controllers.

Most of the 398X support came from Dan Eischer.

ahc_data -> ahc_softc

Clean up some more type bogons I missed from the last pass.

Be more clear when handing the NO_MATCH condition.  NO_MATCH can also
happen when the sequencer encounters an SCB we've asked to be aborted.
1996-10-28 06:10:02 +00:00
Justin T. Gibbs
2e92a4ad78 Add some code to allow SCB sharing for the 398X cards. This involves passing
an extra parameter to ahc_alloc.
1996-10-28 06:06:42 +00:00
Justin T. Gibbs
1affda38c1 Add two new aic7xxx driver options:
AHC_FORCE_PIO - This forces the driver to use PIO even on systems that
	say they have memory mapped the controller's registers.  This
	seems to fix Ken Lam's problems.  I've also placed this option
	in the GENERIC kernel file so that we are guaranteed to install
	even on these flakey machines.

AHC_SHARE_SCBS - This option attempts to share the external SCB SRAM on
	the 398X controllers allowing a totoll of 255 non-paged SCBs.
	This doesn't work quite yet, so this option is mostly here to
	help 398X owners to experiment and give me feedback until this
	works properly.
1996-10-28 06:05:58 +00:00
Søren Schmidt
66e7fce7ac Use the calibrated/adjustable i8254 frequency `timer_freq' instead of
TIMER_FREQ.

Fixed missing splx() in scrn_timer().  The bug was harmless because of the
undocumented behaviour that the ipl is automatically restored for timeout
functions (see softclock()).  Perhaps we should depend on this behaviour.

Fixed the ddb fix in rev.1.176.  The in_debugger flag was no use because
it only works when the debugger is entered via the keyboard hotkey.  The
debugger may be entered for breakpoints and traps, and the console putc
routine has no way of knowing when it was, so the console putc routine
must (almost?) always remove the cursor image.

Not fixed: console switching in ddb doesn't work (ISTR it working), and
console 0 shouldn't be switched to for the debugger hotkey unless console
0 is /dev/console.

Fixed side effects from calling add_keyboard_randomness() in the console
getc routine by not calling it.  add_keyboard_randomness() currently
always reenables interrupts on 386's and 486's.  This is very bad if the
console getc routine is called from the debugger and the debugger was
entered with interrupts disabled.

Fixed preservation of initial screen and now-bogus comment about it.  It
was broken by setting the initial scr_buf to `buffer' instead of Crtat.
`buffer' was full of nulls and the first scroll cleared everything above
the things written through syscons.

Submitted by:	bruce (bde@freebsd.org)
1996-10-26 20:16:58 +00:00
Bruce Evans
9272350657 Removed initialization of a variable that went away. Oops. 1996-10-26 00:11:57 +00:00
Bruce Evans
484141f666 Declare pointers to signal handling functions in full instead of as
sig_t's so that <sys/signal.h> isn't a prerequisite.
1996-10-25 16:20:34 +00:00
Bruce Evans
9ef7d39520 Removed unused #includes.
Strength-reduced used #include.

Staticized pcaintr().

Fixed some style bugs.
1996-10-25 16:09:31 +00:00
Bruce Evans
9275c7cc3e Use macros from timmerreg.h instead of private ones.
Use global timer_freq instead of private TIMER_CLK.

Removed unused #includes.

Fixed some comments.
1996-10-25 14:00:47 +00:00
Bruce Evans
2d872b777d Print the clock calibration messages all on one (long) line again so
that they are easy to grep for.

Removed now-unused i586 counter variables.

Fixed some style bugs.
1996-10-25 13:46:21 +00:00
Bruce Evans
835bd1ce62 Improved biasing of i586 clock by adjusting for hardclock() latency.
I decided to do this for every hardclock() call instead of lazily
in microtime().  The lazy method is simpler but has more overhead
if microtime() is called a lot.

CPU_THISTICKLEN() is now a no-op and should probably go away.
Previously it did nothing directly but had the side effect of
setting i586_last_tick for CPU_CLOCKUPDATE() and i586_avg_tick for
debugging.  CPU_CLOCKUPDATE() now uses a better method and
i586_avg_tick is too much trouble to maintain.

Reduced nesting of #includes in the usual case.

Increased nesting of #includes when CLOCK_HAIR is defined.  This
is a kludge to get typedefs for inline functions only when the
inline functions are used.  Normally only kern_clock.c defines
this.  kern_clock.c can't include the i386 headers directly.

Removed unused LOCORE support.
1996-10-25 13:01:56 +00:00
Bruce Evans
22b9cd6f99 Removed #include of <machine/clock.h>. It is no longer used, and would
break when I remove LOCORE support from clock.h.
I586_CTR_MULTIPLIER_SHIFT = 32 from clock.h is actually still used, but
32 is so magic that it doesn't get used explicitly.
1996-10-25 12:26:19 +00:00
Justin T. Gibbs
df9ab5b30f - KNF cleanup.
- Add support for memory mapped I/O.
- Use DMA to get SCBs down to the adapters.
- Remove old paging code.
- Be much smarter about how we allocate SCB space.  The old, simple method
  wasted almost half a page per SCB. Ooops.
- Make command complete interrupt processing more efficient.
- Break the monolithic ahc_intr into sub-routines.  The sub-routines handle
  rare, special case events so the function call is not a penalty and the
  removal of the code from the main routine most likely improves performance
  instruction prefech will work better and less code is pushed into the cache.
- Never, ever allow tagged queueing if a device has disconnection disabled.
- Clean up and simplify timeout code.  Many of the changes are to handle the
  new DMA scheme.
1996-10-25 06:42:53 +00:00
Justin T. Gibbs
7c34df884c KNF cleanup.
Update to handle new arg to ahc_alloc.
1996-10-25 06:35:38 +00:00
Paul Traina
dcb21864dc Remove SC_KBD_PROBE_WORKS option and replace it with a simple run-time flag
bit (0x0008) in the sc driver configuration line.  This way it's easy to
boink a generic kernel.

Also, document and place in an opt_ file the #define's for overriding which
serial port is the system console.
Approved by:	sos
1996-10-23 07:29:44 +00:00
John Dyson
845c4ec464 Account for the UPAGES in the same way as before moving the MD code
from vm_glue into pmap.c.  Now RSS should appear to be the same as before.
1996-10-23 05:31:54 +00:00
Nate Williams
bbabe47be8 When compiling with '-Wall -pedantic', the byte swapping macros gave the
following warning:
  warning: ANSI C forbids braced-groups within expressions

Adding __extension__ before the statement-expression seems to work right.

Submitted by:	bde (a *long* time ago)
1996-10-21 17:15:05 +00:00
Poul-Henning Kamp
bd7ea4dcfc Removing old isdn stuff. 1996-10-20 18:35:35 +00:00
Søren Schmidt
c070783c4b Changed mouse functionality a bit, now the pointer disappears if
there is keyboard input.
The mousepointer is shown again immediately if moved.

Also a function pointer used to install a userwritten extra
ioctl handler (sc_user_ioctl). This way its is possible to
install user defined videomodes etc etc. No further changes
should be in the kernel.
1996-10-18 18:51:37 +00:00
Jordan K. Hubbard
889eef6fca Add back line for options NS, though commented out for now until
Tony tells me what to do with the ns_nettype extern which is still
unresolved for this optioin.
1996-10-18 03:52:48 +00:00
Poul-Henning Kamp
81acf468e2 DKFL_MULTI lives in flags, not in status. 1996-10-17 21:18:42 +00:00
Bruce Evans
d6b9e17eb5 Improved non-statistical (GUPROF) profiling:
- use a more accurate and more efficient method of compensating for
  overheads.  The old method counted too much time against leaf
  functions.
- normally use the Pentium timestamp counter if available.
  On Pentiums, the times are now accurate to within a couple of cpu
  clock cycles per function call in the (unlikely) event that there
  are no cache misses in or caused by the profiling code.
- optionally use an arbitrary Pentium event counter if available.
- optionally regress to using the i8254 counter.
- scaled the i8254 counter by a factor of 128.  Now the i8254 counters
  overflow slightly faster than the TSC counters for a 150MHz Pentium :-)
  (after about 16 seconds).  This is to avoid fractional overheads.

files.i386:
permon.c temporarily has to be classified as a profiling-routine
because a couple of functions in it may be called from profiling code.

options.i386:
- I586_CTR_GUPROF is currently unused (oops).
- I586_PMC_GUPROF should be something like 0x70000 to enable (but not
  use unless prof_machdep.c is changed) support for Pentium event
  counters.  7 is a control mode and the counter number 0 is somewhere
  in the 0000 bits (see perfmon.h for the encoding).

profile.h:
- added declarations.
- cleaned up separation of user mode declarations.

prof_machdep.c:
Mostly clock-select changes.  The default clock can be changed by
editing kmem.  There should be a sysctl for this.

subr_prof.c:
- added copyright.
- calibrate overheads for the new method.
- documented new method.
- fixed races and and machine dependencies in start/stop code.

mcount.c:
Use the new overhead compensation method.

gmon.h:
- changed GPROF4 counter type from unsigned to int.  Oops, this should
  be machine-dependent and/or int32_t.
- reorganized overhead counters.

Submitted by:	Pentium event counter changes mostly by wollman
1996-10-17 19:32:31 +00:00
Bruce Evans
b40a35f250 Added missing extern declaration of timer_freq.
Sorted declarations of scalars.
1996-10-17 17:31:25 +00:00
Nate Williams
b4c9d8eaf5 This patch attempts to make the pccard probe in if_ed.c work with
non-memory-mapped cards.

Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
Reviewed by:	phk,dg
1996-10-17 13:42:13 +00:00
Bruce Evans
ebd707d36a Fixed miscounting for non-statistical (GUPROF) profiling:
- use CROSSJUMP() and CROSSJUMP_LABEL() for conditional jumps from idle()
  into cpu_switch() and vice versa.
- moved badsw code to after cpu_switch().

Cosmetic changes:
- moved sw0 string to be immediately after its caller (badsw).
- removed unused #include.
1996-10-16 18:37:58 +00:00
Bruce Evans
435929a84b Added macros CROSSJUMP(), CROSSJUMP_LABEL() and GPROF_RET. These will
be used to fix some benign(?) bugs in GUPROF profiling.

Fixed stale comments and long lines.
1996-10-16 18:13:25 +00:00
Søren Schmidt
ea5a2b2e00 Prepare kernel to take advantage of "branded" ELF binaries. 1996-10-16 17:51:08 +00:00
Julian Elischer
66478c637b Add support for embedded operation withou console
The boot.c patch is applied only to teh JULIAN_HACK branch
the muted console is controlable by a sysctl variable kern.consmute
1996-10-16 00:19:40 +00:00
Søren Schmidt
b5ca878577 Corrected the setting of winsize on open().
Problem pointed out by David Nugent - davidn@blaze.net.au.
1996-10-15 20:27:07 +00:00
Bruce Evans
62c3734cbe Updated #includes to 4.4lite style. 1996-10-15 19:22:46 +00:00
Bruce Evans
aad9af2ba3 Removed nested include of <sys/proc.h> from <vm/vm_object.h> and fixed
the one place that depended on it.  wakeup() is now prototyped in
<sys/systm.h> so that it is normally visible.

Added nested include of <sys/queue.h> in <vm/vm_object.h>.  The queue
macros are a more fundamental prerequisite for <vm/vm_object.h> than
the wakeup prototype and previously happened to be included by
namespace pollution from <sys/proc.h> or elsewhere.
1996-10-15 18:24:34 +00:00
Bruce Evans
9e25bb3c6b Synchronized with biosboot/Makefile:
- use gcc-2.7.2 alignment features
- get CWARNFLAGS form <bsd.kern.mk>
- fixed whitespace differences.
1996-10-15 16:26:05 +00:00
John Dyson
675878e732 Move much of the machine dependent code from vm_glue.c into
pmap.c.  Along with the improved organization, small proc fork
performance is now about 5%-10% faster.
1996-10-15 03:16:45 +00:00
Bruce Evans
64a88efa64 Fixed setting of the keyboard LEDs. For some keyboards and/or keyboard
controllers, it is an error to issue a command before the keyboard
has had time to reply to the previous command.  Setting the LEDs
involves issueing 2 commands, so it never worked on these keyboards.

Fixed resetting of keyboard.  It is possible for unprocessed
scancodes to be present when the reset routine is called.  This
usually occurs after switching from one console driver to another
in userconfig.  pcvt and syscons attempt to flush any stale scancodes,
but sometimes fail to do so because keyboard and/or keyboard
controller takes a long time to send the scancodes after reset
(scancodes are apparently not flushed by reset!).  syscons handles
this later by not checking for errors at strategic places, but pcvt
was confused.

Use an impossible initial and failure mode setting for the LEDs
so that the LEDs always get set if they are possibly out of sync.

Added missing spltty() in update_led().
1996-10-14 21:44:05 +00:00
Jordan K. Hubbard
50019cb3c4 Change the boot-time menu. 1996-10-14 21:19:43 +00:00
Paul Traina
972a3f282a Expose the control mechanism for serial console boot so that the default
shipped with freebsd can be changed without modifying the Makefiles directly.

Creates:	BOOT_FORCE_COMCONSOLE
		BOOT_PROBE_KEYBOARD
		BOOT_PROBE_KEYBOARD_LOCK
		BOOT_COMCONSOLE			(port value for console)
1996-10-14 17:25:53 +00:00
David Greenman
a309908dc3 Fixed a bug that got introduced when I changed the CY16_RESET and
CY_CLEAR_INTR definitions. This might have affected probing of ISA
versions of the Cyclom 16/32-Y.
1996-10-14 16:43:11 +00:00
David Greenman
6fd560f670 Make this compile again for the CyDebug case. 1996-10-14 16:10:00 +00:00
Bruce Evans
14c0bb7c89 Oops, PROBE_KEYBOARD_LOCK wasn't supposed to be enabled by default. 1996-10-14 12:37:47 +00:00
Poul-Henning Kamp
6704a50967 Stop using old compatibility names from buf.h 1996-10-13 14:36:06 +00:00
John Dyson
8de30f117f Pmap_resident_count was mistakenly removed from pmap.h, thereby
disabling the RSS listing in ps and ^T.  This commit re-inserts
the macro defn.
1996-10-13 03:14:57 +00:00
John Dyson
8f3a9a1b78 Minor optimization for final rundown of a pmap. 1996-10-13 01:38:37 +00:00
David Greenman
7a28c2a8cd Change DEVFS device naming convention for cuac*, ttyc*. 1996-10-13 01:30:32 +00:00
David Greenman
3010cd6550 Changes to add support for the PCI version of the Cyclades Cyclom-Y
serial adapter, and support for multiple Cyclom controllers.
1996-10-13 01:09:24 +00:00
John Dyson
9d3fbbb5f4 Performance optimizations. One of which was meant to go in before the
previous snap.  Specifically, kern_exit and kern_exec now makes a
call into the pmap module to do a very fast removal of pages from the
address space.  Additionally, the pmap module now updates the PG_MAPPED
and PG_WRITABLE flags.  This is an optional optimization, but helpful
on the X86.
1996-10-12 21:35:25 +00:00
Bruce Evans
da2186afa3 Cleaned up:
- fixed a sloppy common-style declaration.
- removed an unused macro.
- moved once-used macros to the one file where they are used.
- removed unused forward struct declarations.
- removed __pure.
- declared inline functions as inline in their prototype as well
  as in theire definition (gcc unfortunately allows the prototype
  to be inconsistent).
- staticized.
1996-10-12 20:36:15 +00:00
Bruce Evans
4458ac71b1 Removed nested include if <sys/socket.h> from <net/if.h> and
<net/if_arp.h> and fixed the things that depended on it.  The nested
include just allowed unportable programs to compile and made my
simple #include checking program report that networking code doesn't
need to include <sys/socket.h>.
1996-10-12 19:49:43 +00:00
Bruce Evans
71f4712b50 Staticized. Things exported by linker sets should always be static. 1996-10-12 17:34:25 +00:00
Garrett Wollman
f5b7ed3e67 Implement the RFC 1650 MIB. 1996-10-11 15:19:23 +00:00
Poul-Henning Kamp
932b06fca5 Added a bdev and cdev for "geometry disk", my generic disk geometry subsystem.
I really wish somebody would complete DEVFS :-(
1996-10-10 20:41:13 +00:00
Bruce Evans
a0ea75ecbd Don't include "opt_cpu.h" in <machine/clock.h>, since this breaks lkm's.
The change breaks kern_clock.c; fix that temporarily by including
"opt_cpu.h" there.
1996-10-10 10:25:26 +00:00
Bruce Evans
10c84befd7 Added missing include of "opt_cpu.h". I missed it because PERFMON
features are used without testing for i586 features that they depend
on.  Configuring option PERFMON without configuring a suitable cpu
still doesn't fail right.
1996-10-10 10:18:48 +00:00
Bruce Evans
9829c47606 Fixed spelling errors in function names in previous commit. 1996-10-10 08:04:03 +00:00
Jordan K. Hubbard
978afeee5f Correct the intro text so user is not encouraged to step off cliffs.
Also document the fact that you can hit ESC to skip configuration.
1996-10-09 23:36:54 +00:00
Satoshi Asami
dffcea8d5f Another round of updates. Highlights:
(1) Merged i386/i386/sb.h, deleted pc98/pc98/sb.h.

(2) pc98/conf/GENERIC8 looks more like i386/conf/GENERIC now.

(3) Fixed display bug in pc98/boot/biosboot/io.c.

(4) Prepare to merge memory allocation routines:

	pc98/i386/locore.s
	pc98/i386/machdep.c
	pc98/pc98/pc98_machdep.c
	pc98/pc98/pc98_machdep.h

(5) Support new board "C-NET(98)":

	pc98/pc98/if_ed98.h
	pc98/pc98/if_ed.c

(6) Make sure FPU is recognized for non-Intel CPUs:

	pc98/pc98/npx.c

(7) Do not expect bss to be zero-allocated:

	pc98/pc98/pc98.c

Submitted by:	The FreeBSD(98) Development Team
1996-10-09 21:47:16 +00:00
Bruce Evans
c20b324bb6 Put I*86_CPU defines in opt_cpu.h. 1996-10-09 19:47:44 +00:00
Bruce Evans
d656e316f8 Added new documented options I586_OPTIMIZED_BCOPY and I586_OPTIMIZED_BZERO.
Added old misnamed option I586_FAST_BCOPY in options.i386.

Added old undocumented CLK* and SI_DEBUG options in LINT.
1996-10-09 18:36:44 +00:00
Jordan K. Hubbard
b4a346809a Accept 'Q' or 'ESC' in intro screen as a "Jane, stop this crazy thing!"
request.
1996-10-09 18:31:20 +00:00
Bruce Evans
cf232f113f Enable the i586-optimized bcopy if the cpu is a "586" and option
I586_OPTIMIZED_BCOPY is configured.

Similarly for bzero/I586_OPTIMIZED_BZERO.

Fake 586's had better have a hardware FPU with non-broken exception
handling (we mask exceptions, but broken exception handling may trap
on the instructions that do the masking).  I guess this means that
the routines won't work on most 386's or FPUless 486's even when they
have a h/w FPU.
1996-10-09 18:30:08 +00:00
Bruce Evans
18860b410d Added i586-optimized bcopy() and bzero().
These are based on using the FPU to do 64-bit stores.  They also
use i586-optimized instruction ordering, i586-optimized cache
management and a couple of other tricks.  They should work on any
i*86 with a h/w FPU, but are slower on at least i386's and i486's.
They come close to saturating the memory bus on i586's.  bzero()
can maintain a 3-3-3-3 burst cycle to 66 MHz non-EDO main memory
on a P133 (but is too slow to keep up with a 2-2-2-2 burst cycle
for EDO - someone with EDO should fix this).  bcopy() is several
cycles short of keeping up with a 3-3-3-3 cycle for writing.  For
a P133 writing to 66 MHz main memory, it just manages an N-3-3-3,
3-3-3-3 pair of burst cycles, where N is typically 6.

The new routines are not used by default.  They are always configured
and can be enabled at runtime using a debugger or an lkm to change
their function pointer, or at compile time using new options (see
another log message).

Removed old, dead i586_bzero() and i686_bzero().  Read-before-write is
usually bad for i586's.  It doubles the memory traffic unless the data
is already cached, and data is (or should be) very rarely cached for
large bzero()s (the system should prefer uncached pages for cleaning),
and the amount of data handled by small bzero()s is relatively small
in the kernel.

Improved comments about overlapping copies.

Removed unused #include.
1996-10-09 18:16:17 +00:00
Bruce Evans
14f3567a32 Don't claim the console when the driver is disabled. The getc/putc
part of the console driver usually works when the driver is disabled,
but the normal read/write part doesn't (it caused a panic).
1996-10-09 15:24:21 +00:00
Bruce Evans
50ec4d5916 Added option PROBE_KEYBOARD_LOCK which gives a serial console if the
keyboard is locked.
1996-10-08 22:41:34 +00:00
Bruce Evans
4fd6d53a24 Saved about 160 bytes by using the gcc-2.7 alignment options. 1996-10-08 22:35:48 +00:00
Bruce Evans
5bac261e76 Print the dos device number for read failures. 1996-10-08 22:31:31 +00:00
Bruce Evans
86f17a898e Removed unused arg to badsect(). It wasted 16 bytes.
Staticized badsect().

Avoid warning for benign signed vs unsigned comparison.
1996-10-08 22:25:22 +00:00
Bruce Evans
3eeeca733b Use the same warning flags as for the kernel. This causes surprisingly
few warnings.
1996-10-08 22:18:34 +00:00
Bruce Evans
9e72552ff0 Centralized the definition of CWARNFLAGS into bsd.kern.mk. 1996-10-08 22:09:03 +00:00
Bruce Evans
e8e87818d1 Fixed pessimized (short) i/o port types. 1996-10-08 21:08:18 +00:00
Garrett Wollman
545c48b83a Fix padding of short packets (PR#1701).
Submitted by: seki@sysrap.cs.fujitsu.co.jp
1996-10-07 17:50:00 +00:00
Justin T. Gibbs
0a42ab8379 Advanced Systems Inc. SCSI Controller driver and ISA/VL front end.
I have only tested the ABP5140 card and only with a single CDROM drive
but it seems to work fine.  This driver relies on features found only in
the SCSI branch so will not work in -current until those changes
are brought in.  It also doesn't have any error handling code *yet*.
The goal is to use this driver as the development platform for the new
generic SCSI layer error recovery/handling code.

PCI and EISA front ends will show up as soon as I get my hands on
the cards.  There are also a few issues in the driver that I need
to clear up with AdvanSys before I can suggest sticking one of
these cards in your server. 8-)

Thanks to AdvanSys for releasing this code under a suitable copyright.

Obtained from:  Ported from the Linux driver writen by
		bobf@advansys.com (Bob Frey).
1996-10-07 02:07:07 +00:00
Justin T. Gibbs
b109ceda2f Bring in bug fix from 'SCSI' branch. 1996-10-06 22:50:56 +00:00
Justin T. Gibbs
020f6d4ee5 If, during an SDTR negotiation, the target comes back with a response
that is too low for the aic7xxx chip to handle with sync transfers,
negotiate async transfers.
1996-10-06 19:43:36 +00:00
Bruce Evans
bb2038d538 Improved the btodb() and dbtob() macros. I made them give unsigned
[long long] results when I last worked on them, but they are normally
used together with to daddr_t's and off_t's which are signed, so the
unsigned results did little except cause warnings.
1996-10-06 19:24:02 +00:00
Bruce Evans
e2bbfa26bd Cleaned up vm types. Cosmetic.
The main change is from unsigned long unsigned int.  It just needs to
be a 32-bit type and unsigned int is most natural.  Using a non-long
type has the "advantage" of hiding bugs in the "machine-independent"
code where it prints foo_t's using %d or %x.  These bugs are currently
hidden bug not compiling with -Wformat.

I tried changing vm_ooffset_t from long long to unsigned long long, but
that was wrong because vm_ooffset_t needs to be long to match off_t,
although file offsets are never negative.

Reviewed by:	dyson
1996-10-06 19:13:37 +00:00
Justin T. Gibbs
2ea8799246 Bring aic7xxx driver bug fixes from 'SCSI' into current. 1996-10-06 16:38:45 +00:00
Bruce Evans
d1f6ee03f1 Fixed build of LINT yet again. getchar() clashed with getchar() in pcvt.
Staticized it in userconfig.  The one in pcvt is unused.

Removed bogus unused arg to getchar().  This should not have compiled
in the USERCONFIG_BOOT case, but the getchar() was also non-prototyped
and defined in K&R style.

Staticized the badly named global variable `next'.  Even static variables
should have a unique module-specific prefix so that they can be referenced
easily in debuggers, etc.
1996-10-06 16:30:15 +00:00
David Greenman
8d0f240d36 Moved a #if for VISUAL_USERCONFIG case...the last commit didn't completely
fix the problem.
1996-10-06 15:27:36 +00:00
Jordan K. Hubbard
3a501ea715 Conditionalize introfunc on USERCONFIG_BOOT && VISUAL_USERCONFIG 1996-10-06 10:15:27 +00:00
Jordan K. Hubbard
8996308b98 Document USERCONFIG_BOOT, even though it doesn't belong where it is. ;-) 1996-10-05 11:01:24 +00:00
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