Commit Graph

4720 Commits

Author SHA1 Message Date
Rodney W. Grimes
a7ba018ad1 Add missing ${DESTDIR} to afterinstall: target. 1996-01-27 23:57:06 +00:00
Garrett Wollman
31c5632840 Decode configuration for the IDE part of the Triton chipset. This
includes a hack in the probe code: the 82371FB is a multifuction
device, but doesn't properly set the configuration bit which
indicates this.  So, we just hard-wire all 82371FBs as multifunction
devices.

This does not actually make the bus-master IDE stuff work, although
if anyone wants to work on that, I have the databooks that tell
how to use it.
1996-01-27 20:14:32 +00:00
Joerg Wunsch
b10fe1a96d Add <sys/wormio.h>, containing the declarations that are shared between
kernel and userland.
1996-01-27 17:49:47 +00:00
Joerg Wunsch
984afdcfd2 The Great Merge.
The worm driver is alpha-usable!  I've stuffed everything that is
needed into the kernel driver, including the logic to select
between different vendor's quirks.

Disclaimer: this has by now _only_ been tested on a heavily tweaked
2.0.5R system.  I've done my best to retrofit it into -current, but
i don't have a chance yet to test it in a -current environment.
1996-01-27 17:48:12 +00:00
Bruce Evans
af4cb3a1c4 [Oops, forgot to commit this together with things that depend on it.]
First attempt at creating devfs entries for sliced devices.  Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 09:34:21 +00:00
Bruce Evans
c8f2fe8db8 First attempt at creating devfs entries for sliced devices. Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

drivers:
Fixed device names, links, minor numbers and modes.

wd.c:
Started actually supporting devfs.

diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().

subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 04:18:15 +00:00
Bruce Evans
dd87702a51 Allocate DMA bounce buffers only when requested by drivers. Only the
fd and wt drivers need bounce buffers, so this normally saves 32K-1K
of kernel memory.

Keep track of which DMA channels are busy.  isa_dmadone() must now be
called when DMA has finished or been aborted.

Panic for unallocated and too-small (required) bounce buffers.

fd.c:
There will be new warnings about isa_dmadone() not being called after
DMA has been aborted.

sound/dmabuf.c:
isa_dmadone() needs more parameters than are available, so temporarily
use a new interface isa_dmadone_nobounce() to avoid having to worry
about panics for fake parameters.  Untested.
1996-01-27 02:33:48 +00:00
Bruce Evans
e7973e6070 Declared new functions isa_dmainit() and isa_dmadone_nobounce().
Sorted and KNFised declarations.
1996-01-27 01:57:02 +00:00
Bruce Evans
227b8bf258 Cleaned up unused #includes and some other historical cruft.
Sorted and KNFised declarations.
1996-01-27 01:56:30 +00:00
Bruce Evans
6139755401 Fixed allocation of DMA buffers. The DMA bounce buffers were sometimes
overrun by 2 pages.

Fixed the (unused) values returned from device attach functions.

Fixed checking of unit number in device open functions - don't load bad
pointers or print error messages about the contents of bad pointers.

Removed unused #includes.

asc.c:
Fixed premature setting of flags in ascopen() - copied the better order
in gscopen().

gsc.c:
Fixed conflict handling for drq:
- fail the probe if the configured drq doesn't match the actual drq.
- set the configured drq to match the actual drq in the autoconfig case.

