Commit Graph

3406 Commits

Author SHA1 Message Date
Jordan K. Hubbard
6de3a3bb17 movl instruction should have been lea (this is why userconfig didn't
work in 2.1).

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

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

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

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

wd82371.c: Yet another merge.

These are 2.2 candidates.

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

This fixes PR 1644 for sio.

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

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

Definite 2.2 material, I believe.

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

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

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

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

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

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

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

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

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

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

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

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

options.i386:
Removed old options.

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

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

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

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

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

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

This shall be in 2.1.6 and 2.2.

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

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

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

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

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

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

Go back to doing unconditional retries for the QUEUE FULL status condition.
This is really a kludge, but the code to handle it properly is on the SCSI
branch and will not make it into 2.2.
1996-11-11 05:24:46 +00:00
Justin T. Gibbs
e0582e6561 Clean up the memory mapped/Programmed I/O stuff so that the driver completely
uses one or the other.  This required some changes to the ahc_reset()
function, and how early the probes had to allocate their softc.

Turn the AHC_IN/OUT* macros into inline functions and lowercase their names
to indicate this change.  Geting AHC_OUTSB to work as a macro doing
conditional memory mapped I/O would have been too gross.
1996-11-11 05:21:27 +00:00
Justin T. Gibbs
6fb5e0fa28 Add the AHC_FORCE_PIO option.
Update comment on AHC_SCBPAGING_ENABLE since I think it works now.
1996-11-11 05:17:34 +00:00
John Dyson
d22671dcce Support the PG_G flag on Pentium-Pro processors. This pretty
much eliminates the unnecessary unmapping of the kernel during
context switches and during invtlb...
1996-11-11 04:20:19 +00:00
Nate Williams
a973755bfa Allow us to enable the 'XT_KEYBOARD' code using a configuration flag.
This allows the user to add modify syscons's configuration flags using
UserConfig that will allow older/quirky hardware (most notably older IBM
ThinkPad laptops) to work with the standard boot kernel.

Inspired by:	The Nomads
1996-11-10 16:44:13 +00:00
Satoshi Asami
33c58c9f8f Remove option I586_FAST_BCOPY. The code will be included by default
if I586_CPU is defined.  Note there is a runtime check so the code
won't be run for non-Pentium CPUs anyway.

2.2 candidate, this code has been tested for almost half year in -current.
1996-11-08 02:38:44 +00:00
Joerg Wunsch
1d6ccf9cd6 Fix the message buffer mapping. This actually allows to increase
the message buffer size in <sys/msgbuf.h>.

Reviewed by:	davidg,joerg
Submitted by:	bde
1996-11-07 14:44:01 +00:00
Justin T. Gibbs
ebcf5ea509 Bzero the kernel scb array after it is allocated otherwise the control byte
used on the first transaction on an SCB is indeterminate.

Spaces -> tabs.
1996-11-07 06:39:44 +00:00
Bruce Evans
94ca32a3f5 Don't switch from fast interrupt handlers to normal interrupt
handlers if interrupts are nested more than a few (3) deep.  This
only reduces the maximum nesting level by 1 with the standard
drivers unless there is a related bug somewhere, but can't hurt
much (the worst case is returning to hoggish interrupt handler like
wdintr(), but such interrupt handlers hurt anyway).

Fixed a previously harmless race incrementing the interrupt nesting
level.

This should be in 2.1.6 and 2.2.
1996-11-07 03:05:27 +00:00
Mike Smith
c06ec9a76b Add the 'piix' device, to get the right flags for it. This appears to
fix Joerg's freeze.

Definitely a 2.2 candidate.

Reviewed by:	joerg
1996-11-07 01:13:37 +00:00
Bruce Evans
a01024e023 Count only hardware interrupts in cnt.v_intr, so that the individual
hardware interrupt counts add up to the total.  Previously, software
interrupts generated by splz() were counted in the total.  These
software interrupts seem to be very rare - there have apparently been
0 of them on freefall among the last 352448857 interrupts.
1996-11-06 17:02:38 +00:00
Bruce Evans
aebd564631 Compile linux_genassym with the same options as genassym. ${PARAM} and
- were missingUKERNEL.  This was harmless until I declared the kernel's
main().
1996-11-06 15:13:41 +00:00
Bruce Evans
f5227a832c Compile genassym without -static (undo rev.1.20). The default can be
depended on now, and linux_genassym has depended on it for a long time.
1996-11-06 14:56:11 +00:00
Bruce Evans
11bfa65a0b Rewrote the COMMENT about the bogus options CHILD_MAX and OPEN_MAX. These
will be renamed.

Fixed comments about unsupported network protocols.

ncr0 is a controller, not a device.  This make no difference.

Added undocumented options DEVFS_ROOT, I586_CTR_GUPROF and I586_PMC_GUPROF.
Sorted undocumented options.
1996-11-06 14:52:20 +00:00
Justin T. Gibbs
16da2fbab4 Update to changes in generic SCSI layer. 1996-11-05 09:20:08 +00:00
Justin T. Gibbs
bee7495e7a Add missing parenthesis. That's what I get for having e different versions
of this driver in three different trees. <sigh>
1996-11-05 08:39:33 +00:00
Justin T. Gibbs
bf850955ed Move the include opt_aic7xxx in aic7xxx.h so that all of the driver files get
it automatically.  The AHC_FORCE_PIO option wasn't having any effect because
the PCI probe code didn't include this file.

Fix some problems with the new sync and wide negotiation code.  First off,
go back to async transfers by using a message reject again.  The SCSI II and
III spec indicate that if a target's response to an initiater does not suit
(i.e. its too low), then performing a message reject is the appropriate
response.  If, on the other hand, the initiator begins the negotiation and
we want to go async, we will send back an SDTR message with a 0 period and
offset.

Also fix a really bad negotiation problem caused by a missing "break".  This
would usually hit people that had "smart" wide devices that immediately
attempt sync negotiation after a successful wide negotiation.

2.2 Candidate.
1996-11-05 07:57:29 +00:00
Mike Smith
0a9d630ea8 Protect against PCI devices which may have their 'changed' flag set,
or list items which may look like devices but which don't have an
isa_device structure attached to them.

This _shouldn't_ be possible, but it appears to have been
observed-by: Joerg
1996-11-05 05:52:36 +00:00
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