Commit Graph

617 Commits

Author SHA1 Message Date
David E. O'Brien 5fafa719ad Like it or not, we use ^I's not 0x20 to align things in this file. 1999-10-14 11:34:19 +00:00
David E. O'Brien 6701b9ae60 Make the contents, layout, and comments match sys/i386/conf/GENERIC as
much as possible.  This commit also adds the `bpf' pseudo-device.
1999-10-14 09:52:28 +00:00
Andrew Gallatin 6e54edbfb3 Divide the Alpha's hz of 1024 by 8 to obain a stathz of 128. This
fixes "nice" on the alpha.

obtained from: NetBSD
reviewed by: dfr
1999-10-13 19:18:29 +00:00
Andrew Gallatin da7ca2d9bd allow pci_ioctl to work with multi-hose alphas.
Rather than teaching pci_ioctl about hoses, we just pass down a magic number
& let the platform code figure out what the hose is based on what the bus
number is.

concept approved by dfr
1999-10-12 22:10:53 +00:00
Doug Rabson 25afb89b1c * Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
  layout of ivars.

* Move set_resource, get_resource and delete_resource from
  isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

     bus_set_resource(dev, type, rid, start, count);
     bus_get_resource(dev, type, rid, startp, countp);
     bus_get_resource_start(dev, type, rid);
     bus_get_resource_count(dev, type, rid);
     bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
  Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
  device.

* Change device_print_prettyname() so that it doesn't print
  "(no driver assigned)-1" for anonymous devices.
1999-10-12 21:35:51 +00:00
Marcel Moolenaar 54b2ae180d Include opt_compat.h now the old signalling syscalls are of type COMPAT. 1999-10-12 19:08:09 +00:00
Luoqi Chen 645682fd40 Add a per-signal flag to mark handlers registered with osigaction, so we
can provide the correct context to each signal handler.

Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK
as we did before the linuxthreads support merge (submitted by bde).

Move ps_sigstk from to p_sigacts to the main proc structure since signal
stack should not be shared among threads.

Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag.
Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag.

Reviewed by:	marcel, jdp, bde
1999-10-11 20:33:17 +00:00
Doug Rabson 648f4ed3de Don't include <machine/frame.h>. 1999-10-08 09:09:13 +00:00
Peter Wemm eec117b5ef Zap these defucnt files before anyone things about trying to merge them. 1999-10-08 06:21:38 +00:00
Mike Smith f5ff1eca5e Re-synchronise the alpha major numbers list with the i386 list.
Add the Mylex DAC960 and AMI MegaRAID numbers.
1999-10-07 02:15:10 +00:00
Nick Hibma 3e2c6ca3b9 Removal of sys/device.h
- Move intrhook stuff into kernel.h
- Remove all occurrences of #device <device.h>
- Add kernel.h were necessary (nowhere)
- delete device.h

This file contained the structures for cfdata (old style config) and is no
longer used. It was included by most drivers.

It confuses the remote debugger as the definition of 'struct device' in
device.h is found before the one in bus_private.h.
1999-10-05 21:19:41 +00:00
Nick Hibma 694e31f79d Attempt at cleaning up the (unused part of) support for TurboChannel to
remove the need for device.h.
1999-10-05 20:46:58 +00:00
Marcel Moolenaar c5c6b7b38e Re-introduction of sigcontext.
struct sigcontext and ucontext_t/mcontext_t are defined in such
a way that both (ie struct sigcontext and ucontext_t) can be
passed on to sigreturn. The signal handler is still given a
ucontext_t for maximum flexibility.

For backward compatibility sigreturn restores the state for the
alternate signal stack from sigcontext.sc_onstack and not from
ucontext_t.uc_stack. A good way to determine which value the
application has set and thus which value to use, is still open
for discussion.

NOTE: This change should only affect those binaries that use
      sigcontext and/or ucontext_t. In the source tree itself
      this is only doscmd. Recompilation is required for those
      applications.

This commit also fixes a lot of style bugs without hopefully
adding new ones.

NOTE: struct sigaltstack.ss_size now has type size_t again. For
      some reason I changed that into unsigned int.

Parts submitted by: bde
sigaltstack bug found by: bde
1999-10-04 19:33:58 +00:00
Nick Hibma d42053426e Change from using a dv_xname in struct device to using
device_get_nameunit().

Remove including of device.h
1999-10-03 20:33:43 +00:00
Marcel Moolenaar 3196c2972d Implement the use of si_addr in siginfo_t.
Suggested by: jdp
1999-10-01 07:49:37 +00:00
Matt Jacob ad9687aff3 make sure a trivial apm.h is created, as some people have assumed that
all architectures have apm and have just included apm.h blindly.
1999-10-01 02:41:30 +00:00
Andrew Gallatin a76245d21d This fix allows cards inserted in one of the bottem-most slots on an xp1000
(behind the built-in ppb on hose 1) to be found:

When testing the adaptec controller on alpha, I realized I misread the xp1000
documentation and the way I'm calculating the bus number for PCI
config space accesses on the tsunami is wrong.  I had thought that a bus
behind a ppb should be numbered as the nth bus in that hose, but it
actually needs to be the nth global bus within the system.  The bus number
for the primary bus on a hose must always remain 0 when calculating config
space addresses.
1999-09-30 19:09:22 +00:00
Andrew Gallatin 25cfcb2218 Add ahc driver. The adaptec driver works just dandy on my xp1000 using
a 2940UW.  The dp264 (and ds20, I think) have an AIC7895 on board so it
is important the ahc driver be in GENERIC so that FreeBSD can install on
these boxes.
1999-09-30 18:51:56 +00:00
Marcel Moolenaar 956d3333ca sigset_t change (part 4 of 5)
-----------------------------

The compatibility code and/or emulators have been updated:

iBCS2 now mostly uses the older syscalls. SVR4 now properly
handles all signals. This has been achieved by using the
new sigset_t throughout the emulator. The Linuxulator has
been severely updated. Internally the new Linux sigset_t is
made the default. These are then mapped to and from the
new FreeBSD sigset_t.

Also, rt_sigsuspend has been implemented in the Linuxulator.
Implementing this syscall basicly caused all this sigset_t
changing in the first place and the syscall has been used
throughout the change as a means for testing. It basicly is
too much work to undo the implementation so that it can
later be added again.

A special note on the use of sv_sigtbl and sv_sigsize in
struct sysentvec:
Every signal larger than sv_sigsize is not translated and is
passed on to the signal handler unmodified. Signals in the
range 1 upto and including sv_sigsize are translated.
The rationale is that only the system defined signals need to
be translated.

The emulators also have been updated so that the translation
tables are only indexed for valid (system defined) signals.
This change also fixes the translation bug already in the
SVR4 emulator.
1999-09-29 15:12:18 +00:00
Marcel Moolenaar 91078fca0c sigset_t change (part 3 of 5)
-----------------------------

By introducing a new sigframe so that the signal handler operates
on the new siginfo_t and on ucontext_t instead of sigcontext, we
now need two version of sendsig and sigreturn.

A flag in struct proc determines whether the process expects an
old sigframe or a new sigframe. The signal trampoline handles
which sigreturn to call. It does this by testing for a magic
cookie in the frame.

The alpha uses osigreturn to implement longjmp. This means that
osigreturn is not only used for compatibility with existing
binaries. To handle the new sigset_t, setjmp saves it in
sc_reserved (see NOTE).

the struct sigframe has been moved from frame.h to sigframe.h
to handle the complex header dependencies that was caused by
the new sigframe.

NOTE: For the i386, the size of jmp_buf has been increased to hold
      the new sigset_t. On the alpha this has been prevented by
      using sc_reserved in sigcontext.
1999-09-29 15:06:27 +00:00
Poul-Henning Kamp 1ab305ef60 Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.

Reviewed by: julian, bde
1999-09-28 11:45:31 +00:00
Steve Price f0856fbc91 Fix breakage caused by last commit. Also accommodate the new interfaces
to the bpf* routines so this driver has a fighting chance of actually
working once it's compiled.

Silently approved by:	freebsd-alpha@freebsd.org
1999-09-28 03:42:32 +00:00
Peter Wemm b5afb7441c bdbtofsb() appears to have been unused for quite some time, if ever.
Appears to be a 4.4Lite relic.
1999-09-26 18:56:43 +00:00
Poul-Henning Kamp d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Poul-Henning Kamp ae8e1d08d7 This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
Poul-Henning Kamp 46783fb897 Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.
1999-09-25 12:06:01 +00:00
Luoqi Chen 2323686abc Implement linux_ioperm() syscall. Fix linux_iopl() to use the level argument.
SVGAlib should now work.

Reviewed by:	marcel
1999-09-22 22:01:51 +00:00
Matthew Dillon 8b22cebb2c Back out a portion of the last commit. DFLTPHYS and MAXPHYS cannot
be set by a kernel conf option due to the struct buf structural
    dependancy (sizing of b_pages[]) creating a conflict with modules
    (which are not compiled with kernel config options overrides).

    We'll be able to sysctl these two later on when the buffer subsystem
    is revamped.
1999-09-22 05:48:31 +00:00
Matthew Dillon a59d364a23 Change default block size for user VBLK device access from 2K to PAGE_SIZE
(4K on an i386, 8K on an alpha).

    Make BLKDEV_IOSIZE, DFLTPHYS, and MAXPHYS kernel-configurable.
1999-09-22 04:11:55 +00:00
Matthew Dillon 4cc712004c Fix bug in pipe code relating to writes of mmap'd but illegal address
spaces which cross a segment boundry in the page table.  pmap_kextract()
    is not designed for access to the user space portion of the page
    table and cannot handle the null-page-directory-entry case.

    The fix is to have vm_fault_quick() return a success or failure which
    is then used to avoid calling pmap_kextract().
1999-09-20 19:08:48 +00:00
Doug Rabson 5ed9724025 This file was never used and appears to be a leftover from the NetBSD
bootstrap days.
1999-09-20 09:46:19 +00:00
Peter Wemm 5518bc0d23 Pull in the core bus drivers based on the machine type rather than
requiring the user to figure it out.  So, if you comment out all but the
machine type you are using, you automatically get the bus code just for
your system.  (eg DEC_EB164 implies cia, etc).  Multiple machine types
still pulls in the appropriate busses.  This means, take things like
'controller cia0' out of your config.

Reviewed by:	dfr  (in principle)
1999-09-13 17:52:06 +00:00
Brian Feldman 49c684571a Correction: mem.c devices are "D_MEM" (and D_MEM is added.)
Taken issue with by:	phk
1999-09-12 18:48:07 +00:00
Brian Feldman 1a351c9ee4 Make the d_flags of mem devices D_DISK to signify that they are disk-like
random-seekable devices. This lets dd(1) know it can seek on them. It
also affects spec_vnopen() (IIRC), but only makes the path of execution smaller,
and does not change its behavior. This is when securelevel >= 2.
1999-09-12 16:38:43 +00:00
Poul-Henning Kamp b24d30561d Make unused tape bmajors in past tense. 1999-09-08 18:46:22 +00:00
Poul-Henning Kamp 6523748af1 Make sa/bdev, gd/bdev and gd/cdev as past-tense. 1999-09-08 17:02:40 +00:00
Peter Wemm b720111ca3 Restore old sio driver for Bruce. We'll fix the bus problems in nsio
instead.
1999-09-08 11:08:50 +00:00
Peter Wemm e5174d14c5 Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methods
including pci.
Also, eliminate NSIOTOT and do it dynamically where it matters.
1999-09-06 14:06:23 +00:00
Bill Paul e5a9fd5435 This commit adds driver support for PCI fast ethernet NICs based on
the Davicom DM9100 and DM9102 chipsets, including the Jaton Corporation
XPressNet. Datasheet is available from www.davicom8.com.

The DM910x chips are still more tulip clones. The API is reproduced
pretty faithfully, unfortunately the performance is pretty bad. The
transmitter seems to have a lot of problems DMAing multi-fragment
packets. The only way to make it work reliably is to coalesce transmitted
packets into a single contiguous buffer. The Linux driver (written by
Davicom) actually does something similar to this. I can't recomment this
NIC as anything more than a "connectivity solution."

This driver uses newbus and miibus and is supported on both i386
and alpha platforms.
1999-09-06 06:14:30 +00:00
Bill Paul 9555e59a1e This commit adds driver support for the Silicon Integrated Systems
SiS 900 and SiS 7016 PCI fast ethernet chipsets. Full manuals for the
SiS chips can be found at www.sis.com.tw.

This is a fairly simple chipset. The receiver uses a 128-bit multicast
hash table and single perfect entry for the station address. Transmit and
receive DMA and FIFO thresholds are easily tuneable. Documentation is
pretty decent and performance is not bad, even on my crufty 486. This
driver uses newbus and miibus and is supported on both the i386 and
alpha architectures.
1999-09-05 21:01:03 +00:00
Peter Wemm ae04ca6157 Don't install stubs, make a compat symlink at buildworld time.
All internal references to <machine/soundcard.h> are (hopefully :-) gone.
1999-09-04 15:46:31 +00:00
Doug Rabson 3e05dd9c7c Make <machine/soundcard.h> a stub which includes <sys/soundcard.h> 1999-09-04 14:35:18 +00:00
Marcel Moolenaar ff78e85043 Implementation of the modify_ldt syscall. Use the sysarch() interface to do
the actual work. When USER_LDT is not defined for a kernel, sysarch returns
EOPNOTSUPP. Display a message in that case and return ENOSYS to userland.

Reviewed by: luoqi
1999-09-02 21:50:42 +00:00
Doug Rabson 4249382df0 This represents essentially a complete rewrite of the ISA PnP code. The
new system is integrated with the ISA bus code more cleanly and allows
the future addition of more enumerators such as PnPBIOS and ACPI.

This commit also enables the new pcm driver since it is somewhat tied to
the new PnP code.
1999-09-01 20:53:43 +00:00
Doug Rabson 8f0ba3dbab Make multiuser boots the default instead of singlue user. 1999-08-31 22:42:15 +00:00
Poul-Henning Kamp f054c29093 Merge alpha and pc98 changes into i386 MBR handling code and replace all
three copies with one copy in MI land.
1999-08-29 09:12:54 +00:00
Poul-Henning Kamp 0bd2b984ce Sort the easy part of this file. It should be all sorted. 1999-08-29 08:44:18 +00:00
Poul-Henning Kamp 10af1a2b5f We don't need to pass the diskname argument all over the diskslice/label
code, we can find the name from any convenient dev_t
1999-08-28 14:33:44 +00:00
Marcel Moolenaar 86f95e6b6d Implement the OSS_GETVERSION ioctl. The version returned can be changed through
the sysctl variable `compat.linux.oss_version'.

PR: 12917
Originator: Dean Lombardo <dlombardo@excite.com>
1999-08-28 08:43:03 +00:00
Peter Wemm ee15718941 $Id$ -> $FreeBSD$ (some mangled and/or hidden ones) 1999-08-28 02:21:15 +00:00