Reviewed by:	Nobody; authors didn't respond to mail.
1996-01-27 00:53:58 +00:00
Bruce Evans
324e9ed2a4 Added a `boundary' arg to vm_alloc_page_contig(). Previously the only
way to avoid crossing a 64K DMA boundary was to specify an alignment
greater than the size even when the alignment didn't matter, and for
sizes larger than a page, this reduced the chance of finding enough
contiguous pages.  E.g., allocations of 8K not crossing a 64K boundary
previously had to be allocated on 8K boundaries; now they can be
allocated on any 4K boundary except (64 * n + 60)K.

Fixed bugs in vm_alloc_page_contig():
- the last page wasn't allocated for sizes smaller than a page.
- failures of kmem_alloc_pageable() weren't handled.

Mutated vm_page_alloc_contig() to create a more convenient interface
named contigmalloc().  This is the same as the one in 1.1.5 except
it has `low' and `high' args, and the `alignment' and `boundary'
args are multipliers instead of masks.
1996-01-27 00:13:33 +00:00
Garrett Wollman
7c399a896a Delete the if_private[] array in struct ifnet; this turned out to be
of limited utility.  In their place, add bunch of pointers
which will eventually be needed by the polled-interrupt scheme we're working
here.  (It will probably be a while before the code is written and
committed here.)  At the same time, a `void *if_softc' field
was added to the beginning of the structure to make certain driver
writers happier.

The practical upshot of all this is that you need to
recompile utilities such as netstat which manipulate struct ifnet.
1996-01-26 22:09:54 +00:00
Poul-Henning Kamp
16cf781eed Fix a bug I made in the devfs. 1996-01-26 12:42:39 +00:00
Poul-Henning Kamp
18b7be4064 The last part of the ether_sprint -> %6D change.
Sorry for the delay.
(%D is for hexdumping.)
1996-01-26 09:29:29 +00:00
Joerg Wunsch
11b61c4563 Correctly initialize the `btprobing' variable. It's always been 0,
causing a bogus error message to appear if no board has been fond.
1996-01-25 23:03:07 +00:00
Joerg Wunsch
e5bf458f52 Remove the "no board found at" message, ia rather similar message with
the same information is printed one line below by the generic isa code
anyway.
1996-01-25 23:00:42 +00:00
Garrett Wollman
a8030f1496 Correctly identify the various parts of the Triton chipset. 1996-01-25 20:38:31 +00:00
Stefan Eßer
e653d76e96 Add support for multi-function devices. 1996-01-25 18:32:00 +00:00
Andrey A. Chernov
887c00b859 Change RUKEYMAP sligtly 1996-01-25 16:37:20 +00:00
Poul-Henning Kamp
e8cbe8fa47 Avoid local sprintfs and other printf'isms. 1996-01-25 07:21:50 +00:00
Poul-Henning Kamp
831e28a67a Make devfs_add_devfsf() which takes printf style args. 1996-01-25 07:17:31 +00:00
Poul-Henning Kamp
f782b11a04 Don't use %r, we havn't got it anymore.
Submitted by: bde
1996-01-25 07:15:40 +00:00
Peter Wemm
f863805df0 This time, really make the procfs work when reading stuff from the UPAGES.
This is a really ugly bandaid on the problem, but it works well enough for
'ps -u' to start working again.  The problem was caused by the user
address space shrinking by a little bit and the UPAGES being "cast off" to
become a seperate entity rather than being at the top of the process's
vmspace.  That optimization was part of John's most recent VM speedups.

Now, rather than decoding the VM space, it merely ensures the pages are
in core and accesses them the same way the ptrace(PT_READ_U..) code does,
ie: off the p->p_addr pointer.
1996-01-25 06:05:38 +00:00
Bruce Evans
ad59a83d3e Fixed spelling of s_namlen so that this compiles again. 1996-01-25 00:45:37 +00:00
Bruce Evans
bf124e256b Restored newline at the end of panic messages. 1996-01-25 00:17:22 +00:00
Poul-Henning Kamp
1ce9bf88c3 Use new printf features rather than local kludges. 1996-01-24 21:12:23 +00:00
Poul-Henning Kamp
120f078334 Remove %r hack, we have vprintf() now.
Add %D for "dumping" data.  Good for ethernet/MAC addresses and such.
Handle 1 < radix < 37.
1996-01-24 20:56:20 +00:00
Poul-Henning Kamp
f0fb9bf18f Extend to handle all radix < 37 1996-01-24 20:51:26 +00:00
Garrett Wollman
fde327d6ab Fix memory leak in case of adding a host route on top of another one.
Pointed-out-by:  Bill Fenner <fenner@parc.xerox.com>
1996-01-24 20:27:19 +00:00
Garrett Wollman
619a6d21a0 Disable $Log$ 1996-01-24 20:01:27 +00:00
Peter Wemm
3b60d376b9 Attempt to fix the procfs LKM after making some of the procfs
code shared with ptrace and "standard" in the config.
1996-01-24 19:34:49 +00:00
Mike Pritchard
97f1b9871e Add a check to prevent a computation from underflowing and causing
a panic due to an attaempt to allocate a buffer for a terabyte or
so of data when an attempt is made to create sparse data (e.g.
a holey file) more than 1 block past the end of the file.

Note:  some other areas of this code need to be looked at,
since they might cause problems when the file size exceeds 2GB,
due to storing results in ints when the computations are being
done with quad sized variables.

