Commit Graph

4474 Commits

Author SHA1 Message Date
jmg
463ee6273f remove redudant decls from this header file (used for 2.2.x compat) 1997-09-15 07:34:49 +00:00
jmg
130c7bee5c add some preprocessor lines to prevent both controler snd0 and
device pcm0 from being loaded into the kernel at the same time.  As
this generates compilation errors, I just error out.

Requested-by: Jordan
1997-09-15 06:35:13 +00:00
jmg
4a126fdd34 docment the new sound drivers in LINT and add the necessary files to
files.i386.

We aren't sure if this new code and the old sound code will co-exist in a
kernel, so the device pcm0 line is left commented out in LINT.

Submitted-by:	Luigi Rizzo
1997-09-14 21:45:05 +00:00
jmg
64076aad20 This commit was generated by cvs2svn to compensate for changes in r29415,
which included commits to RCS files with non-trunk default branches.
1997-09-14 21:42:12 +00:00
jmg
d77c6d8be9 Import of Luigi Rizzo's sound code. For more information about the driver
check out the README that is included.

Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1997-09-14 21:42:12 +00:00
joerg
e7c3d728c1 Fix the broken VT_WAITACTIVE ioctl for the case where the third arg
was 0.

PR:		4164
Submitted by:	Joe Traister <traister@mojozone.org>

