Commit Graph

2846 Commits

Author SHA1 Message Date
Poul-Henning Kamp
e911eafcba removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
Poul-Henning Kamp
f8845af0db First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
Poul-Henning Kamp
f3e002a838 Rename the very bogus indeed option "LINUX" to "COMPAT_LINUX".
I can only presume that the brain behind this have never seen code
that says "#ifdef LINUX" :-(
1996-05-02 10:41:18 +00:00
Poul-Henning Kamp
a8c5fef5e6 KGDB is dead. It may come back one day if somebody does it. 1996-05-02 09:34:51 +00:00
Bruce Evans
2dafbfcbab Added calibration the i8254 and the i586 clocks agains the RTC at boot
time.  The results are currently ignored unless certain temporary options
are used.

Added sysctls to support reading and writing the clock frequency variables
(not the frequencies themselves).  Writing is supposed to atomically
adjust all related variables.

machdep.c:
Fixed spelling of a function name in a comment so that I can log this
message which should have been with the previous commit.

Initialize `cpu_class' earlier so that it can be used in startrtclock()
instead of in calibrate_cyclecounter() (which no longer exists).

Removed range checking of `cpu'.  It is always initialized to CPU_XXX
so it is less likely to be out of bounds than most variables.

clock.h:
Removed I586_CYCLECTR().  Use rdtsc() instead.

clock.c:
TIMER_FREQ is now a variable timer_freq that defaults to the old value of
TIMER_FREQ.  #define'ing TIMER_FREQ should still work and may be the best
way of setting the frequency.

Calibration involves counting cycles while watching the RTC for one second.
This gives values correct to within (a few ppm) + (the innaccuracy of the
RTC) on my systems.
1996-05-01 08:39:02 +00:00
Bruce Evans
0f99c703ec i386/machdep.c
include/clock.h
isa/clock.c
1996-05-01 08:31:21 +00:00
Jordan K. Hubbard
5e26fb6fdf Include <sys/buf.h> so that this does't blow up with B_WRITE undefined.
I fully updated my src tree and did a `make includes' in /usr/src before
trying this fix, so I can only presume that Bruce missed something.
1996-05-01 06:31:18 +00:00
Bruce Evans
119bc2cc9b Oops, restored existent option LINUX. It is used at config-time. 1996-05-01 05:04:38 +00:00
Bruce Evans
b1d3d2ffcf Fixed a race that caused panics in kernel printfs when the screen timeout
routine changed the screen pointers while output was in progress.
1996-05-01 03:58:21 +00:00
Bruce Evans
eabe0f9f57 Don't return unused values in cpu_switch() or savectx().
Don't preserve unused registers in the NPX case in savectx().
1996-05-01 03:47:04 +00:00
Bruce Evans
3722e90e21 Removed unused #include. 1996-05-01 03:32:46 +00:00
Bruce Evans
7c243b9add Removed nonexistent option "LINUX" (what's that :-). 1996-05-01 03:30:04 +00:00
Bruce Evans
2c703b3e86 Only disable sio3 by default. 1996-05-01 03:26:58 +00:00
Bruce Evans
a794e791c8 Removed unnecessary #includes from <sys/imgact.h> so that it is
self-sufficient and added explicit #includes where required.
1996-05-01 02:43:13 +00:00
Bruce Evans
e506fdf557 Oops, this should have been with the ctype changes.
Fixed longstanding namespace convolution involving rune_t vs wchar_t...

This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions.  Ports of gcc should avoid using the
gcc headers.
1996-05-01 00:47:05 +00:00
Bruce Evans
494908b12c Fixed timeouts. I broke them in rev.1.17 for the FORCE_COMCONSOLE and
(interactively set RB_SERIAL) && BOOTWAIT (serial i/o) cases.
1996-04-30 23:43:25 +00:00
Stefan Eßer
e20df7fc31 Make pcibus_check() ignore Device/Vendor IDs of all 0. 1996-04-30 21:37:21 +00:00
Poul-Henning Kamp
68c1eb1215 pte.h: Add the VADDR(pdi,pti) macro to construct virtual address from
page dir+table index.
pmap.h: remove NUPDE, it was wrong and not used.  Sanitize KSTKPTEOFF.
vmparam.h: Calculate virtual addr from PDI+PTI from pmap.h rather than
using magic math.  Remove UPDT, not used.
1996-04-30 12:02:12 +00:00
Poul-Henning Kamp
d783aa7bc3 Remove a spurious mapping that was introduced earlier. 1996-04-30 11:58:56 +00:00
Julian Elischer
6ebe2436ab slight re-ordering to allow the qcam to compile with devfs enabled. 1996-04-29 20:05:52 +00:00
Jordan K. Hubbard
9773398d95 Add ATAPI_STATIC so that the ATAPI cdroms work correctly again
under -current.
Submitted-By: Serge Vakulenko <vak@cronyx.ru>
1996-04-29 20:03:41 +00:00
Justin T. Gibbs
a515c85818 Fix the abort code in the BUS DEVICE RESET case. Needed to set cmdlen to 0.
Ensure that queued commands are not touched by the abort code by setting
the SCB status to indicate what queue it is in.

Fix deadlocks when using SCB paging by using SCBs from the assigned_scbs
queue or an SCB that completed during the same interrupt if needed.

Don't ever use insl to pull SCBs from any of the controllers.  You can
only do 8bit PIO reads.  This only affected SCB paging.

With this checkin, SCB paging works quite a bit better, but I still have
some problems with it that may be caused by a firmware problem in my
PD1800s.  It seems that using a tag number higher than the maximum number
of tags allowed by the device, confuses it.  For example, if I queue
two commands, tagged 3 and 36, it never reconnects for tag 36.
1996-04-28 19:21:20 +00:00
Poul-Henning Kamp
3e86a2edb8 Fix some bugs I introduced and some old ones as well.
Add BDE_DEBUGGER back.
Improve quality of comments.
Thanks Bruce!

Reviewed by:	phk
Submitted by:	bde
1996-04-28 07:14:05 +00:00
Joerg Wunsch
d5d7648201 Make install' depend on kernel'. Some idiot tried to install a
non-built kernel and complained in Usenet... :-)
1996-04-27 07:30:49 +00:00
Bruce Evans
f4c626074b Fixed a bug introoduced in the previous change. ISA device memory was
mapped to semi-random place(s) depending on the content(s) of physical
address 0xA0000.  This was fatal at least on my system with a some
memory-mapped devices.  Console syscons somehow wasn't affected.  It
bogusly hardcodes the address.  Sigh.
1996-04-26 22:26:45 +00:00
Poul-Henning Kamp
1a0e8e31c6 A significant debogofication of locore.s. I havn't found any actualy
bugs, but it is a lot easier to navigate this twisted code now.
1996-04-26 13:47:39 +00:00
Søren Schmidt
03475c250b Removed options MAXCONS & HARDFONT, they are no longer in use
(and havn't been for long, sigh)
1996-04-26 06:45:41 +00:00
Poul-Henning Kamp
68832d3037 Fix cpu_fork for real.
Suggested by:	 bde
1996-04-25 06:20:19 +00:00
Nate Williams
2922666380 - This code adds some backwards compatability hacks for buggy APM BIOS
implementations, and synchronizes us with the Nomad's latest code.

This code is based on the Nomad code, but heavily hacked by me.

Reviewed by:	phk
Submitted by:	the 'Nomads'
1996-04-23 19:59:14 +00:00
Nate Williams
e12ac36c96 Format the already applied PCCARD additions to use KNF form. No
functional changes.
1996-04-23 18:36:56 +00:00
Nate Williams
ceff12b4c4 Adds the APM hooks into the generic pccard kernel files. With this code
in place device drivers can now register power-down/power-up routines so
that we can use common routines to power-up/power-down cards for
insert/removals, suspend/resume, etc..

Reviewed by:	phk
Submitted by:	the 'Nomads'
1996-04-23 16:03:08 +00:00
Justin T. Gibbs
c0eccc00c8 Fix second instance of the inb type when getting the current sequencer address.
Submitted by:	Nate Williams <nate@sri.MT.net>
1996-04-23 04:47:02 +00:00
Justin T. Gibbs
ff3f23849e Fix a typo in the RESTART_SEQUENCER macro that could have caused
strange results.  This  bug has been in here for a loooong time.
Many thanks to Pedro Salenbauch for finding this.

Submitted by:	pedrosal@nce.ufrj.br (Pedro Salenbauch)
1996-04-23 04:22:41 +00:00
Nate Williams
b34b86510b Updated the laptop 'kludge' file. Hopefully this can go away soon.
Submitted by:	The 'Nomads'
1996-04-22 22:29:40 +00:00
Nate Williams
e597b4972e - add apm to the GENERIC kernel (disabled by default), and add some comments
regarding apm to LINT
- Disabled the statistics clock on machines which have an APM BIOS and
  have the options "APM_BROKEN_STATCLOCK" enabled (which is default
  in GENERIC now)
- move around some of the code in clock.c dealing with the rtc to make
  it more obvios the effects of disabling the statistics clock

Reviewed by:	bde
1996-04-22 19:40:28 +00:00
Justin T. Gibbs
91e2481238 The default number of tags in the SCB paging case was supposed to be
8 not the 18 I was using during some of my own testing.  Ooops.

For those that want to change the number for experimentation, you can
set the value on line 1553 of this file.
1996-04-22 13:21:40 +00:00
John Dyson
7847cec1b7 This fixes a troubling oversight in some of the pmap code enhancements.
One of the manifiestations of the problem includes the -4 RSS problem
in ps.

Reviewed by: dyson
Submitted by: Stephen McKay <syssgm@devetir.qld.gov.au>
1996-04-22 05:23:08 +00:00
Justin T. Gibbs
102d19a473 Implement SCB paging which allows up to 255 active commands on aic7770
(Rev E or greater), aic7850, aic7860, aic7870, and aic7880 controllers.
SCB paging is enabled with the option "AHC_SCBPAGING_ENABLE".  Full
comments on the algorithm are at the top of i386/scsi/aic7xxx.c.

options "AHC_TAGENABLE" and "AHC_QUEUE_FULL" have been removed.  The
default is 4 tags without SCB paging, 8 with.

Clear the SCSIRSTI bit after throwing a bus reset.  Some cards seem to get
confused otherwise.

Handle SCSIRSTI interrupts before checking to see if there is a valid
SCB in use since this can happen. (Clears PR# i386/1123)

Clean up the way we determine the number of SCBs on the card
(courtesy of Dan Eischen).

Guard against attempts to negotiate wide to a narrow controller.

Fix some comments.

Update my copyrights.
1996-04-20 21:29:27 +00:00
Justin T. Gibbs
1d7ded8adf Change the devconf description from "ISA or EISA bus" to "ISA bus" now
that we have eisaconf.
1996-04-20 21:22:32 +00:00
Justin T. Gibbs
035de5ccf1 Turn on SCB paging for aic7770 chips rev E or greater.
Update my copyrights.
1996-04-20 21:21:50 +00:00
Poul-Henning Kamp
6f1e6c97de savectx returns through cpu_switch in case of the child, so it must
return void just like cpu_switch.  Fix prototype and usage from machdep.c
1996-04-19 07:28:04 +00:00
Poul-Henning Kamp
6523110494 Whoops, shouldn't really have been here, but what the heck: remove some
stale comments.
1996-04-18 21:37:43 +00:00
Poul-Henning Kamp
7d2392141d Fix a bogon. cpu_fork & savectx ecpected cpu_switch to restore %eax,
they shouldn't.
1996-04-18 21:34:53 +00:00
Nate Williams
d94b029324 - Save/restore the FS data segment.
Reviewed by:	bde
1996-04-18 19:22:59 +00:00
Nate Williams
ff35cfa1f0 - Addition of my name to the APM Copyright
- More code cleanups
- #ifdef DEBUG debugging code
- More consistant printfs
- Better handling of the apm_int() assembly code (mostly from Bruce Evans)

Reviewed by:	bde
1996-04-18 19:21:47 +00:00
Garrett Wollman
97f588a78b Add an inline function to compute the common-case IP header checksum. 1996-04-18 15:39:27 +00:00
Nate Williams
6bb76283e0 Added a disabled psm0 (PS/2) mouse device, using the new 'disable'
keyword.
1996-04-18 04:02:30 +00:00
Paul Traina
4f789210dc Support FreeBSD v2.1 1996-04-17 09:37:17 +00:00
Paul Traina
60b0febdbf Add in linux support for the quickcam driver bottom half and
add a new "invasive camera scan" option for folks who have weird
cameras or weird parallel ports.
1996-04-17 09:00:53 +00:00
Poul-Henning Kamp
3fc8f9c5af Now that I have started to use netboot, I see what is missing...
Load symbols and set boot args more nicely.
1996-04-14 09:54:14 +00:00