Reviewed by:	bde
1996-01-24 18:52:18 +00:00
Peter Wemm
bf6024ee3a Add commands for ptrace get/set registers.. (Same numbers as NetBSD) 1996-01-24 18:51:48 +00:00
Peter Wemm
1530906921 procfs_machdep.c is now shared with ptrace as well. It is now no longer
optional.
1996-01-24 18:47:58 +00:00
Peter Wemm
9ef8f02df6 procfs_{mem|regs|fpregs}.c are now completely shared with ptrace(),
and are no longer optional.  This cuts down some code duplication.
1996-01-24 18:44:42 +00:00
Peter Wemm
0cc7521383 Major fixes for procfs..
Implement a "variable" directory structure. Files that do not make
sense for the given process do not "appear" and cannot be opened.
For example, "system" processes do not have "file", "regs" or "fpregs",
because they do not have a user area.

"attempt" to fill in the user area of a given process when it is being
accessed via /proc/pid/mem (the user struct is just after
VM_MAXUSER_ADDRESS in the process address space.)

Dont do IO to the U area while it's swapped, hold it in place if possible.

Lock off access to the "ctl" file if it's done a setuid like the other
pseudo-files in there.
1996-01-24 18:41:41 +00:00
Peter Wemm
b0281cef04 Major fixes for ptrace()...
PT_ATTACH/PT_DETACH implemented now and fully operational.
PT_{GET|SET}{REGS|FPREFS} implemented now, using code shared with procfs
PT_{READ|WRITE}_{I|D} now uses code shared with procfs
ptrace opcodes now fully permission checked, including ownerships.
doing an operation to the u-area on a swapped process should no longer
panic.
running gdb as root works for me now, where it didn't before.
general cleanup..

Note, that this has some tightening of permissions/access checks etc.
Some of these may be going too far..  In particular, the "owner" of the
traced process is enforced.  The process that created or attached to
the traced process is now the only one that can "do" things to it.
1996-01-24 18:29:00 +00:00
Peter Wemm
bf5bfe45ab proc.h: Add PHOLD()/PRELE() macros to ensure the U area is not swapped
while doing ptrace/procfs in it.
ptrace.h: uncomment PT_ATTACH/PT_DETACH, I am committing code to do this.
1996-01-24 18:11:23 +00:00
Joerg Wunsch
7a8a029a66 Hide the probe warnings behind `bootverbose'. 1996-01-23 22:55:08 +00:00
Stefan Eßer
dd7610fca4 Make PCI interrupt handlers return void like everybody else does.
Reviewed by:	davidg
1996-01-23 21:48:28 +00:00
Garrett Wollman
ac09ec5108 Spelling error: Busting -> Bursting. 1996-01-23 21:31:51 +00:00
Poul-Henning Kamp
d7c0e66f38 Remove some now unused printfoids. 1996-01-23 21:17:59 +00:00
Garrett Wollman
aacfda3486 Got the sense of the L1 cache enabled test wrong; fixed. 1996-01-23 20:36:49 +00:00
Garrett Wollman
db4a5c0521 Add support for dumping the configuration of the Intel
82371FB PCI ISA IDE Xcellerator (sic) chip.  The IDE function
will not be done until Stefan tells me how to access it.
1996-01-23 20:21:24 +00:00
Bill Fenner
4dde4205e1 First piece of fixing ppp/proxy arp problem:
If an attempt to add a route fails because an "ARP table" entry is in
the way, remove the ARP entry and retry the add.

Reviewed by:	nate
1996-01-23 05:15:30 +00:00
David Greenman
2924d49169 Simplified savectx() a little and fixed a bug that caused it to return
garbage in the child process rather than "1" like it is supposed to.

Reviewed by:	bde
1996-01-23 02:39:24 +00:00
Garrett Wollman
71803c8ba9 Add register definitions for Intel 82437FX (Triton System Controller) 1996-01-22 22:43:48 +00:00
Poul-Henning Kamp
b4b2f81ef3 bounds check the radix, just in case. 1996-01-22 13:21:33 +00:00
Mike Pritchard
86cfd0dd41 Changed the description of SIGSYS to better reflect what
it means when that signal is received.  Closes PR# 686.
1996-01-22 12:31:15 +00:00
Julian Elischer
aaf0927a09 Obtained from: uthreads package 1996-01-22 00:32:08 +00:00