While i was at it, also fixed a broken return value for the VT_RELDISP
ioctl, iff the third arg was legally VT_TRUE, but the destination
screen was in process mode so the actual switch had to be deferred.
This was breaking the ability to directly toggle between two X servers
running on two VTs, since the server getting the bogus error return
was running wild, and competing with the other one for the hardware.
(Sigh, this was a very long-standing bug.)
1997-09-14 19:01:01 +00:00
joerg
3c44379082 Addf flags 0x10 to the sio0 line, so it is available as a potential
console.  This features backwards-compatibility to the era when sio(4)
was always available for a console.
1997-09-14 18:57:01 +00:00
peter
1425e326d1 Bruce wants the warning. 1997-09-14 11:28:30 +00:00
peter
796eb5ce0a Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
peter
e762286917 Update select -> poll.
I am not particularly happy with this stuff, I have no way to test it.
1997-09-14 03:12:54 +00:00
joerg
5167b81f67 Revert the logic behind my last change, and use a function called
`is_physical_memory()' now for the decision whether to dump some
region of memory or not.

Suggested by:	davidg
1997-09-13 16:12:15 +00:00
peter
bc0f53c63a Patch up some more undefined symbols when compiling under ELF. 1997-09-13 16:00:30 +00:00
peter
0de5b6fcc3 Fix a warning. 1997-09-13 15:28:30 +00:00
msmith
3502721d04 Support Intel EtherExpress Pro 10+
PR:		kern/4335
Reviewed by:	Stephen Roznowski (sjr@home.net)
1997-09-12 08:30:57 +00:00
joerg
adb1bbd53f Do not ever try to coredump adapter memory regions.
PR:		4486
Submitted by:	tegge@idi.ntnu.no (Tor Egge)

Implement a function is_adapter_memory() in order to determine what
should nto be dumped at all.  Currently, only populated with the ``ISA
memory hole''.  Adapter regions of other busses should be added.
1997-09-10 12:31:40 +00:00
peter
85d28c393b Allow a compile-time override of the ipfw deny rule. For a 'firewall'
you don't want this (and the documentation explains why), but if you
use ipfw as an as-needed casual filter as needed which normally runs as
'allow all' then having the kernel and /sbin/ipfw get out of sync is a
*MAJOR* pain in the behind.

PR: 4141
Submitted by: Heikki Suonsivu <hsu@mail.clinet.fi>
1997-09-10 03:07:14 +00:00
dg
50b6c84d88 Change the address for the low end of what we permit from c0000 down
to a0000 so that people can put their cards in the middle of their
video memory if they want. :-)
1997-09-10 00:17:39 +00:00
jmg
5fdad78cd7 add neccessary calls to autoconf for pnp,
also teach userconfig about the new pnp commands, for usage see pnp(4)
1997-09-09 12:48:59 +00:00
jmg
6eb185adfd add pnp device entries... 1997-09-09 12:40:54 +00:00
jmg
28e7896b8d add the plug-and-play code into current...
This code has been submitted by Luigi Rizzo <luigi@labinfo.iet.unipi.it>,
based on work done by Sujal Patel.

This currnetly doesn't provide the ability to register the port address
of PnP cards assigned a PnP driver.  As there aren't any PnP capible
drivers yet, this isn't much of a problem.

The code allows you, through USERCONFIG, configure what the cards port
bases, irqs, and dma's are like.  Currently there isn't support to view
what cards are in the sytem.

It successfully configures my PnP Internal Modem and sio then sees the
card as a normal isa device.

man page will be committed shortly.

Approved-by: jkh
Submitted-by: Luigi Rizzo
1997-09-09 12:31:58 +00:00
markm
93f4eda975 Amancio's latest in the Brooktree driver.
This fixes the european frequency set, separates this further from the
Meteor driver and fixes bugs.
1997-09-09 06:32:32 +00:00
dg
224a34b929 Added a check for the ISA memory address range being valid. Fixes PR#835. 1997-09-08 20:00:21 +00:00
dg
4fcbd35c01 Turn on the 0WS option for 16bit cards. Newer machines insert enough
delay that without this the performance is unacceptable. The 83C690,
83C790, and 83C795 chips which this affects are all designed to work
with 0 waitstates in 16bit mode.
Also cleaned up the toggling of 16bit access mode that occurs during
normal operation; the previous code may not have done the right thing
in all cases.
1997-09-08 10:27:09 +00:00
peter
9a9d679136 Change an assemble-time divide into a shift. Under binutils-2.8 gas in elf
mode, the slash is a comment leader, while under non-elf it is a divide
symbol (what a concept! :-).  Theoretically, #APP/#NO_APP can change this
but that doesn't seem to mesh too well with macros and line continuation.
1997-09-08 06:40:58 +00:00
peter
12f8b6b6e0 Add missing redirection for _inside_intr -> inside_intr 1997-09-08 00:25:05 +00:00
fsmp
40ee6d06ee DISABLE LEVEL_3 lock pushdown, somethings seems to have broken! 1997-09-07 23:06:15 +00:00
fsmp
877f33cf60 General cleanup of the lock pushdown code. They are grouped and enabled
from machine/smptests.h:

#define PUSHDOWN_LEVEL_1
#define PUSHDOWN_LEVEL_2
#define PUSHDOWN_LEVEL_3
#define PUSHDOWN_LEVEL_4_NOT
1997-09-07 22:04:09 +00:00
bde
996bf127fa Removed more vestiges of config-time swap configuration. 1997-09-07 12:56:46 +00:00
bde
4b54cb94d2 Include kernel.h instead of declaring "extern int hz". 1997-09-07 04:21:25 +00:00
dyson
27851d5ce5 Fix an intermittent problem during SMP code operation. Not all of the
idle page table directories for all of the processors was being updated
during kernel grow operations.  The problem appears to be gone now.
1997-09-07 01:15:13 +00:00
helbig
a393c20700 Enable A law encoding.
Enable A law encoding.
1997-09-06 17:39:06 +00:00
helbig
d6857e351e Enable A law encoding. 1997-09-06 17:38:29 +00:00
peter
494026a5bc Argh, what was I thinking?? Don't (yet) halt the CPU in the idle loop
while waiting for an interrupt (rather than spinning on the runqueue status
bits), since the other cpu can put stuff in there and the sleeping cpu may
not get an interrupt for a while.  When we have a reschedule IPI, this can
come back.

Pointed out by: fsmp
1997-09-05 17:54:07 +00:00
peter
1428bb8823 Cosmetic adjustment for the trap/double fault/panic cpu id listing.
It now prints the apic id in hex rather than decimal.
1997-09-05 08:54:55 +00:00
peter
eaafbd1c67 Add redirection for new _clock_lock symbol 1997-09-05 08:47:24 +00:00
yokota
afe8f13f61 Add a new compile option SC_HISTORY_SIZE for syscons. 1997-09-04 23:03:11 +00:00
yokota
ec0b9f839d Add a new compile option SC_HISTORY_SIZE to specify the history buffer
size in terms of lines (instead of bytes).  When changing video mode
in ioctl SW_XXX commands, syscons checks scp->history_size and
allocate a history buffer at least as large as the new screen size.
(This was unnecessary before, because HISTORY_SIZE was as large as 100
lines and this is bigger than the maximum screen size: 60 lines).
Similar adjustment is done in ioctl CONS_HISTORY command too.

PR: kern/4169
Reviewed by: sos
1997-09-04 23:01:06 +00:00
sos
4d6dd4fc2d Upgrade of EIDE DMA support, Johns comments:
* lots of fixes to error handling-- mostly works now
* improve DMA timing config for Triton chipsets-- PIIX4 and UDMA drive
  still untested
* generally improve DMA config in many ways-- mostly cleanup
* clean up boot-time messages
* rewrite PRD generation algorithm
* first wd timeout is now longer, to handle drive spinup

Submitted by: John Hood <cgull@smoke.marlboro.vt.us>
1997-09-04 18:49:53 +00:00
dg
a334d7c623 Cosmetic change to last commit: speculative_mtest -> speculative_mprobe. 1997-09-04 15:23:33 +00:00
dg
264ffbc6e5 Changed the memory sizing code so that if the following conditions
are met:

1) The BIOS indicates that there is exactly 64MB of RAM, and
2) The memory size isn't specified with the MAXMEM option or
   the npx0 msize hack,

   ...then do a speculative memory probe beyond the 64MB's until the
first bad page is encountered. This is an admitted hack, but should
nonetheless deal with detecting the correct amount of memory in nearly
all of the modern systems with >64MB of RAM.
Also made a change that will cause the list of detected memory chunks
to be printed if bootverbose is set.
1997-09-04 15:14:48 +00:00
kato
d6853bffcf Always defines macros for PC-98 display. 1997-09-04 09:05:17 +00:00
jkh
077b1695bb Correct ancient spelling bogon. 1997-09-04 09:01:07 +00:00
sos
accad57101 1) Changed the volume to be a little louder.
2) Added a non_blocking flag to the write routine.
 3) Added a 3rd buffer (actually a ring buffer would be better)

Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
1997-09-03 19:08:05 +00:00
gibbs
a3da742b72 Make the aic7xxx sequencer assembler compile in the kernel's object
directory.  Rename (via repository copy) some files so that the potential
for future conflicts is minimized.

PR: conf/4363
1997-09-03 03:44:58 +00:00
bde
2ee142dce3 Cleaned up revs 1.36-1.40 (mainly disordered declarations, non-bogus
indentation (it is supposed to be bogus to match sio.c), and long lines).
1997-09-03 01:50:24 +00:00
bde
6ffb8bf9af Removed unused #includes. 1997-09-02 20:06:59 +00:00
fsmp
cdf6bbae17 Removed the "globl" nature of the vec array. This was left over from the
time when icu.s was common between UP and SMP.  It is not necessary for UP
and thus can be removed from icu_ipl.s.
1997-09-02 19:40:13 +00:00
bde
a6e315b69d Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
1997-09-02 01:19:47 +00:00
fsmp
e771ecca0f General cleanup of the sub-system locking macros.
Eliminated the RECURSIVE_MPINTRLOCK.
clock.c and microtime use clock_lock.
sio.c and cy.c use com_lock.

Suggestions by:	Bruce Evans <bde@zeta.org.au>
1997-09-01 07:45:37 +00:00
fsmp
c9f24c9fd2 Cleanup. 1997-09-01 07:31:54 +00:00
bde
be13855b37 Removed unused #includes (<machine/cpu.h> now gives more pollution). 1997-09-01 02:12:39 +00:00
bde
4f873bc427 Removed unused #includes. 1997-09-01 02:08:42 +00:00
bde
3d8f1db131 Fixed absolute pathnames in #includes. 1997-09-01 01:57:27 +00:00
bde
b5c24bb113 Move closer to supporting VM86 under SMP.
LINT now compiles but doesn't link.  Other link-time breakage for LINT
is now visible (SMP is incompatible with SIMPLELOCK_DEBUG).
Submitted by:	jlemon
1997-09-01 01:54:52 +00:00
bde
af20ce1c06 Removed unused #includes. 1997-09-01 01:12:53 +00:00
bde
31192fc056 Fixed options SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME which were broken
by incomplete cutting and pasting from machdep.c to kern_shutdown.c.

PR:		3953
1997-08-31 23:08:38 +00:00
bde
b217a31a96 Put I*86_CPU options in opt_global.h and don't #include "opt_cpu.h"
centrally.
1997-08-31 22:43:46 +00:00
phk
2fd4aa4ddf Remove pbzero(), things we load zero their own bss.
Make VESA_SUPPORT default
1997-08-31 06:11:26 +00:00
fsmp
53cd3a6e28 Debug version of simple_lock. This will store the CPU id of the
holding CPU along with the lock.  When a CPU fails to get the lock
it compares its own id to the holder id.  If they are the same it
panic()s, as simple locks are binary, and this would cause a deadlock.

Controlled by smptests.h: SL_DEBUG, ON by default.

Some minor cleanup.
1997-08-31 03:17:48 +00:00
fsmp
92287f9b58 Created a private simple_lock to control accesses to com data structs
and hardware.
There is now another simple_lock around clock data/hardware accesses in
clock.c and microtime.s.  It is my belief that this is the only area
sio/cy might stumble into during an unblocked INTerrupt.  Thus I separated
the sio/cy code from the generic disable_intr()/enable_intr() routines.

Controlled by smptests.h: USE_COMLOCK, ON by default.
1997-08-31 03:17:18 +00:00
fsmp
58f19e591b Added clock_lock protection to microtime. 1997-08-30 19:02:56 +00:00
peter
b724085a66 Define some machine characteristics using symbol naming on conventions
in place in the other BSD's.
1997-08-30 18:59:48 +00:00
peter
fd47342b00 Update to include recently added names that are shared between the C and
asm parts of the kernel.  This is to re-enable ELF compile support.
1997-08-30 11:20:02 +00:00
fsmp
e2310cdbcf Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.

Help from:	Bruce Evans <bde@zeta.org.au>
1997-08-30 08:08:10 +00:00
kato
cca63e4f09 Move MACHINE_ARCH definition from <machine/param.h> to <machine/cpu.h>.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-08-30 02:52:04 +00:00
fsmp
13fe237edc Support for the new FAST_HI algorithm, enabled.
Preliminary support for the INTR_SIMPLELOCK algorithm, disabled.
Note that this code is NOT ready.
1997-08-29 18:45:23 +00:00
fsmp
cf2671c51e Support for the new FAST_HI algorithm.
Improved interrupt handling, fewer silo overflows.

With help from:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-29 18:16:18 +00:00
fsmp
34c1430d68 Introduce FAST_HI option, ON by default.
This options allows a CPU that is blocked spinning for the giant lock
to process FAST_INTR() ISRs, eg. siointr().
1997-08-29 17:58:30 +00:00
kato
9e55a6cbb3 Use correct member of scsi_cint for scbus. Add a space between lun
and flags.

Reviewed by:	kato
Submitted by:	Chiharu Shibata <chi@rd.njk.co.jp>
1997-08-29 14:47:31 +00:00
kato
cb17d7ed2c Fix typo in the comment introduced by me. 1997-08-29 11:01:14 +00:00
kato
e896c0bacb Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc"
on IBM-PC box and is "pc-98" on NEC PC-98 box.  Userland program can
distinguish architecture on which the program runs.
1997-08-29 09:03:40 +00:00
jkh
3a22d79f32 Patch for 3.0: #include <sys/fcntl.h> instead of <sys/ioctl.h> 1997-08-28 15:23:10 +00:00
jlemon
ea696ab64a Document the VM86 option.
Reminded-by:	John-Mark Gurney
1997-08-28 15:00:05 +00:00
jlemon
ada62b471a Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file.  The LKM was really for
development, and has probably outlived its usefulness.
1997-08-28 14:36:56 +00:00
jkh
9fba0a500f ISA driver for Comtrol Rocketport serial cards. No PCI probe stub
was submitted to me.
Submitted by:	Amir Farah <amir@comtrol.com>
1997-08-28 12:19:05 +00:00
jkh
d65a45c2bd Add entries for Comtrol Rocketport serial card.
Submitted by:	Amir Farah <amir@comtrol.com>
1997-08-28 12:18:09 +00:00
kato
2d3c4989ab Moved include files which are independent of bs driver. 1997-08-28 09:23:57 +00:00
msmith
4b9ff0e3e3 Add prototype for isa_dmastop() 1997-08-28 03:37:46 +00:00
msmith
4561d606a5 Here is a patch to alleviate the current problem with the dma interface
and the sound driver which uses auto dma.

The  dma interface functionality remains however it now checks
to see if a dma is operating in auto dma mode and if so it bypasses
the busy flag check . I have modified the sound driver 3.5  to
adjust for this new behavior and tested it under FreeBSD 3.0 -current

This patch also includes the new function isa_dmastop.

Submitted by:	Amancio Hasty <hasty@rah.star-gate.com>
1997-08-28 03:36:40 +00:00
peter
3df4daaa03 Correct some things I forgot about until it was too late with smp_active.
smp_active = 1 used to indicate that the system had frozen previously
started AP's, while smp_active = 0 was "AP's not yet started".  I have split
this into smp_started (which is set when the AP's come online), and
smp_active is left for turning on/off AP scheduling.
1997-08-26 18:36:15 +00:00
peter
7dfe3e5abe Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been
revived (cpu's halt now with nothing to do).
- Some preliminary support for running some operations outside the
global lock (eg: zeroing "free but not yet zeroed pages") is present
but appears to cause problems.  Off by default.
- the smp_active sysctl now behaves differently. It's merely a 'true/false'
option.  Setting smp_active to zero causes the AP's to halt in the idle
loop and stop scheduling processes.
- bootstrap is a lot safer.  Instead of sharing a statically compiled in
stack a number of times (which has caused lots of problems) and then
abandoning it, we use the idle context to boot the AP's directly.  This
should help >2 cpu support since the bootlock stuff was in doubt.
- print physical apic id in traps.. helps identify private pages getting
out of sync.  (You don't want to know how much hair I tore out with this!)

More cleanup to follow, this is more of a checkpoint than a
'finished' thing.
1997-08-26 18:10:38 +00:00
bde
9fb61aa49b Don't depend on the gcc feature of permitting conditional expressions
with only one void operand.
1997-08-25 23:45:50 +00:00
bde
04b5795c64 Fixed misplaced declaration. 1997-08-25 23:41:39 +00:00
bde
ec670fd1e0 Minor formatting and style fixes. 1997-08-25 23:36:23 +00:00
bde
a0f9d8afb0 Fixed pedantic syntax error (trailing comma in enum). 1997-08-25 23:31:05 +00:00
bde
a959c46ad4 Removed more abuses of timeout_func_t. 1997-08-25 23:28:58 +00:00
bde
2d311d905e Removed unused misplaced definition of TIMER_FREQ.
Use less-magic numbers in the definition of HISTORY_SIZE.
1997-08-25 23:21:55 +00:00
bde
9912dd8f10 Fixed reversed arguments and poor formatting and comments for OUT*.
The reversals were doubled except in comments so there was no problem
at runtime.
1997-08-25 23:17:33 +00:00
bde
ae8b1527fd Fixed some not-so-recently broken indentation.
Fixed pedantic syntax error (trailing comma in enum).
1997-08-25 23:06:29 +00:00
bde
787955a8c7 Fixed some not-so-recently broken indentation.
Fixed pedantic syntax error (trailing comma in enum).
1997-08-25 22:58:29 +00:00
bde
fbc4f096cf Check for irq conflicts even if conflicts are allowed. Conflicting
irqs can't work (at best, the first one attached wins).  It used to
be necessary to skip this check because of bogus irqs in the sound
drivers, but the sound drivers have been fixed, except possibly the
OSS ones.
1997-08-25 22:52:59 +00:00
bde
5fcc0d3d40 Fixed type mismatch for a (low quality interface) function with an
arg of type u_short (just write the function in ANSI C like most
other functions in this file instead of fixing the interface or
depending on a gcc feature).
1997-08-25 22:34:25 +00:00
bde
cb45fbaef8 Police 4.4Lite #include style. 1997-08-25 22:28:57 +00:00
bde
6689231c95 Fixed type mismatch for a (low quality interface) function with an arg
of type u_char (break K&R support instead of fixing the interface or
depending on a gcc feature).
1997-08-25 22:23:46 +00:00
bde
c978fb3652 Fixed type mismatches for functions with args of type vm_prot_t and/or
vm_inherit_t.  These types are smaller than ints, so the prototypes
should have used the promoted type (int) to match the old-style function
definitions.  They use just vm_prot_t and/or vm_inherit_t.  This depends
on gcc features to work.  I fixed the definitions since this is easiest.
The correct fix may be to change the small types to u_int, to optimize
for time instead of space.
1997-08-25 22:15:31 +00:00
bde
df4046c530 Added an XXX comment. 1997-08-25 22:02:22 +00:00
bde
e2a5c6ab8a Removed an unused variable. 1997-08-25 21:57:55 +00:00
bde
fa81fa1958 Fixed a pedantic syntax error (case labels without a statement). 1997-08-25 21:56:23 +00:00
bde
7eca67951d Finished (?) support for DISABLE_PSE option. 2-3MB of kernel vm was sometimes
wasted.

Fixed type mismatches for functions with vm_prot_t's as args.  vm_prot_t
is u_char, so the prototypes should have used promoteof(u_char) to match
the old-style function definitions.  They use just vm_prot_t.  This depends
on gcc features to work.  I fixed the definitions since this is easiest.
The correct fix may be to change vm_prot_t to u_int, to optimize for time
instead of space.

Removed a stale comment.
1997-08-25 21:53:01 +00:00
bde
0d4dc945cd Removed a tautological comment. 1997-08-25 21:31:38 +00:00
bde
981e4ccd4f Removed a bogus comment. 1997-08-25 21:28:08 +00:00
fsmp
73a3ddd3af Eliminate the blocking of INTs while spinning for the safe simplelock. 1997-08-25 21:02:59 +00:00
peter
e063258819 s/.align/.p2align/ so that we get the same results when building elf
objects (the tools are a bit better)
1997-08-25 10:57:38 +00:00
fsmp
30f7c30078 A clean fix for the spl "deadlock before smp_active" problem.
Added a new variable, 'bsp_apic_ready', which is set as soon as the bootstrap
CPU has initialized its local APIC.  Conditionalize the GENSPLR functions
to call ss_lock ONLY after bsp_apic_ready is TRUE;  This should prevent
any problems with races between the time the 1st AP becomes ready and the
time smp_active is set.
1997-08-24 20:33:32 +00:00
fsmp
465fd5fe19 Fix a deadlock caused by one of the spl functions being called before
ss_lock() can run.

Noticed by:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-24 17:26:37 +00:00
fsmp
618ef60cbd The last of the encapsolation of cpl/spl/ipending things into a critical
region protected by the simplelock 'cpl_lock'.

Notes:

 - this code is currently controlled on a section by section basis with
   defines in machine/param.h.  All sections are currently enabled.

 - this code is not as clean as I would like, but that can wait till later.

 - the "giant lock" still surrounds most instances of this "cpl region".
   I still have to do the code that arbitrates setting cpl between the
   top and bottom halves of the kernel.

 - the possibility of deadlock exists, I am committing the code at this
   point so as to exercise it and detect any such cases B4 the "giant lock"
   is removed.
1997-08-24 00:05:37 +00:00
steve
c75d58a28c Remove extraneous init parameter.
PR:		kern/3595
Submitted by:	Chiharu Shibata <chi@rd.njk.co.jp>
1997-08-23 23:38:12 +00:00
gibbs
364b063170 Change restart_sequencer to be more robust by performing an explicit
pause before attempting to reset the sequencer address.  Remove the
loop checking to see if the address has gone to zero since it is
unnecessary

Adjust the abort SCB timeouts back up to 2 seconds where they should
be.

Fix an oversight in the removal of the bus reset settle code where
we might not run the queue of completed commands.

Remove an unecessary call to ahc_run_done_queue in ahc_reset_current_bus.

Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-08-21 21:23:21 +00:00
bde
6be005551f #include <machine/limits.h> explicitly in the few places that it is required. 1997-08-21 20:33:42 +00:00
bde
9b3b0bd641 Staticized. 1997-08-21 19:56:40 +00:00
bde
9ab18fdc9b Police 4.4Lite #include style. 1997-08-21 19:55:49 +00:00
bde
35caaa5c56 Removed unused definition. 1997-08-21 19:46:13 +00:00
fsmp
b4679bb701 Get le_intr decl from sys/conf.h 1997-08-21 09:01:00 +00:00
fsmp
336363fe28 Forward declaration for the intr routine, avoids compiler warning. 1997-08-21 07:55:10 +00:00
fsmp
e657c8ade4 Add several casts and include several header files to eliminate compiler
warnings.
1997-08-21 07:36:44 +00:00
charnier
ec0491b457 Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.
1997-08-21 06:33:04 +00:00
fsmp
7511b8f464 Fixed a warning about undefined isa_irq_pending(). (UP kernel only) 1997-08-21 06:16:12 +00:00
fsmp
21623b13bc Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h. 1997-08-21 05:47:25 +00:00
fsmp
b66d5dcfc9 Another boo-boo, this file defines cil. 1997-08-21 05:19:26 +00:00
fsmp
268e6cc2d8 Oops, this should have been in last commit.
Adds variable cil: current INTerrupt level.  This is part of the new
MP-safe spl algorithm.
1997-08-21 05:15:08 +00:00
fsmp
50236db533 Made PEND_INTS default.
Made NEW_STRATEGY default.
Removed misc. old cruft.

Centralized simple locks into mp_machdep.c
Centralized simple lock macros into param.h

More cleanup in the direction of making splxx()/cpl MP-safe.
1997-08-21 05:08:25 +00:00
jlemon
f28d374978 Add forward declaration for struct proc. 1997-08-20 19:57:24 +00:00
fsmp
4cabeed7a2 Attempt to make cy.c MP-safe.
I have no way of testing this one, first SMP/cy user please let me know...
It is my belief that sio and cy are the only FAST_INTR() ISRs.  If this
is a bad assumption please educate me.
1997-08-20 06:16:44 +00:00
fsmp
2c414e3eff Preperation for moving cpl into critical region access.
Several new fine-grained locks.
New FAST_INTR() methods:
 - separate simplelock for FAST_INTR, no more giant lock.
 - FAST_INTR()s no longer checks ipending on way out of ISR.
sio made MP-safe (I hope).
1997-08-20 05:25:48 +00:00
fsmp
ea72b8e976 Preperation for moving cpl into critical region access.
Several new fine-grained locks.
Control of new FAST_INTR() methods.
1997-08-20 05:22:33 +00:00
peter
2cd1f98ac0 Mention PPP_DEFLATE and PPP_BSDCOMP for kernel ppp. 1997-08-19 17:11:35 +00:00
charnier
e0224667fe Use CS_SECURE macro.
Reviewed by:	John Dyson
1997-08-18 06:58:59 +00:00
fsmp
9bfedd3632 Turn on the lockmanager by default for SMP.
Reviewed by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-08-18 05:34:01 +00:00
fsmp
ebd28144e7 Removed volatile from arg to simple_lock & friends. 1997-08-18 03:35:59 +00:00
itojun
8d1042dd0d To handle scsi RESERVATION CONFLICT properly in ahc driver.
Could somebody please update other drivers so that SCSI_RSVD (0x18)
to be handled just like SCSI_BUSY(0x08)?

There's no need for extra state, so we use XS_BUSY for SCSI_RSVD too.

PR:		4257
1997-08-17 14:04:08 +00:00
wollman
4542c1cf5d Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
msmith
7eb858845c Add the 'ppc' ISA-bus parallel-port chipset driver. 1997-08-16 14:19:43 +00:00
msmith
4ff829e377 Assign character major 82 to the 'ppi' Generic Parallel Port I/O device. 1997-08-16 14:15:40 +00:00
msmith
bfa6c5fdb8 Minor ppc_data structure tweak.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-16 14:07:26 +00:00
gibbs
61e13f4498 Remove the bus settle delay after reset code. It could cause an infinite
loop.

Perform a "-Wall" cleanup which actually exposed two real bugs having to
do with operator precedence.
1997-08-15 19:27:43 +00:00
fsmp
79155dd871 The promised "better fix" for "Trap 9 When Boot SMP" problem.
We now tsleep() in kthread_init() between start_init()
and prepare_usermode() while waiting for ALL the idle_loop()
processes to come online.

Debugged & tested by:   "Thomas D. Dean" <tomdean@ix.netcom.com>

Reviewed by:    David Greenman <dg@root.com>
1997-08-15 02:34:32 +00:00
msmith
c1d8a1669b Add support for the new Parallel-Port Bus and devices thereon.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-14 14:03:27 +00:00
msmith
eb517ff1c1 ISA Parallel-Port Bus chipset driver.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-14 14:01:36 +00:00
jkh
e1e1bc61d5 Reserve major 81 for rocketport driver. 1997-08-13 21:01:30 +00:00
gibbs
6bb904da80 Add a spin lock that prevents the sequencer from attempting to add an
entry to the QOUTFIFO when it is full.  This should eliminate the
"Timed out while idle" problems that many have reported.

In truth, this is somewhat of a hack.  Although are interrupt latency is
low enough that we should be able to always service the queue in time,
since each entry must be passed up to the higher SCSI layer for what can
be a large amount of processing (perhaps even resulting in a new command
being queued) with interrupts disabled, we need this mechanism to avoid
overflow.  In the future, these additional tasks will be offloaded to a
software interrupt handler which should make this hack unnecessary.
1997-08-13 17:02:47 +00:00
steve
d9d7463508 Add parentheses because == has higher precedence than &.
PR:		i386/4225
Submitted by:	Frank MacLachlan <fpm@n2.net>
1997-08-13 02:40:06 +00:00
dyson
782a1cf641 Back out a part of the disk scheduling "improvements" :-(. Let me know
how the system works now!!!
1997-08-12 19:07:42 +00:00
jkh
ba6340d330 Make the CLI mode message a little less intimidating.
Suggested by:	Richard Underwood <ru@atticus.com>
1997-08-11 09:44:57 +00:00
fsmp
d89f54f7a3 Oops, fix breakage to UP kernel. 1997-08-10 21:18:01 +00:00
fsmp
ce530fb8fa Added trap specific lock calls: get_fpu_lock, etc.
All resolve to the GIANT_LOCK at this time, it is purely a logical partitioning.
1997-08-10 20:59:07 +00:00
fsmp
f76cbffb97 Cheap fix for kern/4255.
If the problem is seen this fix suggests a compile-time work-around then panics.
1997-08-10 19:32:38 +00:00
sos
30859a202b Ops the arguments to copyin was in the wrong order..
This has survived since the first version, sigh.
1997-08-10 18:15:20 +00:00
fsmp
0204bddf7c Some fixes towards making "default configs" work again.
Still not fixed, no idea why.

Debug help from: "Thomas D. Dean" <tomdean@ix.netcom.com>
1997-08-09 23:01:03 +00:00
fsmp
7ef900f168 Minor conditionalization of XXX_MPLOCK on PEND_INTS. 1997-08-09 22:52:59 +00:00
fsmp
f1ff779398 Added 'lock' instruction before 3 places that update ipending.
This may or may not fix the "high IO freezes SMP kernel" problem.
1997-08-09 19:40:28 +00:00
sos
18323be745 Fix the checks for screenborder for the mousepointer. 1997-08-09 19:24:03 +00:00
dyson
c38957d22b Modify the scheduling policy to take into account disk I/O waits
as chargeable CPU usage.  This should mitigate the problem of processes
doing disk I/O hogging the CPU.  Various users have reported the
problem, and test code shows that the problem should now be gone.
1997-08-09 10:13:32 +00:00
dyson
41b2aba1a3 A couple of missing doscmd header files. Messed up again. Now can
compile the kernel!!!
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
1997-08-09 04:55:05 +00:00
julian
c92a006d04 Teach both disk drivers how to cope with a hardware watchdog
while dumping core.. I'm tired of getting 1/2 of a core-dump

conditional on -DHW_WDOG for now
this will migrate to 2.2 as that's where I need it.
1997-08-09 01:44:25 +00:00
dyson
dede28832b Add the code that represents most of the interface between the VM86
pseudo-machine and the rest of the FreeBSD kernel.
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
1997-08-09 01:38:03 +00:00
dyson
307f2689bf Add VM86 to the options. 1997-08-09 00:19:39 +00:00
dyson
ad0649e2b9 VM86 kernel support.
Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>,
	Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>,
	and probably alot of others.
Submitted by:	Jnathan Lemon <jlemon@americantv.com>
1997-08-09 00:04:06 +00:00
sos
56b351207a Yeah I'm back hacking syscons !!
Add support for MODEX 320x240x256color with "unchained" adressing, giving
access to all 256K on all VGA's, those with that much memory that is :)

Also make sysmouse use the right resolution in graphics modes.
1997-08-08 22:52:30 +00:00
julian
9434cb7524 Make a function static to quieten gcc 1997-08-08 20:29:47 +00:00
julian
0c0b422f31 Clean up the console muting functionality.
this has been in production now for a long time with no known effects.
1997-08-08 20:09:50 +00:00
dyson
7ef841bb28 Fix the DDB breakpoint code when using the 4MB page support. 1997-08-07 05:15:52 +00:00
dyson
85f902e519 More vm_zone cleanup. The sysctl now accounts for items better, and
counts the number of allocations.
1997-08-07 03:52:55 +00:00
peter
5f97c2ec97 printf does not understand %hd in the kernel 1997-08-06 11:08:01 +00:00
dyson
2649bd0b26 Another attempt at cleaning up the new memory allocator. 1997-08-05 22:24:31 +00:00
dyson
55205b3be5 Fix some bugs, document vm_zone better. Add copyright to vm_zone.h. Use
the new zone code in pmap.c so that we can get rid of the ugly ad-hoc
allocations in pmap.c.
1997-08-05 22:07:27 +00:00
msmith
6858b6f47c memcmp -> bmcp
Submitted by:	smp, bde
1997-08-05 01:38:19 +00:00
dyson
fd1644cfb4 Modify pmap to use our new memory allocator. 1997-08-05 01:32:05 +00:00
dyson
eeb48bde1b Slightly reorder some operations so that the main processor gets global
mappings early on.
1997-08-05 01:02:14 +00:00
dyson
8098064f0b Remove the PMAP_PVLIST conditionals in pmap.*, and another unneeded define. 1997-08-05 00:42:01 +00:00
dyson
8fa8ae3d0d Get rid of the ad-hoc memory allocator for vm_map_entries, in lieu of
a simple, clean zone type allocator.  This new allocator will also be
used for machine dependent pmap PV entries.
1997-08-05 00:02:08 +00:00
fsmp
97e0e6be57 pushed down "volatility" of simplelock to actual int inside the struct.
Submitted by:    bde@zeta.org.a
1997-08-04 19:14:56 +00:00
fsmp
315ebe1a90 Added include of intr_machdep.h to eliminate compiler warning for APIC_IO. 1997-08-04 19:12:54 +00:00
fsmp
10b9d7be19 Eliminate frequent silo overflows by restoring the TEST_LOPRIO code.
This code was eliminated when the PEND_INTS algorithm was added.  But it was
discovered that PEND_INTS only worsen latency for FAST_INTR() routines,
which can't be marked pending.

Noticed & debugged by:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-04 17:31:43 +00:00
dyson
b8ed1d9a7f Make the WD code work on my P6DNF running on the SMP code. It appears
that there was an "early" interrupt, and this checks for it.
1997-08-04 05:26:49 +00:00
msmith
eb599a86b6 Nuke the nonexistend pad bytes from the end of the DMI header structure. 1997-08-04 03:31:23 +00:00
msmith
745a5d2533 Correctly checksum the DMI signature structure. Format the BSD revision
number therein.

Report from:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-04 03:29:05 +00:00
msmith
ccc6df16fe Sanitise the Wavelan entries.
Submitted by:	bde
1997-08-02 05:20:14 +00:00
msmith
5123819399 Reinstate some of the previous fixes which were clobbered in r1.6. 1997-08-02 05:19:32 +00:00
msmith
21f15a78ef Support functions for working with x86 PC-architecture BIOS.
Initially functionality is confined to 32-bit BIOS functions, however
it is envisioned that BIOS support may be enlisted for other
activities in the future.
1997-08-01 06:07:13 +00:00
msmith
1e5dfe8d05 Support for PC BIOS functions. 1997-08-01 06:04:59 +00:00
msmith
fc73ff25b0 Add new BIOS-related files. 1997-08-01 06:04:34 +00:00
msmith
6a95d0eb37 Significant bugfix and upgrade for the Wavelan (wl) driver.
This now includes code to handle the 2.4GHz WaveModem-based cards.

Submitted by:	Jim Binkley <jrb@cs.pdx.edu>
1997-08-01 03:36:12 +00:00
msmith
7a640daa96 New defines for the Wavelan (wl) driver.
Submitted by:	Jim Binkley <jrb@cs.pdx.edu>
1997-08-01 03:33:43 +00:00
msmith
4eab4a404b New LINT comments and options for the Wavelan (wl) driver.
Submitted by:	Jim Binkley <jrb@cs.pdx.edu>
1997-08-01 03:33:08 +00:00
fsmp
b816202ef3 Fixed imen alignment.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-07-31 17:28:56 +00:00
fsmp
9627e6a7ed Fixed imen declaration.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-07-31 17:28:20 +00:00
phk
c7c8de5af6 Oops, boot2 got too big. make VESA_SUPPORT nondefault. 1997-07-31 11:30:30 +00:00
phk
6d1ddc2e2d Add support for booting in VESA 0x102 videomode. Corresponding patches to
syscons are being reviewed by sos.
1997-07-31 08:07:54 +00:00
fsmp
d5139f5708 Moved the free case to top of MPgetlock and MPtrylock
Added some lock hit profiling.
1997-07-31 06:06:52 +00:00
fsmp
4fa08df3f6 Converted the TEST_LOPRIO code to default.
Created mplock functions that save/restore NO registers.
Minor cleanup.
1997-07-31 05:43:05 +00:00
fsmp
ae192ba332 Converted the TEST_LOPRIO code to default.
removed PEND_INTS 1st try
direct call to MPtrylock
1997-07-31 05:42:06 +00:00
fsmp
9b4ed3c2da Converted the TEST_LOPRIO code to default. 1997-07-31 05:39:49 +00:00
sos
f827c62c94 Add support for busmaster DMA on some PCI IDE chipsets.
I changed a few bits here and there, mainly renaming wd82371.c
to ide_pci.c now that it's supposed to handle different chipsets.

It runs on my P6 natoma board with two Maxtor drives, and also
on a Fujitsu machine I have at work with an Opti chipset and
a Quantum drive.

Submitted by:cgull@smoke.marlboro.vt.us <John Hood>

Original readme:

*** WARNING ***

This code has so far been tested on exactly one motherboard with two
identical drives known for their good DMA support.

This code, in the right circumstances, could corrupt data subtly,
silently, and invisibly, in much the same way that older PCI IDE
controllers do.  It's ALPHA-quality code; there's one or two major
gaps in my understanding of PCI IDE still.  Don't use this code on any
system with data that you care about; it's only good for hack boxes.
Expect that any data may be silently and randomly corrupted at any
moment.  It's a disk driver.  It has bugs.  Disk drivers with bugs
munch data.  It's a fact of life.

I also *STRONGLY* recommend getting a copy of your chipset's manual
and the ATA-2 or ATA-3 spec and making sure that timing modes on your
disk drives and IDE controller are being setup correctly by the BIOS--
because the driver makes only the lamest of attempts to do this just
now.

*** END WARNING ***

that said, i happen to think the code is working pretty well...

WHAT IT DOES:

this code adds support to the wd driver for bus mastering PCI IDE
controllers that follow the SFF-8038 standard.  (all the bus mastering
PCI IDE controllers i've seen so far do follow this standard.)  it
should provide busmastering on nearly any current P5 or P6 chipset,
specifically including any Intel chipset using one of the PIIX south
bridges-- this includes the '430FX, '430VX, '430HX, '430TX, '440LX,
and (i think) the Orion '450GX chipsets.  specific support is also
included for the VIA Apollo VP-1 chipset, as it appears in the
relabeled "HXPro" incarnation seen on cheap US$70 taiwanese
motherboards (that's what's in my development machine).  it works out
of the box on controllers that do DMA mode2; if my understanding is
correct, it'll probably work on Ultra-DMA33 controllers as well.
it'll probably work on busmastering IDE controllers in PCI slots, too,
but this is an area i am less sure about.

it cuts CPU usage considerably and improves drive performance
slightly.  usable numbers are difficult to come by with existing
benchmark tools, but experimentation on my K5-P90 system, with VIA
VP-1 chipset and Quantum Fireball 1080 drives, shows that disk i/o on
raw partitions imposes perhaps 5% cpu load.  cpu load during
filesystem i/o drops a lot, from near 100% to anywhere between 30% and
70%.  (the improvement may not be as large on an Intel chipset; from
what i can tell, the VIA VP-1 may not be very efficient with PCI I/O.)
disk performance improves by 5% or 10% with these drives.

real, visible, end-user performance improvement on a single user
machine is about nil. :) a kernel compile was sped up by a whole three
seconds.  it *does* feel a bit better-behaved when the system is
swapping heavily, but a better disk driver is not the fix for *that*
problem.

THE CODE:

this code is a patch to wd.c and wd82371.c, and associated header
files.  it should be considered alpha code; more work needs to be
done.

wd.c has fairly clean patches to add calls to busmaster code, as
implemented in wd82371.c and potentially elsewhere (one could imagine,
say, a Mac having a different DMA controller).

wd82371.c has been considerably reworked: the wddma interface that it
presents has been changed (expect more changes), many bugs have been
fixed, a new internal interface has been added for supporting
different chipsets, and the PCI probe has been considerably extended.

the interface between wd82371.c and wd.c is still fairly clean, but
i'm not sure it's in the right place.  there's a mess of issues around
ATA/ATAPI that need to be sorted out, including ATAPI support, CD-ROM
support, tape support, LS-120/Zip support, SFF-8038i DMA, UltraDMA,
PCI IDE controllers, bus probes, buggy controllers, controller timing
setup, drive timing setup, world peace and kitchen sinks.  whatever
happens with all this and however it gets partitioned, it is fairly
clear that wd.c needs some significant rework-- probably a complete
rewrite.

timing setup on disk controllers is something i've entirely punted on.
on my development machine, it appears that the BIOS does at least some
of the necessary timing setup.  i chose to restrict operation to
drives that are already configured for Mode4 PIO and Mode2 multiword
DMA, since the timing is essentially the same and many if not most
chipsets use the same control registers for DMA and PIO timing.

does anybody *know* whether BIOSes are required to do timing setup for
DMA modes on drives under their care?

error recovery is probably weak.  early on in development, i was
getting drive errors induced by bugs in the driver; i used these to
flush out the worst of the bugs in the driver's error handling, but
problems may remain.  i haven't got a drive with bad sectors i can
watch the driver flail on.

complaints about how wd82371.c has been reindented will be ignored
until the FreeBSD project has a real style policy, there is a
mechanism for individual authors to match it (indent flags or an emacs
c-mode or whatever), and it is enforced.  if i'm going to use a source
style i don't like, it would help if i could figure out what it *is*
(style(9) is about half of a policy), and a way to reasonably
duplicate it.  i ended up wasting a while trying to figure out what
the right thing to do was before deciding reformatting the whole thing
was the worst possible thing to do, except for all the other
possibilities.

i have maintained wd.c's indentation; that was not too hard,
fortunately.

TO INSTALL:

my dev box is freebsd 2.2.2 release.  fortunately, wd.c is a living
fossil, and has diverged very little recently.  included in this
tarball is a patch file, 'otherdiffs', for all files except wd82371.c,
my edited wd82371.c, a patch file, 'wd82371.c-diff-exact', against the
2.2.2 dist of 82371.c, and another patch file,
'wd82371.c-diff-whitespace', generated with diff -b (ignore
whitespace).  most of you not using 2.2.2 will probably have to use
this last patchfile with 'patch --ignore-whitespace'.  apply from the
kernel source tree root. as far as i can tell, this should apply
cleanly on anything from -current back to 2.2.2 and probably back to
2.2.0.  you, the kernel hacker, can figure out what to do from here.
if you need more specific directions, you probably should not be
experimenting with this code yet.

to enable DMA support, set flag 0x2000 for that drive in your config
file or in userconfig, as you would the 32-bit-PIO flag.  the driver
will then turn on DMA support if your drive and controller pass its
tests.  it's a bit picky, probably.  on discovering DMA mode failures
or disk errors or transfers that the DMA controller can't deal with,
the driver will fall back to PIO, so it is wise to setup the flags as
if PIO were still important.

'controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xa0ffa0ff
vector wdintr' should work with nearly any PCI IDE controller.

i would *strongly* suggest booting single-user at first, and thrashing
the drive a bit while it's still mounted read-only.  this should be
fairly safe, even if the driver goes completely out to lunch.  it
might save you a reinstall.

one way to tell whether the driver is really using DMA is to check the
interrupt count during disk i/o with vmstat; DMA mode will add an
extremely low number of interrupts, as compared to even multi-sector
PIO.

boot -v will give you a copious register dump of timing-related info
on Intel and VIAtech chipsets, as well as PIO/DMA mode information on
all hard drives.  refer to your ATA and chipset documentation to
interpret these.

WHAT I'D LIKE FROM YOU and THINGS TO TEST:

reports.  success reports, failure reports, any kind of reports. :)
send them to cgull+ide@smoke.marlboro.vt.us.

i'd also like to see the kernel messages from various BIOSes (boot -v;
dmesg), along with info on the motherboard and BIOS on that machine.

i'm especially interested in reports on how this code works on the
various Intel chipsets, and whether the register dump works
correctly.  i'm also interested in hearing about other chipsets.

i'm especially interested in hearing success/failure reports for PCI
IDE controllers on cards, such as CMD's or Promise's new busmastering
IDE controllers.

UltraDMA-33 reports.

interoperation with ATAPI peripherals-- FreeBSD doesn't work with my
old Hitachi IDE CDROM, so i can't tell if I've broken anything. :)

i'd especially like to hear how the drive copes in DMA operation on
drives with bad sectors.  i haven't been able to find any such yet.

success/failure reports on older IDE drives with early support for DMA
modes-- those introduced between 1.5 and 3 years ago, typically
ranging from perhaps 400MB to 1.6GB.

failure reports on operation with more than one drive would be
appreciated.  the driver was developed with two drives on one
controller, the worst-case situation, and has been tested with one
drive on each controller, but you never know...

any reports of messages from the driver during normal operation,
especially "reverting to PIO mode", or "dmaverify odd vaddr or length"
(the DMA controller is strongly halfword oriented, and i'm curious to
know if any FreeBSD usage actually needs misaligned transfers).

performance reports.  beware that bonnie's CPU usage reporting is
useless for IDE drives; the best test i've found has been to run a
program that runs a spin loop at an idle priority and reports how many
iterations it manages, and even that sometimes produces numbers i
don't believe.  performance reports of multi-drive operation are
especially interesting; my system cannot sustain full throughput on
two drives on separate controllers, but that may just be a lame
motherboard.

THINGS I'M STILL MISSING CLUE ON:

* who's responsible for configuring DMA timing modes on IDE drives?
the BIOS or the driver?

* is there a spec for dealing with Ultra-DMA extensions?

* are there any chipsets or with bugs relating to DMA transfer that
should be blacklisted?

* are there any ATA interfaces that use some other kind of DMA
controller in conjunction with standard ATA protocol?

FINAL NOTE:

after having looked at the ATA-3 spec, all i can say is, "it's ugly".
*especially* electrically.  the IDE bus is best modeled as an
unterminated transmission line, these days.

for maximum reliability, keep your IDE cables as short as possible and
as few as possible.  from what i can tell, most current chipsets have
both IDE ports wired into a single buss, to a greater or lesser
degree.  using two cables means you double the length of this bus.

SCSI may have its warts, but at least the basic analog design of the
bus is still somewhat reasonable.  IDE passed beyond the veil two
years ago.

  --John Hood, cgull@smoke.marlboro.vt.us
1997-07-29 12:57:25 +00:00
msmith
481c991667 Return to using disable/enable_intr() for guarding DMA register access.
Mask the read value from the count register in order to return zero correctly
after TC, as per intel datasheet : "If it is not autoinitialised, this
register will have a count of FFFFH after TC"
1997-07-29 05:24:36 +00:00
msmith
cf77de89f4 Pedant attack! Use variable names consistent with discourse in
comments.  Remove reduntant extra addition that was unncessary, and
unneeded mask (asuming inb works correctly).

Submitted by:	Stephen McKay <syssgm@dtir.qld.gov.au>
1997-07-28 09:13:11 +00:00
msmith
a3e55966a0 Use disable_intr() / read/write_eflags() to ensure that interrupt
handlers don't skew the results of isa_dmastatus.  The function can be
safely called with interrupts disabled.

Submitted by:	Stephen McKay <syssgm@dtir.qld.gov.au>
1997-07-28 07:49:40 +00:00
fsmp
97cf884548 Modified the PEND_INTS algorithm to fix the ISA INT loss problem.
Noticed by:	dave adkins <adkin003@gold.tc.umn.edu> and others.
1997-07-28 03:59:54 +00:00
fsmp
8195f84f44 Comment out PEND_INTS for now, it breaks ISA INTs.
Reported by:	dave adkins <adkin003@gold.tc.umn.edu>
1997-07-26 17:38:43 +00:00
phk
40cd2e0efd Fix a brino in my last commit.
Noticed by:	smp
1997-07-26 07:58:29 +00:00
fsmp
8d2474227f mpapic.c & mp_machdep:
- removed TEST_ALTTIMER.
 - removed APIC_PIN0_TIMER.
 - removed TIMER_ALL.

mplock.s:
 - minor update of try_mplock for new algorithm where a CPU uses try_mplock
	instead of get_mplock in the ISRs.
1997-07-26 01:55:19 +00:00