Commit Graph

8008 Commits

Author SHA1 Message Date
Joerg Wunsch db99d43f6f Make sppp's logging human-readable. Also, use log(9), as opposed to
printf(9), so the log output doesn't clutter the console.

While i was at it, KNFified some function definitions.  This file was
very inconsistent in this respect.
1997-05-11 10:04:24 +00:00
Steve Passe a56fb4ee60 Documented SMP_AUTOSTART to be working. 1997-05-10 17:40:53 +00:00
Doug Rabson 0160dedc65 Implement a separate control for write gathering on NFSv3. This is turned
off for NFSv3 by default since write gathering seems to reduce performance
for NFSv3 by up to 60%.

Add sysctl knobs to control both variables.
1997-05-10 16:59:36 +00:00
Doug Rabson 5ae0f71815 Fix a nasty hang connected with write gathering. Also add debug print
statements to bits of the server which helped me find the hang.
1997-05-10 16:12:03 +00:00
Joerg Wunsch 28d90c30ee Add the D_DISK flag to the cdevsw structs of various CD-ROM drivers. 1997-05-10 12:13:17 +00:00
Peter Wemm 708e768480 Fixes from Bruce:
Serious:
- An important timevalfix() in settime[ofday]() was lost.

Not so serious:
- There was a race initializing `delta' in the check for setting the
  time backwards.
- The `#ifdef notyet' check for setting the time more than a day forwards
  was back to front.
[[I deleted the code, it's useless because of iteration - Peter]]
- The timespec was not checked for validity in clock_settime().
- The timespec was not fully checked for validity in nanotime().  The
  check in itimerfix() is too late, since the conversion from a timespec
  to a timeval may overflow.
- A garbage timeval was checked in settimeofday() for the (uap->tv == NULL
  && uap->tzp != NULL) case.  I added the broken check this some time ago.

Cosmetic:
- The "inadvertantly (sic) sleeping forever" test always failed.  hzto()
  always returns >= 1.
- The style wasn't very KNFish.  (I only changed new code.)

Submitted by: bde
1997-05-10 12:00:03 +00:00
John Hay 02c186c9bf Remove IPXPRINTFS, it is now a sysctl knob. 1997-05-10 11:16:22 +00:00
John Hay b1c9d77e44 Use the MAC address of an interface for the host part of an IPX address
and not the MAC address of the first interface for every IPX address.
This is more inline with the way others like Novell do it.
Originally Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
1997-05-10 10:01:32 +00:00
John Hay 8c7e2b93a0 Mega IPX commit.
Use the MAC address of an interface for the host part of an IPX address
and not the MAC address of the first interface for every IPX address.
This is more inline with the way others like Novell do it.
Mostly Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>

Take out the error messages (the ip icmp equivalent) with #ifdef IPXERRORMSGS.
This is bogus and as far as I could figure out IPX don't have anything like
it. This is a leftover from its XNS heritage. If nobody complains, I will
take it out completely in a few weeks.

Add some more ipxstat statistics counters.

Make ipxprintfs a sysctl variable and off by default.

Add IPX Netbios "routing" support. This is off by default and can be
switched on with a sysctl knob.

General code cleanup to at least use the same style throughout the IPX
code, but also be more style(9) conformant. Also make a lot of functions
static.

If I don't get any complaints I'll bring all of this over to the 2.2 tree
in a few weeks.
1997-05-10 09:58:58 +00:00
John-Mark Gurney 5719a93caf forgot to add the "longer" description of bktr and add an example device
line.
1997-05-10 09:23:55 +00:00
John-Mark Gurney 6baab37637 add a line for bktr (Bt848 base capture cards) to LINT. 1997-05-10 09:18:46 +00:00
Joerg Wunsch 8eea4d3c76 Add a DDB command `show buffer', to display a struct buf. It's impossible
to display everything, so i've chosen a small subset.  Add more to this as
you think seems useful.
1997-05-10 09:09:42 +00:00
Bruce Evans 1cbeae88a4 Cleaned up #includes. Lite2 cleaned up <sys/mount.h> so no kludges
are required for NFS now.

Ifdefed SMP #defines.
1997-05-10 08:01:13 +00:00
Brian Somers f2cc6198fc Pay attention to what Bruce actually says
rather than what I think he's going to say.
(Now undoing the last timerval change)

Really suggested by:	bde
1997-05-10 06:04:23 +00:00
Brian Somers 93154d87be Don't require that it_interval be valid if
it_value is set to zero - as per documentation.

Suggested by: ache & bde
1997-05-10 05:29:41 +00:00
Doug Rabson a973eeb2c1 Prevent a mapped root which appears on the server as e.g. nobody from
accessing files which it shouldn't be able to.  This required a better
approximation of VOP_ACCESS for NFSv2 (NFSv3 already has an ACCESS rpc
which is a better solution) and adding a call to VOP_ACCESS from VOP_LOOKUP.

PR:		kern/876, kern/2635
Submitted by:	David Malone <dwmalone@maths.tcd.ie> (for kern/2635)
1997-05-09 13:18:42 +00:00
Doug Rabson 7a95f810ec Fix memory leak caused by the fact that the directory offset cookies and
the sillyrename information are stored in the same place.
1997-05-09 13:04:43 +00:00
Kenjiro Cho 68713f97a1 merge ATM driver 1997-05-09 12:19:06 +00:00
Peter Wemm 4d37268944 Fatal trap 13: Brain fault, commit botched.
Current task:     transcribing patch
Time:             for a coffee
Faulting address: bde
1997-05-09 09:46:50 +00:00
Kenjiro Cho dadf1d229d import Chuck Cranor's ATM driver 1997-05-09 08:04:59 +00:00
Kenjiro Cho 413fe3928f import Chuck Cranor's ATM driver 1997-05-09 07:48:14 +00:00
Peter Wemm 230ebd9559 Bandaid old register offset code after md_regs changed type..
Submitted by: Eivind Eklund <perhaps@yes.no>
1997-05-09 04:02:58 +00:00
Peter Wemm 94c8fcd8fb Implementation of posix-style clock_* and nanosleep syscalls as implemented
in NetBSD.  The core of settimeofday() is moved to a seperate static
function settime() which both clock_settime() and settimeofday() call.

Note that I picked up the securelevel > 1 check from NetBSD that prevents
the clock being set backwards in high securelevel mode (this was a hole
that allowed resetting of inode access timestamps to arbitary values)

Obtained from:  mostly from NetBSD, but the settime() function is from
our gettimeofday(), some tweaks by me.
1997-05-08 14:16:25 +00:00
Peter Wemm 3a5322f2f0 regenerate 1997-05-08 14:08:49 +00:00
Peter Wemm 851679e514 oops. NODIDE -> NOHIDE 1997-05-08 14:07:11 +00:00
Peter Wemm b6f031b70b Define entries for the posix-style clock/timer syscalls including
nanosleep().  Also, note some syscall conflicts with other systems and
indicate slots tagged for use with other syscalls some day.
1997-05-08 14:04:37 +00:00
Peter Wemm ee68b83f4d Add posix-style clock and timer types (clockid_t and timer_t) 1997-05-08 13:50:36 +00:00
Peter Wemm 0f5ed9f420 Add posix clock and timer definitions
Obtained from: NetBSD
1997-05-08 13:48:47 +00:00
Peter Wemm 894c517fd6 Add _BSD_CLOCKID_T_ and _BSD_TIMER_T_ for posix clock/timer support
Obtained from: NetBSD
1997-05-08 13:45:43 +00:00
KATO Takenori 9f70eea59b Synchronize with sys/i386/i386/machdep.c revision 1.240. 1997-05-08 09:34:16 +00:00
KATO Takenori d6c4281f11 Synchronize with sys/i386/i386/trap.c revision 1.95. 1997-05-08 09:31:08 +00:00
KATO Takenori bf7df4cf6a Synchronize with sys/i386/isa/syscons.c revision 1.215. 1997-05-08 09:22:32 +00:00
KATO Takenori ba23eebe8c Synchronize with sys/i386/isa/npx.c revision 1.43. 1997-05-08 09:19:56 +00:00
KATO Takenori 5e76cb1c34 Synchronize with sys/i386/conf/options.i386 revision 1.44. 1997-05-08 09:18:11 +00:00
KATO Takenori ce5f95ee24 Synchronize with sys/i386/conf/Makefile.pc98 revision 1.96. 1997-05-08 09:13:40 +00:00
Steve Passe c2855f6e47 fix bug in get_isa_apic_mask() where EISA bus was ignored.
Submitted by:	 Peter Wemm <peter@spinner.DIALix.COM>
1997-05-07 22:25:27 +00:00
Peter Wemm d021fc112b Don't allow access to illegal addresses in /dev/kmem to panic kernel
(eg: above 0xffc00000).  Programs using /dev/kmem are implicitly racing
the kernel, and can get right up high in memory.  I've been running
these for some time now, but with printfs.  It's saved two panics at
least that I can remember.
1997-05-07 20:32:41 +00:00
Peter Wemm 1f8745a9c3 clean up forked child creation. This is simplified also by having
md_regs being struct trapframe *.  Do a npxsave() if needed and copy the
pcb rather than use the increasingly defunct savectx().  Copy %edi and
%ebp explicitly.

Submitted by: bde

XXX npxproc could be declared in npx.h so the externs with smp fruit
are not needed.
1997-05-07 20:19:18 +00:00
Peter Wemm 914970e6e9 md_regs is struct trapframe * now, rather than int []
Remove TF_REGP() macro and use.  The original reason (address space
problems due to having UPAGES in mapped into user space) is gone.  It
looks cleaner without it.
1997-05-07 20:12:47 +00:00
Peter Wemm 835834c085 md_regs is now a struct trapframe * 1997-05-07 20:08:53 +00:00
Peter Wemm 8359d00f20 forgotten comment 1997-05-07 20:07:25 +00:00
Peter Wemm 213fdd8050 md_regs is a struct trapframe * now, not int [] 1997-05-07 20:05:45 +00:00
Peter Wemm 36428e6100 simplify IOPL gain/remove privs code. It's easier with md_regs
being a trapframe.
1997-05-07 20:02:38 +00:00
Eivind Eklund f756433e8b Back out all of yesterdays include file changes. 1997-05-07 20:01:10 +00:00
Peter Wemm 06884fd04e remove now redundant (struct trapframe *) cast 1997-05-07 19:58:13 +00:00
Peter Wemm 6f486a5552 Convert md_regs from an int[] to a struct trapframe *. It simplifies
some code.
1997-05-07 19:55:13 +00:00
Peter Wemm 2263dd148e remove #include "opt_smp.h"
remove declarations for the SMPcurproc[NCPU] etc arrays. There was no
need to mention NCPU there, and they've been moved to their normal home.
1997-05-07 19:53:20 +00:00
Peter Wemm f40e607832 remove #include "opt_smp.h" and <machine/smp.h>. Slightly elaborate on
a comment.
1997-05-07 19:51:59 +00:00
Peter Wemm b34b547455 remove #include "opt_smp.h" 1997-05-07 19:50:31 +00:00
Peter Wemm 503c887bae remove #include opt_smp.h
declare SMPcurpcb[] next to #define and uniprocessor counterpart
1997-05-07 19:49:32 +00:00
Peter Wemm 3677aca0bd remove opt_smp.h
move declaration of SMPruntime[] to here next to the #define and the
uniprocessor counterpart
1997-05-07 19:43:28 +00:00
Peter Wemm 335a8b8d26 remove #include "opt_smp.h"
declaration of SMPcurproc[] moved to here next to it's uniprocessor
counterpart
1997-05-07 19:41:37 +00:00
Peter Wemm 53815e2fe6 Round 1 of a long series of commits..
Move SMP and APIC_IO from opt_smp.h to opt_global.h
1997-05-07 19:39:16 +00:00
Doug Rabson cea6c86c11 This is the kernel linker. To use it, you will first need to apply
the patches in freefall:/home/dfr/ld.diffs to your ld sources and set
BINFORMAT to aoutkld when linking the kernel.

Library changes and userland utilities will appear in a later commit.
1997-05-07 16:05:47 +00:00
Doug Rabson 5bd588ccb0 Add accessors for STAILQ.
Reviewed by:	phk
1997-05-07 14:38:11 +00:00
KATO Takenori c9bf011176 1. Added cast and parenthesis in block size calculaion in
union_statfs().
2. staticized union vops.

Submitted by:	Doug Rabson <dfr@nlsystems.com>
1997-05-07 14:37:32 +00:00
KATO Takenori d5c1f97e79 Synchronize with sys/i386/isa/syscons.c revision 1.214. 1997-05-07 14:17:38 +00:00
KATO Takenori 7831f8aee1 Synchronize with sys/i386/isa/isa.c revision 1.84. 1997-05-07 14:15:11 +00:00
Joerg Wunsch 08ed607a09 Hide the kernel-only stuff inside #ifdef KERNEL.
XXX should be #ifdef _KERNEL
XXX^2 the !KERNEL part should probably be moved out into a publically
      visible header file anyway.
1997-05-07 13:23:04 +00:00
Kazutaka YOKOTA df25dec0e5 Now that we have replaced video-related block copy calls with
sc_bcopy(), which is generic_bcopy() in reality, there is no point in
retaining bcopyw() calls in the source code.
OKed by : sos
1997-05-07 10:42:06 +00:00
Eivind Eklund 48ea0bec18 Make a lot of include-files self-contained. I excluded the patches changing
int's to gid_t and uid_t - should I commit these, too?

Closes PR misc/2625.

Submitted by:	Julian Assange <proff@iq.org>
1997-05-07 02:27:18 +00:00
Steve Passe f258030f39 Force user to config SMP kernel with "options APIC_IO".
Reviewed by:	Peter Wemm <peter@spinner.DIALix.COM>
1997-05-06 21:29:57 +00:00
Bill Fenner 86b1d6d24d Pull up the IP header in ip_mloopback(). This makes sure that the
operations on the header inside ip_mloopback() are performed on
a private copy instead of a shared cluster.

PR:		kern/3410
1997-05-06 21:22:04 +00:00
Steve Passe 113656909f Make ident equal file name, ie SMP-GENERIC. 1997-05-06 20:40:52 +00:00
Steve Passe 53850c2fb0 A *little* more descriptive test for options. 1997-05-06 18:24:17 +00:00
Steve Passe 3cc17cf950 Added a generic config file for SMP kernels. 1997-05-06 18:18:51 +00:00
Poul-Henning Kamp 8670684a2f Fix a race condition that did, after all, exist.
Reviewed by:	phk
Submitted by:	dfr
1997-05-06 15:19:38 +00:00
Doug Rabson 77e25db56d Add SMPHDRS to CLEANFILES instead of replacing its current value. 1997-05-06 14:29:56 +00:00
Steve Passe 75877d5a93 removed the "#error ..." line preventing casual invokation of SMP_AUTOSTART.
autostart appears to be working now, at least on my dual P6.
I have no explanation why....
1997-05-06 07:10:06 +00:00
Alexander Langer af28de7ca8 Create the default rule with flags IP_FW_F_IN | IP_FW_F_OUT.
Closes PR#3100.
1997-05-06 02:12:18 +00:00
Steve Passe 2479ac60b9 Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system.
 - NOT yet verified on the affected motherboard.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-05 22:56:37 +00:00
Steve Passe 08896efb1a Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system.
 - NOT yet verified on the affected motherboard.

Stifle an annoying dma_start busy message for the sound cards.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-05 22:56:13 +00:00
John-Mark Gurney dc01e23eda use frames instead of fields, and restore full meteor compatibility for
generalized pixel support.

Submitted by: Amancio Hasty
1997-05-05 20:54:54 +00:00
KATO Takenori 7a13a66696 Use `MediaGX' instead of `Gx86'. 1997-05-05 14:30:00 +00:00
KATO Takenori a74ff881b7 Use `M2' instead of `6x86 with MMX'. Cyrix seems to use `M2' officially. 1997-05-05 14:11:09 +00:00
Joerg Wunsch 5adee135aa Duplicate the TOC handling ioctls from the cd(4) driver. Duplicating
the work is silly, and all this will be a moot point with Justin's CAM
driver, and there are still many ioctls missing -- but i need these
right now.  It's silly to need to move the CD-R back to the other
drive in order to determine the session start info when burning multi-
session CD-Rs.
1997-05-05 13:35:01 +00:00
KATO Takenori 3d4b9d32d8 Extended copyright of PC-98 to 1997. 1997-05-05 13:24:16 +00:00
KATO Takenori c231b961b4 Synchornize with sys/i386/isa/clock.c revision upto 1.94. 1997-05-05 13:13:47 +00:00
KATO Takenori a98486e305 Synchronize with sys/i386/i386/trap.c revision 1.94. 1997-05-05 13:12:52 +00:00
Peter Wemm f435322e07 correct the order of the variables
use #ifdef where possible instead of #if defined

Submitted by: the KNF police, ie: bde :-)
1997-05-05 09:34:33 +00:00
John Dyson b332d9a66e Make sure that *fork() always returns with %edx == 1 in the
child.  This was sometimes not happening correctly during my
threads code work.
1997-05-05 04:08:12 +00:00
Joerg Wunsch 62102247f6 Oops. The function cd9660_mountroot() is gone, but i've committed an
even more bogus prototype for it in my previous commit.
1997-05-04 16:17:49 +00:00
Joerg Wunsch 5a9714de76 This mega-commit brings the following:
. It makes cd9660 root f/s working again.
. It makes CD9660 a new-style option.
. It adds support to mount an ISO9660 multi-session CD-ROM as the root
  filesystem (the last session actually, but that's what is expected
  behaviour).

Sigh.  The CDIOREADTOCENTRYS did a copyout() of its own, and thus has
been unusable for me for this work.  Too bad it didn't simply stuff
the max 100 entries into the struct ioc_read_toc_entry, but relied on
a user supplied data buffer instead. :-(  I now had to reinvent the
wheel, and created a CDIOREADTOCENTRY ioctl command that can be used
in a kernel context.

While doing this, i noticed the following bogosities in existing CD-ROM
drivers:

wcd:	This driver is likely to be totally bogus when someone tries
	two succeeding CDIOREADTOCENTRYS (or now CDIOREADTOCENTRY)
	commands with requesting MSF format, since it apparently
	operates on an internal table.

scd:	This driver apparently returns just a single TOC entry only for
	the CDIOREADTOCENTRYS command.

I have only been able to test the CDIOREADTOCENTRY command with the
cd(4) driver.  I hereby request the respective maintainers of the
other CD-ROM drivers to verify my code for their driver.  When it
comes to merging this CD-ROM multisession stuff into RELENG_2_2 i will
only consider drivers where i've got a confirmation that it actually
works.
1997-05-04 15:24:23 +00:00
Poul-Henning Kamp 8189ded32e Now I can even execute "df" on my diskless :-) 1997-05-04 15:04:49 +00:00
Peter Wemm b455e1e981 don't #ifdef out reference to i586_ctr_freq. 1997-05-04 14:28:22 +00:00
Peter Wemm 26e5316524 Don't remove i586_ctr_freq from scope, leave it defined as zero. This
simplifies some assumptions and stops some code compile problems.

This should fix the compile hiccup in PR#3491, but smp kernel profiling
isn't likely to be fixed by this.
1997-05-04 14:25:00 +00:00
Poul-Henning Kamp b15a966ec6 1. Add a {pointer, v_id} pair to the vnode to store the reference to the
".." vnode.  This is cheaper storagewise than keeping it in the
    namecache, and it makes more sense since it's a 1:1 mapping.

2.  Also handle the case of "." more intelligently rather than stuff
    the namecache with pointless entries.

3.  Add two lists to the vnode and hang namecache entries which go from
    or to this vnode.  When cleaning a vnode, delete all namecache
    entries it invalidates.

4.  Never reuse namecache enties, malloc new ones when we need it, free
    old ones when they die.  No longer a hard limit on how many we can
    have.

5.  Remove the upper limit on namelength of namecache entries.

6.  Make a global list for negative namecache entries, limit their number
    to a sysctl'able (debug.ncnegfactor) fraction of the total namecache.
    Currently the default fraction is 1/16th.  (Suggestions for better
    default wanted!)

7.  Assign v_id correctly in the face of 32bit rollover.

8.  Remove the LRU list for namecache entries, not needed.  Remove the
    #ifdef NCH_STATISTICS stuff, it's not needed either.

9.  Use the vnode freelist as a true LRU list, also for namecache accesses.

10. Reuse vnodes more aggresively but also more selectively, if we can't
    reuse, malloc a new one.  There is no longer a hard limit on their
    number, they grow to the point where we don't reuse potentially
    usable vnodes.  A vnode will not get recycled if still has pages in
    core or if it is the source of namecache entries (Yes, this does
    indeed work :-)  "." and ".." are not namecache entries any longer...)

11. Do not overload the v_id field in namecache entries with whiteout
    information, use a char sized flags field instead, so we can get
    rid of the vpid and v_id fields from the namecache struct.  Since
    we're linked to the vnodes and purged when they're cleaned, we don't
    have to check the v_id any more.

12. NFS knew about the limitation on name length in the namecache, it
    shouldn't and doesn't now.

Bugs:
        The namecache statistics no longer includes the hits for ".."
        and "." hits.

Performance impact:
        Generally in the +/- 0.5% for "normal" workstations, but
        I hope this will allow the system to be selftuning over a
        bigger range of "special" applications.  The case where
        RAM is available but unused for cache because we don't have
        any vnodes should be gone.

Future work:
        Straighten out the namecache statistics.

        "desiredvnodes" is still used to (bogusly ?) size hash
        tables in the filesystems.

        I have still to find a way to safely free unused vnodes
        back so their number can shrink when not needed.

        There is a few uses of the v_id field left in the filesystems,
        scheduled for demolition at a later time.

        Maybe a one slot cache for unused namecache entries should
        be implemented to decrease the malloc/free frequency.
1997-05-04 09:17:38 +00:00
Peter Wemm 653abe61a6 Finish off and activate the smp_active sysctl handler.. 1997-05-04 02:08:09 +00:00
Joerg Wunsch a5e62cce18 Add the Archive 4586NP tape changer.
PR:		kern/3481
Submitted by:	bruce@zuhause.mn.org (Bruce Albrecht)
1997-05-03 22:23:13 +00:00
Joerg Wunsch ce34628b4b Fix the umount problems for DEVFS.
PR:		3276 & 3469 (the fixes), 2738, 2033 (reports)
Submitted by:	Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1997-05-03 21:19:54 +00:00
Peter Wemm a912e453bc add SIOC{S,G}IFMEDIA ioctl support 1997-05-03 21:07:13 +00:00
Peter Wemm 1cde3a7e02 add net/if_media.c 1997-05-03 21:06:00 +00:00
Peter Wemm 6a2275ddbf define SIOC{SG}IFMEDIA ioctls
Obtained from: NetBSD
1997-05-03 21:05:03 +00:00
Peter Wemm dca8fa3b0d Make it compile on FreeBSD, add $Id$ 1997-05-03 20:58:10 +00:00
Peter Wemm f94bb78809 Backend support for if_media interface ioctl's. This is for supporting
the many-mode, many-media-option type ethernet cards, in particular, the
new if_de.

Obtained from: NetBSD  (Their implementation of BSDI's design)
1997-05-03 20:54:36 +00:00
Peter Wemm 0b6a73a276 This commit was generated by cvs2svn to compensate for changes in r25428,
which included commits to RCS files with non-trunk default branches.
1997-05-03 20:54:36 +00:00
Steve Passe 356b97e402 disabled checks for smp_active == 0.
this was wasting precious cycles for no apparent (to me) reason.
it is currently bracketed by BOTHER_TO_CHECK, define to restore old behaviour.
1997-05-03 19:24:16 +00:00
Steve Passe 9999694073 code to allow range checking on smp_active.
disabled by default, not sure its ready for prime time.

Submitted by:	 Peter Wemm <peter@spinner.DIALix.COM>
1997-05-03 18:24:25 +00:00
Steve Passe 004cb62334 added declaration for get_isa_apic_mask().
Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 18:05:31 +00:00
Steve Passe 6e1ed0bec1 improved io_apic_setup().
deals with motherboards that map ISA IRQs to APIC IRQS above 15.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 18:01:56 +00:00
Steve Passe 462e62c9a0 new function to turn an APIC pin# into an INT mask.
added missing APIC_IO define.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 17:42:01 +00:00
Poul-Henning Kamp 29eb228ebb Recognize, but don't actually do much with a TI PCI1130 PcCard/CardBus bridge. 1997-05-03 13:57:26 +00:00
Poul-Henning Kamp b038679c5c Initialize PCI/CardBus bridges.
Tested on:	HP Omnibook 800 / TI PCI1130
Reviewed by:	se
1997-05-03 13:52:29 +00:00
Poul-Henning Kamp 1c337dcffe Make nfs roots (diskless) functional again. It may still not be correct,
but it is functional.
1997-05-03 13:42:50 +00:00
KATO Takenori 32cfb899a6 Fixed panic message in union_lock(): union_link --> union_lock. 1997-05-03 01:55:19 +00:00
KATO Takenori 5f3f68a8ba Access correct union mount point in union_access. Old vnode is saved
in savedvp variable and it is used for the argument of
MOUNTTOUNIONMOUNT().  I didn't realize ap->a_vp is modified before
MOUNTTOUNIONMOUNT(), so the change by revision 1.22 is incorrect.
1997-05-02 03:21:54 +00:00
Steve Passe a1b7127157 cleaned up FAST_IPI code.
- one-liners all become inline.
 - multi-liners become functions.
 - FAST_IPI defines go away.

re-worked APICIPI_BANDAID code.
 - now refered to as DETECT_DEADLOCK.
 - on by default.
1997-05-01 19:33:12 +00:00
Steve Passe f3a946e800 fixed spelling error.
Submitted by:	Bruce Albrecht <bruce@zuhause.mn.org>
1997-05-01 19:27:58 +00:00
Søren Schmidt e59f3105f6 Make ccd use the maxsecsize sector size as denominator, this
fixes ccd on != 512byte devices..
1997-05-01 19:18:40 +00:00
Søren Schmidt 19accede88 Remove old code in #if 0, leftovers from the days before != 512byte
sector support.
1997-05-01 19:15:38 +00:00
Søren Schmidt e34cbf1f59 Remove the dependancy on DEV_BSIZE, now specfs works on != 512byte
sector devices given that the fs uses a blocksize of at least a physical
sector size.
1997-05-01 19:12:22 +00:00
John Dyson 6160099735 Check the correct queue for waking up the pageout daemon. Specifically,
the pageout daemon wasn't always being waken up appropriately when the
(cache + free) queues were depleted.
Submitted by:	David S. Miller <davem@jenolan.rutgers.edu>
1997-05-01 14:36:01 +00:00
Peter Wemm 29c70804e6 This is obvious to people who've been using the smp kernel for a while,
but now that we've widened the scope of the smp work to -current, it might
be an idea to warn new people that might not have read all the docs yet
that the SMP support needs to be activated via a sysctl.
1997-05-01 14:18:05 +00:00
John Hay c190e1506b Oops I missed one of the pr_usrreqs changes. 1997-05-01 12:24:20 +00:00
KATO Takenori d41c4b458b Synchronize with sys/i386/isa/syscons.c up to revision 1.213. 1997-05-01 11:28:49 +00:00
John Hay a6eb92a6a4 Make ipx compile again after the network interface changes. 1997-05-01 06:21:31 +00:00
Jordan K. Hubbard 47812774fd Also quiet down the ibcs2 startup (same reason as linux lkm - it screws
the console output).
1997-05-01 06:09:01 +00:00
Jordan K. Hubbard a5506b985f Merge 1.8.2.1 into -current. 1997-05-01 06:08:14 +00:00
Steve Passe 8e19a74e8d Fixed omission of reference to ioctl_bt848.h when installing on 2.2. 1997-05-01 00:42:54 +00:00
Steve Passe 044768d848 1.15 4/18/97 John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Added [SR]RGBMASKs ioctl for byte swapping.

 1.16          4/20/97    Randall Hopper <rhh@ct.picker.com>
                          Generalized RGBMASK ioctls for general pixel
                          format setting [SG]ACTPIXFMT, and added query API
                          to return driver-supported pix fmts GSUPPIXFMT.

 1.17          4/21/97    hasty@rah.star-gate.com
                          Clipping support added.

 1.18          4/23/97    Clean up after failed CAP_SINGLEs where bt
                          interrupt isn't delivered, and fixed fixing
                          CAP_SINGLEs that for ODD_ONLY fields.

Submitted by:   individuals in above log messages.
1997-05-01 00:16:31 +00:00
Steve Passe 4abfa50b62 1.15 4/18/97 John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Added [SR]RGBMASKs ioctl for byte swapping.

 1.16          4/20/97    Randall Hopper <rhh@ct.picker.com>
                          Generalized RGBMASK ioctls for general pixel
                          format setting [SG]ACTPIXFMT, and added query API
                          to return driver-supported pix fmts GSUPPIXFMT.

 1.17          4/21/97    hasty@rah.star-gate.com
                          Clipping support added.

 1.18          4/23/97    Clean up after failed CAP_SINGLEs where bt
                          interrupt isn't delivered, and fixed fixing
                          CAP_SINGLEs that for ODD_ONLY fields.

Submitted by:	individuals in above log messages.
1997-05-01 00:15:30 +00:00
Steve Passe 7f7578c815 removed:
opt_smp_invltlb.h
from:
SMPHDRS=        opt_smp.h opt_smp_invltlb.h

SMP_INVLTLB is no longer a valid config option, the invalidation of the TLB
via inter-CPU IPIs is now standard when APIC_IO is used.
1997-04-30 21:54:01 +00:00
Bruce Evans 035e8553c0 Fixed the SMP fixes:
- fixed dependencies so that `make depend' isn't necessary.
- added new files to CLEANFILES.
- fixed style.
1997-04-30 20:56:37 +00:00
Steve Passe dff5c18abc changed expect_lock() to try_lock(), the real name used in mplock.s 1997-04-30 19:04:26 +00:00
Garrett Wollman 8fa5c00fd1 Remove SO_PRIVSTATE socket option; it is no longer necessary, nor implemented
in the kernel.  inetd should automatically notic that it has gone away
once it is recompiled.
1997-04-30 15:32:52 +00:00
Andrey A. Chernov 8a13426b30 Restore CRTC start address check back after looking into more sources 1997-04-30 15:31:22 +00:00
Doug Rabson 1c1284da73 Add D_DISK flag to vn_bdevsw. 1997-04-30 11:16:25 +00:00
Doug Rabson 6382d3ad84 Allow NULL rpcs on non-privileged ports at all times to work around broken
clients.

PR:		kern/3298
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-04-30 09:51:37 +00:00
Andrey A. Chernov ba11dfa74c bugfix: 'make depend' cause all LKMs rebuild 1997-04-30 06:04:17 +00:00
John Dyson 82b8e119b4 Staticize an unnecessarily global function: vputrele.
Submitted by:	 Michael Hancock <michaelh@cet.co.jp>
1997-04-30 03:09:15 +00:00
Andrey A. Chernov bfc43e99c4 In comp_vgaregs skip cursor shape and 4 unused bytes (6 total)
instead of 2 unused.
Previus code broke syscons on Diamond Stealth 3D 3000
(video mode ptr was NULL with no real reason)
1997-04-30 01:19:21 +00:00
Steve Passe 04964d153d Enabled 'FIX_MP_TABLE_WORKS' code.
This code re-numbers PCI busses in the MP table to match PCI semantics
when the MP BIOS fails to do it properly.

Reviewed by:	Peter Wemm <peter@spinner.DIALix.COM>
1997-04-29 22:12:32 +00:00
Peter Wemm 176c49e057 Use a common numbering of the tty and net software interrupt levels
between the SMP and non-SMP case.  It simplifies the #ifdef's, since
NHWI changes (at least for the moment) when APIC's are involved.
1997-04-29 20:05:48 +00:00
Peter Wemm f2b65e7983 Remove stale comment, as suggested by Bruce. 1997-04-29 20:00:41 +00:00
Joerg Wunsch 7d322c735e For multi-session CD-ROMs, we have to account for previous sessions as
well in volume_space_size.  Otherwise, NFS exports won't work.
1997-04-29 17:11:51 +00:00
Joerg Wunsch 3e1cf43148 Add support for ISO9660 multi-session CD-ROMs. This is just nothing
but searching the directory on something else than the default
location.

NB: this comprises an interface change to the mount_cd9660(8)
utility (commit will follow).  You need to rebuild both.

I've got similar patches for RELENG_2_2, should i commit them too?
1997-04-29 15:52:53 +00:00
John Polstra 298c8e3d6b Fix a bug that caused some false mismatches when both FNM_PATHNAME
and FNM_LEADING_DIR were specified and the pattern ended with "*".
Example: pattern="src/usr.sbin/w*", string="src/usr.sbin/watch/watch.8,v".
This should match, but did not.
1997-04-29 03:24:57 +00:00
KATO Takenori 1a0345d543 Synchronize with sys/i386/conf/options.i386 and sys/i386/isa/wd.c
revisions 1.43 and 1.129, respectively.
1997-04-29 03:15:47 +00:00
KATO Takenori a9320ff3bd Revised fix for locking violation when unionfs calls vput with
UN_KLOCK flag.

When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear
UN_ULOCK flag.  To do this, when UN_KLOCK is set, (1) union_unlock
clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not
access uppervp and does not clear UN_KLOCK, and (3) callers of
vput/VOP_UNLOCK should clear UN_KLOCK.  For example, vput becomes:

	SETKLOCK(union_node);
	vput(vnode);
	CLEARKLOCK(union_node);

where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears
UN_KLOCK.
1997-04-29 02:06:07 +00:00
Stefan Eßer 862b403b04 Move CMD640 option from kernel Makefile into opt_wd.h
Submitted by:		Wolfgang Helbig <helbig@mx.ba-stuttgart.de>
1997-04-28 19:26:18 +00:00
KATO Takenori e17f70a00d Synchronize with sys/i386/isa/isa.c revision 1.83. 1997-04-28 15:51:15 +00:00
KATO Takenori 9a2660b252 Synchornize with sys/i386/conf/options.i386 revision 1.42. 1997-04-28 15:49:55 +00:00
KATO Takenori 4c59a618e7 Synchronize with sys/i386/conf/Makefile.i386 revision 1.95. 1997-04-28 15:48:49 +00:00
Jordan K. Hubbard 0f10d94d32 Mount MFS read/write as in days of yore. 1997-04-28 09:15:18 +00:00
Steve Passe 7b2a188c7a cleaned out an old FIXME. 1997-04-28 08:39:48 +00:00
Mike Smith 28f6972b6e Always include PROT_READ for Linux mmap operations.
Submitted by:	Hannu Savolainen <hannu@voxware.pp.fi> via jkh
1997-04-28 02:53:17 +00:00
Steve Passe f50a491f78 removed TEST_CPUHITS code.
replaced push/pop of %ds with use of 'ss' prefix in Xinvltlb.

Submitted by:	 Bruce Evans <bde@zeta.org.au>
1997-04-28 01:47:55 +00:00
Steve Passe e1c8d46561 removed TEST_CPUHITS code. 1997-04-28 01:46:31 +00:00
Steve Passe 34e63b4cd7 removed all the TEST_UPPERPRIO crud. 1997-04-28 01:08:47 +00:00
Steve Passe 2c5d02fff3 remove all the SMP_INVLTLB defines, making the code default for APIC_IO.
Reviewed by:	informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
1997-04-28 00:25:00 +00:00
Steve Passe 2b45006334 remove the SMP_INVLTLB option, making the code default for APIC_IO.
Reviewed by:	informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
1997-04-28 00:24:28 +00:00
Steve Passe 9caa2d558d remove all the SMP_INVLTLB defines, making the code default for APIC_IO.
replace invldebug with invltlb_ok for throttling smp_invltlb() during boot.

Reviewed by:	informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
1997-04-28 00:24:00 +00:00
Steve Passe 066da549d4 Submitted by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
make world fails when it tries to build LKMs because the files
	opt_smp.h
	opt_smp_invltbl.h
are missing.

This patch to /usr/src/share/mk/bsd.kmod.mk is a temporary workaround.

Note that LKMs built in this way may or may NOT work properly with an
SMP kernel.
1997-04-28 00:02:22 +00:00
Alexander Langer 898fcb3b84 Removed bogon from previous commit: doubly included sys/systm.h. 1997-04-27 21:32:21 +00:00
Alexander Langer cf72998ef3 Remove bogon from previous commit: doubly included sys/systm.h. 1997-04-27 21:26:29 +00:00
Steve Passe 296bffc9c0 informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>

removed all the IPI_INTS code.
made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
cleanup of i386/isa/isa_device.h to eliminate SMP dependancies:
  made the id_irq member of struct isa_device an u_int.
  made the id_drq member of struct isa_device an int.
  removed all other '#ifdefs' concerning SMP & APIC_IO.
removed SMP/APIC_IO dependancies from if_ze.c.
1997-04-27 21:18:59 +00:00
Steve Passe 2897614119 informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>

removed all the IPI_INTS code.
made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
1997-04-27 21:17:56 +00:00
Peter Wemm d061973c76 Create a special option file "opt_global.h" which is included by all
source files via a 'cc -include opt_global.h ...' type arrangement.
This means we can untangle certain header files.

options.i386 has a placeholder until it has a real member so we can avoid
having to teach config about it just yet.

Reviewed by: bde
1997-04-27 20:01:47 +00:00
Garrett Wollman a29f300e80 The long-awaited mega-massive-network-code- cleanup. Part I.
This commit includes the following changes:
1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility
glue for them is deleted, and the kernel will panic on boot if any are compiled
in.

2) Certain protocol entry points are modified to take a process structure,
so they they can easily tell whether or not it is possible to sleep, and
also to access credentials.

3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt()
call.  Protocols should use the process pointer they are now passed.

4) The PF_LOCAL and PF_ROUTE families have been updated to use the new
style, as has the `raw' skeleton family.

5) PF_LOCAL sockets now obey the process's umask when creating a socket
in the filesystem.

As a result, LINT is now broken.  I'm hoping that some enterprising hacker
with a bit more time will either make the broken bits work (should be
easy for netipx) or dike them out.
1997-04-27 20:01:29 +00:00
Alexander Langer ee7877dfec Prevent debugger attachment to init when securelevel > 0.
Noticed by:	Brian Buchanan <brian@wasteland.calbbs.com>
1997-04-27 19:02:37 +00:00
KATO Takenori 589ede60a1 Delete opt_ddb.h. 1997-04-27 13:41:08 +00:00
KATO Takenori fb2d1dd12a Synchronize with sys/i386/isa/syscons.c revision 1.211. 1997-04-27 13:23:29 +00:00
KATO Takenori e1ee467aaf Merge SMP code from IBM-PC tree into PC-98 tree. 1997-04-27 13:22:09 +00:00
Peter Wemm a8a74574b2 Whoops.. We forgot to turn off the 4MB Virtual==Physical mapping at address
zero from bootstrap in the non-SMP case.

Noticed by: bde
1997-04-27 12:11:43 +00:00
KATO Takenori c4ace78562 Undo 1.29. 1997-04-27 10:49:37 +00:00
Kazutaka YOKOTA d75a8fdbb1 Addresses the following two problems.
1) i586_bcopy() problem

There have been a number of reports that the syscons doesn't work
properly if i586_bcopy() is enabled.

The problem prevented users from installing 2.2(.1)-RELEASE.  The
symptom is that the system looks frozen during device probe or just
before the main installation menu.  The workaround was to specify the
flag 0x01 to the npx device so that i586_bcopy() is disabled.

The patch forces the syscons to call generic_bcopy() when copying
to/from the video memory, even if CPU is Pentium and i586_bcopy() is
enabled. i586_bcopy() is still called for copy operations between
non-video memory regions.

PR: kern/2277, kern/3066, kern/3107, kern/3134

2) video mode parameter table problem

The syscons reads and uses the video mode parameter table provided by
the VGA BIOS to set VGA registers when changing video mode and
modifying font data. It appears that in some VGA BIOSes the table is
not ordered as the syscons expects, and this leads to screen
corruption.

The problem prevented users from installing 2.2(.1)-RELEASE. The
symptom is the corrupt screen or strange vertical lines soon after the
kernel is loaded into memory (just after the kernel decompression).

The patch performs simplistic test and if it fails, set video_mode_ptr
to NULL so that the video mode switching won't happen.

This is an interim kludge. There should be a better way to deal with
the problem.

PR: kern/2498, conf/2775, conf/3354

Reviewed by: sos
Tested by: PR originators (not all of them, though)
1997-04-27 09:03:10 +00:00
Poul-Henning Kamp 7594bf018f Add some more "member functions" to these. Still not complete. 1997-04-27 08:31:17 +00:00
Peter Wemm db7df99ff1 Try and make these usermode safe, Steve beat me in finding these.. 1997-04-26 20:04:21 +00:00
Peter Wemm e80a59970c fix & instead of && in #if statement
reorder #includes to alphabetical order

Noted by: bde
1997-04-26 19:47:59 +00:00
Peter Wemm fbf8a6b7cb change #if 0 to #ifdef KERNEL since this is pretty important for
smp compiling.  It still leaves dset non-functional on smp kernels, but
we've been doing that all along with the private smp tree anyway.
1997-04-26 19:26:37 +00:00
Peter Wemm 73f4384dc1 Remove the curproc printing on trap/interrupt/etc. It's outlived it's
usefulness, and there were problems with it anyway.

Found by: bde
1997-04-26 19:12:03 +00:00
Steve Passe bb625c15c9 #if'ed out the '#include "opt_smp.h"' line.
The SMP source was merged into 3.0-current last nite and this broke
the make of sbin/dset.

Should make things work for non-SMP case.

People making SMP kernels will need to edit i386/isa/isa_device.h, re-enabling
'#include "opt_smp.h"'.  People making SMP worlds will have to punt for now...
I'm thinking about the real solution, but for now the goal is to NOT break
the world!
1997-04-26 19:07:36 +00:00
Peter Wemm c9c20622ad Back out bogus code that slipped past my read of the pre-merge diff
(Problems noted by Bruce)
1997-04-26 18:59:42 +00:00
Peter Wemm acc7657309 Fix some SMP merge bugs (from Bruce) -
#include out of order
pccard_configure() called twice
munged tab (existing problem made worse)
1997-04-26 18:57:34 +00:00
Peter Wemm c76e95c3c7 Create sysctl kern.fast_vfork, on for uniprocessor by default, off for
SMP.
1997-04-26 15:59:50 +00:00
Peter Wemm c32ba2484e Disable RFMEM in vfork for smp case.. It doesn't seem to work too well
yet..
1997-04-26 14:31:36 +00:00
KATO Takenori a18ac0ffaf Do nothing instead of adjusting un_flags when (uppervp is locked) &&
(UN_ULOCK is not set) in union_lock.  This condition may indicate
race.  DIAGNOSTIC kernel still panic here.
1997-04-26 13:43:25 +00:00
Peter Wemm 477a642cee Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to
come over the next few days.

The kernel should run pretty much "as before" without the options to
activate SMP mode.

There are a handful of known "loose ends" that need to be fixed, but
have been put off since the SMP kernel is in a moderately good condition
at the moment.

This commit is the result of the tinkering and testing over the last 14
months by many people.  A special thanks to Steve Passe for implementing
the APIC code!
1997-04-26 11:46:25 +00:00
Justin T. Gibbs 539fc95753 Print out some more diagnostic information when we reject a message.
When we request sense, don't allow disconnection.  This closes a window
where we might allow an overlapped tagged and non-tagged transaction.
The correct fix is to freeze the queue for the target that requests sense
which is what will happen in the new CAM framework.
1997-04-26 05:03:18 +00:00
KATO Takenori 928e13b6a1 Do not clear UN_ULOCK in certain case.
Our vput calls vm_object_deallocate() --> vm_object_terminate().  The
vm_object_terminate() calls vn_lock(), since UN_LOCKED has been
already cleared in union_unlock().  Then, union_lock locks upper vnode
when UN_ULOCK is not set.  The upper vnode is not unlocked when
UN_KLOCK is set in union_unlock(), thus, union_lock tries to lock
locked vnode and we get panic.
1997-04-26 04:09:40 +00:00
KATO Takenori 9ca8226735 Add new cpu type, CPU_CY486DX, which shows Cyrix 486S/DX series CPUs,
and initialization routine for those CPUs.

Tested by:	Bob Bishop <rb@gid.co.uk>
1997-04-26 04:08:54 +00:00
KATO Takenori fc8cbbc9b7 Synchronize with sys/i386/boot/biosboot/Makefile and
sys/i386/boot/rawboot/Makefile revsions 1.56 and 1.7, respectively.
1997-04-26 04:00:25 +00:00
Bruce Evans 72fa3798b4 Removed LDADD=-lc and associated DPADD. libc would probably break
things if it were actually used.
1997-04-25 19:38:01 +00:00
Doug Rabson be4952f1df Don't zero b_dirtyoff and b_dirtyend on error.
Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1997-04-25 11:14:00 +00:00
Peter Wemm 5f61c81d66 copyin the export network mask to the correct variable.
Submitted by: Mike Hibler <mike@marker.cs.utah.edu>, PR#3380
1997-04-25 06:47:12 +00:00
Justin T. Gibbs cd6867d0d3 The following scenario would result in a bogus residual being reported
if SCB Paging was enabled:

    disconnect with more data to transfer
    disconnected SCB gets paged out
    target reconnects so we page SCB back in
    target completes transfer so residual is 0
    target disconnects
    SCB gets reused but not paged out since the residual is 0 (optimization)
    target reconnects so we page the SCB back in
    we report a residual because of stale residual information.

The fix for this is to set a flag that forces the SCB to be paged back
up to the host if we page in an SCB with a residual

Pointed out by: Doug Ledford <dledford@dialnet.net>
1997-04-24 16:52:18 +00:00
Stefan Eßer 760b5bf213 Add definition of PCI_SUBID_REG2, the subvendor/device ID for
a header type 2 device.
1997-04-24 08:03:31 +00:00
Andrey A. Chernov 0eaa559cbf Restore memory space separation (RFMEM) for vfork() after
shell imgact memory clobbering fixed
1997-04-23 22:13:18 +00:00
Andrey A. Chernov 5cf3d12ca5 Don't clobber user space argv0 memory on shell exec, mainly for vfork()
Fix another bug: if argv[0] is NULL, garbadge args might be added for
shell script
Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no> (with yet one fault detect from me)
1997-04-23 22:07:05 +00:00
Andrey A. Chernov a68c4b561f Add argv0 field for imgact structure - for replacing argv0 in shell
image activator
Submitted by:  Tor Egge <Tor.Egge@idi.ntnu.no>
1997-04-23 22:02:37 +00:00
Stefan Eßer 7cb74fcfa2 Add preliminary support for PCI config header type 2:
Fetch subvendor/device ID from config space register 0x40.
1997-04-23 19:43:20 +00:00
Bruce Evans a862685541 Fixed longstanding profiling bug. The frame pointer wasn't set up
for syscalls, so one frame was lost in backtraces from syscalls.
This is handled better in the kernel by using a different mcount
entry point for profiling before the frame pointer is set up.

Expand RCSID().

Use .p2align instead of the ambiguous .align.

Added idempotency ifdef.

Removed unused macros ALTENTRY(), ALTASENTRY(), ASENTRY(), _MID_ENTRY.

Cleaned up formatting.

Reviewed by:	jdp reviewed an old version
Obtained from:	parts from NetBSD
1997-04-23 19:26:04 +00:00
John Dyson 6b707440d3 Give up on the fast vfork() for a while. 1997-04-23 01:59:14 +00:00
David Greenman 0633918017 Check that the received packet length indicated by the card is at least
large enough to contain the ethernet header. There appears to be a
condition where the card can return "0" in some failure cases, and this
causes bad things to happen (a panic).
1997-04-23 01:44:30 +00:00
Doug Rabson 9aa2858d44 Fix broken usage of nm_readdirsize and increase the socket buffers for UDP
to prevent possible socket overflows.

2.2 candidate.

PR:		kern/3304
Reviewed by:	Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
1997-04-22 17:38:01 +00:00
KATO Takenori aae8fb345f Synchronize with sys/i386/conf/Makefile.i386, sys/i386/i386/machdep.c
and sys/i386/isa/npx.c revisions 1.94, 1.238 and 1.41, respectively.
1997-04-22 12:20:50 +00:00
John Polstra 9081eec1fb Make the necessary changes so that an ELF kernel can be built. I
have successfully built, booted, and run a number of different ELF
kernel configurations, including GENERIC.  LINT also builds and
links cleanly, though I have not tried to boot it.

The impact on developers is virtually nil, except for two things.
All linker sets that might possibly be present in the kernel must be
listed in "sys/i386/i386/setdefs.h".  And all C symbols that are
also referenced from assembly language code must be listed in
"sys/i386/include/asnames.h".  It so happens that failure to do
these things will have no impact on the a.out kernel.  But it will
break the build of the ELF kernel.

The ELF bootloader works, but it is not ready to commit quite yet.
1997-04-22 06:55:47 +00:00
Kazutaka YOKOTA 29c78ed5ef Fixed typo in the set_keyboard_param().
Spotted by: Philippe Charnier@xp11.frmug.org
1997-04-22 02:04:15 +00:00
KATO Takenori 18b4c8e206 Dirty change in union_lock(). Sometimes upper vnode is locked without
UN_ULOCK flag.  This shows a locking violation but I couldn't find the
reason UN_ULOCK is not set or upper vnode is not unlocked.  I added
the code that detect this case and adjust un_flags.  DIAGNOSTIC kernel
doesn't adjust un_flags, but just panic here to help debug by kernel
hackers.
1997-04-21 15:32:24 +00:00
Peter Wemm 92da7e012d Send this to the Attic so there's no mixups over which kern_lock.c is in
use in -current.
1997-04-21 13:39:56 +00:00
Nate Williams a4586acb0c - Better fix for 3C589D support. Revert previous changes and add a
delay after we reset the card to allow the card to come back to life.
  It appears the newer card takes longer to reset.

Submitted by:	Samuel Lam <skl@ScalableNetwork.com>
1997-04-21 13:38:32 +00:00
KATO Takenori 077f31be53 Replace VOP_LOCK with vn_lock. 1997-04-21 12:40:42 +00:00
KATO Takenori 9d0f090d75 Synchronize with sys/i386/isa/lpt.c revision 1.60. 1997-04-21 12:33:26 +00:00
KATO Takenori 3f0906a547 Synchronize with sys/i386/isa/syscons.c.revision 1.210. 1997-04-21 12:31:31 +00:00
Bruce Evans 4b04349ab9 Fixed the type of a timeout function and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).
The timeout args still get bogusly cast from int to `void *' via
caddr_t and back to int.
1997-04-20 18:02:40 +00:00
Bruce Evans 20925249e7 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  mcd and scd were/are particularly bogus.  They
used a general purpose function taking 2 args for the timeout
function and fudged varargs stuff to supply the second arg for the
timeout case.  This broke `cc -mrtd'.  Bounce through a timeout
function instead.  The timeout arg still gets bogusly cast from
int to `void *' and back.
1997-04-20 17:26:55 +00:00
John Dyson 7cac787bee Fix both a problem with accessing backing objects, and also release
the process map on nonexistant pages.
PR:		kern/3327
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-04-20 17:12:11 +00:00
John Dyson c58494e476 Re-institute the efficent version of vfork. It appears to make a
difference of approx 3mins in make world on my P6!!!  This means
that vfork now has full address space sharing, so beware with
sloppy vfork programming.  Also, you really do need to apply
the previously committed popen fix in libc.
1997-04-20 16:57:12 +00:00
Bruce Evans 14da13a2f1 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  Not taking an arg in sequencer_timer() broke
`cc  -mrtd'.
1997-04-20 16:54:58 +00:00
Bruce Evans 8fb722b5e1 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).

Don't cast NULL in calls to timeout functions.  pcvt is fully prototyped
and doesn't support K&R.

Timeout functions take args of type `void *', so use magic numbers of
type `void *' for UPDATE_* to reduce the danger of wrong conversions.

Removed FreeBSD-pre-1.1-related TIMEOUT_FUNC_T macro.  It was especially
bogus for the pre-1.1 case.
1997-04-20 16:38:22 +00:00
Bruce Evans 5e994ca33f Fixed the type of timeout functions and removed casts that hid the
type mismatches.  Not taking an arg in scrn_timer() broke `cc -mrtd'.
1997-04-20 16:05:33 +00:00
Bruce Evans 7f10528533 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).

Removed NetBSD-related TIMEOUT macro.  NetBSD uses the same BSD4.4Lite
timeout interface as FreeBSD.  As a concession to portability, declare
the timeout function without using the FreeBSD timeout_t typedef.
1997-04-20 15:48:17 +00:00
Bruce Evans 5a837b22e5 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).
1997-04-20 15:36:12 +00:00
Bruce Evans 68f7a74b48 Fixed inconsistent extern declaration of a timeout function and
removed a cast that helped hide the problem.  There was no problem
in practice (at least on 386's).
1997-04-20 15:25:33 +00:00
Bruce Evans 8bd28861d8 Fixed linting of and compilation of the gcc byte-swapping macros
properly.  Simply don't use the gcc macros if we're not gcc, and
declare prototypes for the byte-swapping functions in case the
macro versions are not used.  The previous fix was wrong and broke
libpcap, which abuses -Dlint.

Don't pollute the namespace if _POSIX_SOURCE is defined.  This is
broken - it makes almost everything in <machine/endian.h> inaccessible
if _POSIX_SOURCE is defined, yet <machine/endian.h> is not a POSIX
header.  Other systems don't do it any better.

Removed always-false `BYTE_ORDER == BIG_ENDIAN' ifdef.
Obtained from:	partly from Lite(2?) and NetBSD
1997-04-20 11:44:32 +00:00
Poul-Henning Kamp b805b39e43 1. i82365.h: Chip identifiers should not be #ifdef PC98. Add identifier
(pt. unused) for TI PCI1130.

2. pccard.c: PCIC_RESUME_RESET is now (also) a sysctl.  (Never make it
    a #ifdef if it can be made a sysctl!)

3. pcic.c: make getb() and putb() proper member functions of struct
    pcic_slot.  Add a couple of missing casts.
1997-04-20 07:21:12 +00:00
Poul-Henning Kamp e4ccad941f The bit of the cardbus bridge support code se and I have been able to agree
on so far... :-)
Reviewed by:	se
1997-04-20 06:57:43 +00:00
Poul-Henning Kamp a688c7b0ee Fix up the "hlt vector" change I made.
Reviewed by:	bde, bde, bde
1997-04-20 06:41:26 +00:00
KATO Takenori 1a256e98e8 Synchronize with sys/i386/isa/diskslice_machdep.c revision 1.25. 1997-04-20 05:16:06 +00:00
KATO Takenori 3238d14c9e Synchronize with sys/i386/isa/sio.c revision 1.163. 1997-04-19 14:54:32 +00:00
Doug Rabson baaf1d96f0 Fix a bug where a program which appended many small records to a file could
wind up writing zeros instead of real data when the file is on an NFSv2
mounted directory.

While tracking this bug down, I noticed that nfs_asyncio was waking *all*
the iods when a block was written instead of just one per block.  Fixing this
gives a 25% performance improvment for writes on v2 (less for v3).

Both are 2.2 candidates.

PR:		kern/2774
1997-04-19 14:28:36 +00:00
Bruce Evans 0e4f24a34e Avoid division by 0 in check_part(). (It occurred when max_nsectors == 0.
This case is clearly an error, but we keep calling check_part() to get
diagnostics.)

Fixed nearby indentation and commenting bugs.
1997-04-19 14:14:17 +00:00
KATO Takenori 747e915757 Avoid `lock against myself' panic by following operation:
# mount -t union (or null) dir1 dir2
	# mount -t union (or null) dir2 dir1

The function namei in union_mount calls union_root.  The upper vnode
has been already locked and vn_lock in union_root causes above panic.

Add printf's included in `#ifdef DIAGNOSTIC' for EDEADLK cases.
1997-04-19 06:04:13 +00:00
KATO Takenori e747d90dbf Don't disable CPU cache in init_486dlc. If BIOS supports Cyrix 486,
BIOS enables CPU cache and other registers.  If BIOS does not supports
it, CPU cache is disabled at reset time.

This commit closes PR/3292.

PR:		3292
1997-04-19 05:25:19 +00:00
Bruce Evans 63e32a69f2 Don't call timeout() for DTR wakeup or busy check if the relevant timeout
is already active.  This fixes "timeout table full" panics under 100%
interrupt load and other weird conditions.
1997-04-18 18:28:09 +00:00
Justin T. Gibbs ba5da33265 No longer use AAP for queueing SCBs to the QINFIFO.
Clean up the unexpected busfree handler.  We now look directly at the
message that might have caused the bus free to occur instead of looking
at an SCB flag.  This makes the handling more robust and also allows for
recovery actions that might cause an "unexpected busfree" to be performed
even if an SCB is not availible to "tag".  Most notably, this happens
when we don't find an SCB for a reconnecting target.
1997-04-18 16:34:36 +00:00
Justin T. Gibbs 7bde50c604 Revert some changes to the selection and reselection code that were thought
to fix a selection timeout problem.

If we can't find an SCB for the reconnecting target, issue a bus device
reset as the SCSI2 spec suggests.

Add a missing call to "add_scb_to_free_list" in the non paging case.  In
the non-paging case, the SCBs don't really need to be on the free list,
but putting them there clears the tag field which is something the recovery
code depends on.
1997-04-18 16:31:55 +00:00
Doug Rabson 18cab10cb3 Don't allow partial buffers to be cluster-comitted.
Zero the b_dirty{off,end} after cluster-comitting a group of buffers.

With these fixes, I was able to complete a 'make world' with remote src
and obj directories.
1997-04-18 14:12:17 +00:00
Kazutaka YOKOTA 03dcce7f3d Incorporate kludge/fix from `syscons' ver 1.207 and 1.209.
1) Dell Latitude XPi
This laptop has a strange, IMHO broken :-), keyboard controller which
wouldn't disable the keyboard interrupt. The kludge is to disable tty
intr. during set_keyboard(), used for changing LED and setting
typematic.

The patch also changes the function name:
    set_keyboard() -> set_keyboard_param()
Although it is a static function, the name corrides with a routine in
`syscons' and is confusing when debugging the kernel which has both
`syscons' and `pcvt' with DDB. (Suggested by Bruce)

2) doreset() bug
doreset() failed to preserve some bits in the keyboard controller's
command byte during keyboard reset. This bug may put some keyboard
controllers in old motherboards (386 and 486) in a strange state,
resulting in complete keyboard lockup or random key input.

Reviewed by:	Joerg
1997-04-18 12:06:34 +00:00
David Nugent a473e68b78 Rearrange pci network card identification for easier additions.
Added KTI NE2000 clone.
1997-04-18 04:44:37 +00:00
David Greenman 1ebd0c5945 Brought fix from the 2.2 branch forward (see rev 1.47.2.7): serious bugs
with reading the image header.
1997-04-18 02:43:05 +00:00
Steve Passe 5f59489519 Amancio:
This patch fixes the problem of vic only capturing an even or odd frame plus
the my early patch for missing frames with resolutions higher than 320x240
in rgb mode.

The yuv422 patch introduces a minor bug in that a green line appears at the
bottom of the captured window . There is no easy work around for this right
now.

Reviewed by:	various bt848 hackers
Submitted by:	Amancio Hasty <hasty@rah.star-gate.com>
1997-04-17 22:33:16 +00:00
Nate Williams 9fdb458452 Quick and dirty attempt to get the zp device to work with the 3c589D.
Increase the delay in read_eeprom_data() by two orders of magnitude.

> A better fix would be to make read_eeprom_data() call
> f_is_eeprom_busy() after the DELAY().

Submitted by:	Samuel Lam <skl@ScalableNetwork.com>
1997-04-17 14:33:11 +00:00
KATO Takenori f85e8fc5ca Fix `locking against myself' panic by multi nullfs mount of same
directory pair.
1997-04-17 11:24:57 +00:00
KATO Takenori c5e17d9e2b Use NULLVP instead of NULL. 1997-04-17 11:17:30 +00:00
KATO Takenori b69aa7f11a Do not set the uppervp to NULLVP in union_removed_upper. If lowervp
is NULLVP, union node will have neither uppervp nor lowervp.  This
causes page fault trap.

The union_removed_upper just remove union node from cache and it
doesn't set uppervp to NULLVP.  Since union node is removed from
cache, it will not be referenced.

The code that remove union node from cache was copied from
union_inactive.
1997-04-16 16:24:24 +00:00
Andrey A. Chernov eff7ae0f7b Comment out rawcb, it is not used / not present anymore 1997-04-16 15:09:37 +00:00
KATO Takenori 03245f094d Use reset port before clearing page table in cpu_reset if PC98 is
defined.  Clearing page table could hang some new PC-98.
1997-04-16 12:11:37 +00:00
KATO Takenori 93d71a483c Undo previous commit to avoid panic, and fix order of argument of
VOP_LINK().  The reason of strange behavior was wrong order of the
argument, that is, the operation

	# ln foo bar

in a union fs tried to do

	# ln bar foo

in ufs layer.

Now we can make a link in a union fs.
1997-04-16 03:08:34 +00:00
Bruce Evans 06e33296dd Only do indirections in ENTRY() if _ARCH_INDIRECT is defined. 1997-04-15 14:06:34 +00:00
KATO Takenori 9095719e2b Quick-hack to avoid `lock against myself' panic. It is not the real
fix!

The ufs_link() assumes that vnode is not unlocked and tries to lock it
in certain case.  Because union_link calls VOP_LINK after locking vnode,
vn_lock in ufs_link causes above panic.

Currently, I don't know the real fix for a locking violation in
union_link, but I think it is important to avoid panic.

A vnode is unlocked before calling VOP_LINK and is locked after it if
the vnode is not union fs.  Even though panic went away, the process
that access the union fs in which link was made will hang-up.

Hang-up can be easily reproduced by following operation:

	mount -t union a b
	cd b
	ln foo bar
	ls
1997-04-15 12:56:57 +00:00
KATO Takenori ebcf3d327b Synchronize with sys/i386/i386/trap.c revision 1.92. 1997-04-15 11:49:00 +00:00
KATO Takenori 6cf4f7c45c Synchronize with sys/i386/conf/files.i386 revision 1.159. 1997-04-15 11:43:10 +00:00
Bruce Evans 6a57385056 Removed more traces of ISODEVMAP. 1997-04-15 08:05:08 +00:00
Poul-Henning Kamp 68bc60e3b0 Remove unneeded member nsp_head from struct nspcb. 1997-04-14 18:26:51 +00:00
Poul-Henning Kamp 936342eff1 #include <sys/queue.h> 1997-04-14 18:23:48 +00:00
Poul-Henning Kamp ea01105988 Use LIST macros instead of insque/remque 1997-04-14 18:23:25 +00:00
Poul-Henning Kamp 0b5fe37814 Add LIST_FIRST, LIST_FOREACH and LIST_NEXT 1997-04-14 18:22:02 +00:00
Poul-Henning Kamp 438d3e3188 Remove all traces of undocumented feature ISODEVMAP. 1997-04-14 18:15:47 +00:00
Poul-Henning Kamp 3845d1185d Forget all about APM. Instead of "hlt" call through a vector which
APM can then fiddle with.  Default for the vector is to "htl; ret"
1997-04-14 18:12:05 +00:00
Jordan K. Hubbard 0863cbc199 YAMF22 1997-04-14 16:47:38 +00:00
Bruce Evans da3df630ac Use the same IOPL check as in syscons.
Reviewed by:	pst, joerg
1997-04-14 15:54:39 +00:00
Bruce Evans 58611a61ed Fixed printing of registers in dbflalt_handler(). The registers
were always in a tss; that tss just changed from the one in the
pcb to common_tss (who knows where it was when there was no curpcb?).
Not using the pcb also fixed the problem that there is no pcb in
idle(), so we now always get useful register values.
1997-04-14 13:52:52 +00:00
KATO Takenori 6db918e371 Fix `lockmgr: locking against myself' panic by multi union mount of
same directory pair.

If we do:
    mount -t union a b
    mount -t union a b
then, (1) namei tries to lock fs which has been already locked by
first union mount and (2) union_root() tries to lock locked fs.  To
avoid first deadlock condition, unlock vnode if lowerrootvp is union
node, and to avoid second case, union_mount returns EDEADLK when multi
union mount is detected.
1997-04-14 10:52:25 +00:00
KATO Takenori ee582cdff0 Fix locking violation when accessing `..'.
Obtained from:	NetBSD
1997-04-14 05:13:55 +00:00
Peter Wemm e108835bbc Unused variable (upobj is now purely handled within pmap) 1997-04-14 03:40:42 +00:00
Justin T. Gibbs 085059c3ea Be more careful about how SCBs are cleaned up during error recovery.
Add some more diagnostic information to timeouts.
1997-04-14 02:27:50 +00:00
Justin T. Gibbs 45b7cf8750 Re-arange the selection and reselection code to hopefully kill the
spurious selection timeouts that have been reported.
1997-04-14 02:26:59 +00:00
John Dyson d7f7f3f20e Make a problem that I cannot reproduce go away for now. This commit
is to decrease the inconvienience of other developers until I can
really fix the code.
Reviewed by:	Donald J. Maddox <dmaddox@scsn.net>
1997-04-14 01:28:58 +00:00
Justin T. Gibbs 3db6c00e72 New name for the EtherExpress register file. 1997-04-14 00:40:04 +00:00
Justin T. Gibbs 5a2037874f Add Intel EtherExpress16 support into the ie driver, removing the need
for the ix driver.

Add a shutdown hook that resets the etherexpress so that Windoze can find
the card after a warm boot.

Submitted by: Aaron Smith <aaron@tau.veritas.com>
Obtained From: NetBSD
1997-04-14 00:37:53 +00:00
Justin T. Gibbs c1aa7eb5f4 GENERIC, LINT:
Add an ie entry that corresponds to the location the old ix entry used
to probe and kill the ix entry.

files.i386:
Remove entries for the ix driver.
1997-04-14 00:35:25 +00:00
Bruce Evans d12ee02d12 Don't forget to set `runtime' in fork_trampoline(). The time slice before
switching to a child for the first time was being counted twice.  I think
this only affected unimportant statistics.

Simplified arg handling in fork_trampoline().  splz() doesn't actually
smash the registers of interest.
1997-04-13 16:58:08 +00:00
Bruce Evans fc632680ed #ifdef'ed the declaration of lseek() so that -Wredundant-decls doesn't
cause noise.

Duplicated the lseek() redeclaration hack for all functions involving
off_t's (ftruncate(), mmap() and truncate()) to help broken programs
work.
1997-04-13 15:38:10 +00:00
Bruce Evans 61d856397c Moved #include of <sys/cdefs.h> earlier so that __signed in
<machine/types.h> gets redefined in the non-GNU and non-ANSI cases.
Since this hasn't caused problems, there must be no one actually
benefitting from the obfuscations supported by <sys/cdefs.h>.
`make CC="cc -traditional"' in /usr/src/bin shows the same.  Almost
everything is broken in essentially the same way - `const' is used
in strings before <sys/cdefs.h> is included, so `const' is not
#defined away until after it is used.

Fixed some style bugs.
1997-04-13 15:27:12 +00:00
KATO Takenori 3a946335ae Access correct union mount point in union_access. 1997-04-13 13:12:12 +00:00
Jordan K. Hubbard 6eb5e456f1 Support GLOBAL style tags. 1997-04-13 06:44:25 +00:00
Poul-Henning Kamp 363ad70091 The function union_fsync tries to lock overlaying vnode object when
dolock is not set (that is, targetvp == overlaying vnode object).
Current code use FIXUP macro to do this, and never unlocks overlaying
vnode object in union_fsync.  So, the vnode object will be locked
twice and never unlocked.

PR:		3271
Submitted by:	kato
1997-04-13 06:29:13 +00:00
Poul-Henning Kamp b422956c56 The path name buffer, cn->cn_pnbuf, is FREEed by VOP_MKDIR when
relookup() in union_relookup() is succeeded.  However, if relookup()
returns non-zero value, that is relookup fails, VOP_MKDIR is never
called (c.f. union_mkshadow).  Thus, pathname buffer is never FREEed.

Reviewed by:	phk
Submitted by:	kato
PR:		3262
1997-04-13 06:27:09 +00:00
Poul-Henning Kamp 9fa6ee7671 Though malloc allocates only cn.cn_namelen bytes for cn.cn_pnbuf in
union_vn_create(), following bcopy copies cn.cn_namlen + 1 bytes to
cn.cn_pnbuf

PR:		3255
Reviewed by:	phk
Submitted by:	kato
1997-04-13 06:25:03 +00:00
KATO Takenori ae9d2b47e0 Removed libc stuffs. Lite/2 merged libc contains unionfs support, and
we don't have to use the libc related files in sys/misc/unionfs
directory.
1997-04-13 06:12:13 +00:00
KATO Takenori a6a8345e27 Synchronize with sys/i386/i386/machdep.c revision 1.237. 1997-04-13 06:02:52 +00:00
John Dyson f39aebddfc Decrease the amount of memory allocated for bouncing. This will
allow large systems to boot successfully with bounce buffers compiled
in.  We are now limiting bounce space to 512K.  The 8MB allocated for
a 512MB system is very bogus -- and that is now fixed.
1997-04-13 04:07:24 +00:00
John Dyson aec17d5078 The pmap code was too generous in the allocation of kva space for
the pv entries.  This problem has become obvious due to the increase
in the size of the pv entries.  We need to create a more intelligent
policy for pv entry management eventually.
Submitted by:	David Greenman <dg@freebsd.org>
1997-04-13 03:35:30 +00:00
John Dyson 95395ca1c1 Improve the buffer cache memory policy by moving pages over to the
cache queue more often.  The pageout daemon had to be waken up
more often than necessary since pages were not put on the
cache queue, when they should have been.
Submitted by:	David Greenman <dg@freebsd.org>
1997-04-13 03:33:25 +00:00
John Dyson 492da96c9d Correct the previous thread-fix commit. I made a clerical error. 1997-04-13 03:05:31 +00:00
John Dyson 5856e12e69 Fully implement vfork. Vfork is now much much faster than even our
fork. (On my machine, fork is about 240usecs, vfork is 78usecs.)

Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory
	from the other threads of a group.

Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating
	possible existing shares with other threads/processes.

Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a
	thread from the rest of the group.

Fix the case where a thread does an exec.  It is almost nonsense for a thread
	to modify the other threads address space by an exec, so we
	now automatically divorce the address space before modifying it.
1997-04-13 01:48:35 +00:00
Joerg Wunsch eae6ab5e98 Everyone's favorite, i think: make DDB understand the arrow keys for the
basic cursor movements.  Assumes ANSI/DEC tty, but you can still resort
to plain emacs ^p/^n etc anyway.
1997-04-12 17:35:02 +00:00
John Dyson c04b956c6f Effectively remove the previous commit to fix threads forking. The
change was a false-start, and needs more work.
1997-04-12 04:07:50 +00:00
John Dyson af9ec88589 Allow a kernel-supported process thread to do an exec without blasting
away the VM space of all of the other, associated threads.
1997-04-11 23:37:23 +00:00
KATO Takenori c252025416 Deleted ddb_inb and ddb_outb functions that provide I/O access
routines as function for DDB.  The inb and outb are provided as
functions in machdep.c when DDB is defined.
1997-04-11 12:29:51 +00:00
KATO Takenori 4af17b77ec Synchronize with sys/i386/isa/syscons.c revision 1.209. 1997-04-11 07:41:22 +00:00
Justin T. Gibbs f91ddb3f3c Drop the number of allowed tags back down to 8. Pluto uses a higher value
which mistakenly got committed.

Fix two bugs in the ahc_reset_device code:
	Limit search for SCBs to process to those that are active and
	are not queued for done processing.

	It's okay for an SCB to not have a waiting next SCB.
1997-04-10 19:14:58 +00:00
Justin T. Gibbs 9ff0e63881 aic7xxx.seq:
Be consistant about testing for parity errors after waiting for a
	REQ on the bus.

	Don't ack the last byte in a transaction until after we've cleared
	all target state.

aic7xxx_asm.c:
	Test the return value of getopt against -1 not EOF. (Yet another
	shameless victum of the style guide being wrong).
1997-04-10 19:13:07 +00:00
Bruce Evans c90607ba7f Get the declaration of `struct dirent' from <sys/dirent.h>, not from
<sys/dir.h>, and use the new macro GENERIC_DIRSIZ() instead of DIRSIZ().

Removed unused #includes.
1997-04-10 15:05:38 +00:00
Bruce Evans 3bea22184e Get the declaration of `struct dirent' from <sys/dirent.h>, not from
<sys/dir.h>.

Removed unused #include.

Fixed type and order of struct members in pseudo-declaration of `struct
vop_readdir_args'.
1997-04-10 14:56:49 +00:00
Bruce Evans 1a2efb7550 Removed unused or apparently-unused #includes, especially of the
deprecated header <sys/dir.h>.
1997-04-10 14:35:32 +00:00
Bruce Evans d1f3e5b0fe Deprecated <sys/dir.h> some more - changed the comment saying that
<dirent.h> should be used instead to a warning.  If this causes too
many warnings in ports then it should be changed back after checking
some ports for related configuration errors.

Moved the definition of DIRSIZ() from <sys/dir.h> to <sys/dirent.h>
so that it can be used in the kernel without including <sys/dir.h>.
Renamed it in some cases to avoid new namespace pollution.
1997-04-10 13:54:19 +00:00
Bruce Evans 401116d519 Use smalllblktosize() instead of multiplying small block numbers
by fs->fs_bsize.  The macro is usually faster and makes it clearer
that the multiplication can't overflow.
1997-04-10 13:17:09 +00:00
Kazutaka YOKOTA d0b8731a66 Preserve some bits in the keyboard controller command byte when
resetting the keyboard.

Well, sorry, this bug is totally my fault. I DID intend to preserve
them, but somehow I failed.

The bug puts some old keyboard controllers in a strange state,
resulting in keyboard freeze or random key input.

The fix closes PR kern/3067.
1997-04-10 12:26:50 +00:00
Bruce Evans 9dd8309d56 Removed support for OLD_PIPE. <sys/stat.h> is now missing the hack that
supported nameless pipes being indistinguishable from fifos.  We're not
going back.
1997-04-09 16:53:45 +00:00
Bruce Evans 71426610ff Distinguish fifos from sockets in the S_IS* macros. This is possible now
that nameless pipes are not implemented as sockets.

Don't include <sys/time.h> if KERNEL is defined.  It should already have
been included by including <sys/param.h>.  Fixed a nearby typo.
1997-04-09 16:32:23 +00:00
Bruce Evans 7077d3c008 Regenerate (removed unused #includes from ibcs2*_sysent.c). 1997-04-09 15:46:25 +00:00
Bruce Evans 3892bcbc70 Removed unused #includes. 1997-04-09 15:44:47 +00:00
Bruce Evans fb36e0817c Regenerate (removed unused #includes in linux_sysent.c). 1997-04-09 15:37:04 +00:00
Bruce Evans cfb1738cb3 Removed unused #includes. 1997-04-09 15:34:09 +00:00
Bruce Evans 4e7506495b Include <sys/buf.h> instead of <sys/vnode.h>. kern_sysctl.c no
longer has anything to do with vnodes and never had anything to do
with buffers, but it needs the definitions of B_READ and B_WRITE
for use with the bogus useracc() interface and was getting them
bogusly due to excessive cleanups in rev.1.49.
1997-04-09 15:23:09 +00:00
Stefan Eßer 5c03639065 Mask out revision register in consistency test of class register. 1997-04-09 11:34:50 +00:00
Stefan Eßer 6df09d1e0b Fix spelling of align and interrupt in comments. 1997-04-09 09:16:27 +00:00
Stefan Eßer b4b8847934 Fix consistency test to not fail on pre PCI 2.0 motherboards 1997-04-09 09:15:03 +00:00
KATO Takenori 79ee3e29b8 Added lnc driver. 1997-04-08 12:01:11 +00:00
KATO Takenori 5eba6c71a9 Enables lnc driver on PC-98 to support NEC SV-98/2-B06 PCI card.
Cascade mode of DMA is disabled when PC98 is defined because PC-98
doesn't support it.
1997-04-08 10:33:24 +00:00
Justin T. Gibbs 8d94b804a1 Fix an infinite loop caused by calling ahc_run_done queue while the
driver is waiting a bus settle delay.  There should really be a facility
for the controller driver to "freeze" its queue during recovery operations
which would make all of this gymnastics unnecessary.
1997-04-07 18:32:47 +00:00
Peter Wemm e2d8771131 Lower the spl() of the new process from splhigh() right away, since
nothing else will lower it until either much later, or never(?) for
kernel processes.

This basically re-fixes what Bruce fixed in rev 1.29 of kern_fork.c,
which was broken again now the child does not execute back up the fork()
calling tree.
1997-04-07 11:42:09 +00:00
KATO Takenori 2083cff23d Synchronize with sys/i386/i386{machdep.c,trap.c} revisions 1.236 and
1.91, respectively.
1997-04-07 11:00:48 +00:00
KATO Takenori f62f53e408 Synchronize with sys/i386/isa/clock.c revision 1.80. 1997-04-07 10:53:14 +00:00
Peter Wemm 263a339213 Remove explicit zero of p_vmspace on creation, it's now in the startzero
section of the proc struct.
1997-04-07 09:38:39 +00:00
Peter Wemm 3598578c2b Move p_vmspace into the startzero section since we've just changed things
and may as well get it over and done with.
1997-04-07 09:35:15 +00:00
Peter Wemm a0c3795f19 Use UPAGES_HOLE instead of UPAGES in case it's changed some time.
Rename the PT* index KSTK* #defines to UMAX*, since we don't have a kernel
stack there any more..

These are used to calculate VM_MAXUSER_ADDRESS and USRSTACK, and really
do not want to be changed with UPAGES since BSD/OS 2.x binary compatability
depends on it.
1997-04-07 09:30:22 +00:00
Peter Wemm de871ab682 Define UPAGES_HOLE at 2 (same as current UPAGES) in case UPAGES changes
later.  This is used to calculate the top of user address space.
1997-04-07 09:27:21 +00:00
Peter Wemm e8fa13fdd9 Clean up some dead wood. Kill the page table page for mapping the
proc0/idlePTD/bootstrap stack into place in user space.  We save 4K.
Remove p0upa, it is now unneeded.
1997-04-07 08:38:19 +00:00
Peter Wemm a2a1c95c10 The biggie: Get rid of the UPAGES from the top of the per-process address
space. (!)

Have each process use the kernel stack and pcb in the kvm space.  Since
the stacks are at a different address, we cannot copy the stack at fork()
and allow the child to return up through the function call tree to return
to user mode - create a new execution context and have the new process
begin executing from cpu_switch() and go to user mode directly.
In theory this should speed up fork a bit.

Context switch the tss_esp0 pointer in the common tss.  This is a lot
simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer
to each process's tss since the esp0 pointer is a 32 bit pointer, and the
sd_base setting is split into three different bit sections at non-aligned
boundaries and requires a lot of twiddling to reset.

The 8K of memory at the top of the process space is now empty, and unmapped
(and unmappable, it's higher than VM_MAXUSER_ADDRESS).

Simplity the pmap code to manage process contexts, we no longer have to
double map the UPAGES, this simplifies and should measuably speed up fork().

The following parts came from John Dyson:

Set PG_G on the UPAGES that are now in kernel context, and invalidate
them when swapping them out.

Move the upages object (upobj) from the vmspace to the proc structure.

Now that the UPAGES (pcb and kernel stack) are out of user space, make
rfork(..RFMEM..) do what was intended by sharing the vmspace
entirely via reference counting rather than simply inheriting the mappings.
1997-04-07 07:16:06 +00:00
Peter Wemm 271b264e4c No longer use an i386tss as the basis of our pcb - it wasn't particularly
convenient and makes life difficult for my next commit.  We still need
an i386tss to point to for the tss slot in the gdt, so we use a common
tss shared between all processes.

Note that this is going to break debugging until this series of commits
is finished.  core dumps will change again too. :-(  we really need
a more modern core dump format that doesn't depend on the pcb/upages.

This change makes VM86 mode harder, but the following commits will remove
a lot of constraints for the VM86 system, including the possibility of
extending the pcb for an IO port map etc.

Obtained from: bde
1997-04-07 06:45:18 +00:00
Bruce Evans 9546766a1b Documented new serial console flags.
Removed dead serial console options.

Reorganised sio and serial console options.

Added undocumented options CLUSTERDEBUG and NPX_DEBUG.
1997-04-07 01:26:34 +00:00
Peter Wemm 2100d64585 Commit a typo fix that's been sitting in my tree for ages, quite forgotten.
The typo was detected once apon a time with the -Wunused compile option.
The result was that a block of code for implementing
madvise(.. MADV_SEQUENTIAL..) behavior was "dead" and unused, probably
negating the effect of activating the option.

Reviewed by: dyson
1997-04-06 16:16:11 +00:00
Doug Rabson 2f29db8883 Fixes to ibcs2_getdents, including using struct dirent instead of
struct direct, not using UFS' definition of DIRBLKSIZ, using directory
seek cookies to make reading non-UFS directories reliable
(e.g. cd9660, ext2fs).

A special thanks to Robert Eckardt for providing an ISC binary of GNU
ls so that I could test these changes.
1997-04-06 14:10:50 +00:00
Stephen McKay bc19f8a39e Prevent wedging of the stat clock because of missed interrupts.
This should cure the "alternate system clock has died!" problem.

Discussed with: bde, joerg
1997-04-06 13:25:48 +00:00
KATO Takenori 90bdaac7f9 Synchronize with sys/i386/i386/trap.c revision 1.89. 1997-04-06 11:49:46 +00:00
Peter Dufault 0ddf9be1f0 Make MOD_* macros almost consistent:
Use the name argument almost the same in all LKM types.  Maintain
the current behavior for the external (e.g., modstat) name for DEV,
EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only
#name.  This is a candidate for change and I vote just the name without
the "_mod".

Change the DISPATCH macro to MOD_DISPATCH for consistency with the
other macros.

Add an LKM_ANON #define to eliminate the magic -1 and associated
signed/unsigned warnings.

Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure.

Change source in tree to use the new interface.

Reviewed by:	Bruce Evans
1997-04-06 11:14:13 +00:00
Peter Dufault 952d112864 Make MOD_* macros almost consistent:
Use the name argument almost the same in all LKM types.  Maintain
the current behavior for the external (e.g., modstat) name for DEV,
EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only
#name.  This is a candidate for change and I vote just the name without
the "_mod".

Change the DISPATCH macro to MOD_DISPATCH for consistency with the
other macros.

Add an LKM_ANON #define to eliminate the magic -1 and associated
signed/unsigned warnings.

Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure.

Change source in tree to use the new interface.

Reviewed by:	Bruce Evans
1997-04-06 10:49:22 +00:00
Doug Rabson c9e191b82a Remove dependancy on UFS' DIRBLKSIZ definition.
2.2 candidate.

Submitted by:	bde
1997-04-06 10:10:50 +00:00
John Dyson 7d78abc9d9 Make vm_map_protect be more complete about map simplification. This
is useful when a process changes it's page range protections very
much.
Submitted by:	Alan Cox <alc@cs.rice.edu>
1997-04-06 03:04:31 +00:00
John Dyson 15cb98465f Correction to the prototype for vm_fault. 1997-04-06 02:30:56 +00:00
John Dyson a04c970a7a Fix the gdb executable modify problem. Thanks to the detective work
by Alan Cox <alc@cs.rice.edu>, and his description of the problem.

The bug was primarily in procfs_mem, but the mistake likely happened
due to the lack of vm system support for the operation.  I added
better support for selective marking of page dirty flags so that
vm_map_pageable(wiring) will not cause this problem again.

The code in procfs_mem is now less bogus (but maybe still a little
so.)
1997-04-06 02:29:45 +00:00
Justin T. Gibbs 1961f6e884 Instead of testing for both SELDI and SELDO in SSTAT0 in the poll for work
loop, test for them separately.  The bug report from David Malone showed that
even though we had been reselected (SELDI was true), we sat in the poll for
work loop until the selection timeout timer expired.  It may be that the
SSTAT0 register doesn't like to have more than one bit tested at a time.
I've seen stranger things than this on these parts.
1997-04-05 22:03:47 +00:00
Justin T. Gibbs 844b7c2d86 Fix a bug in the selection timeout handler that was introduced when the
selection loop was merged with the poll_for_work loop.  We cannot assume
that the SCB for the selection timeout is the current SCB.  Instead we
must look at the SCB at the head of the waiting for selection list.

This fixes part of a problem reported by David Malone, but does not explain
why he was getting selection timeouts in the first place.
1997-04-05 21:41:13 +00:00
John Hay 583f1729d1 Change IPX to use the pr_usrreqs structure. 1997-04-05 20:05:11 +00:00
KATO Takenori c749b25885 Synchronize with sys/i386/conf/options.i386 revision 1.39. 1997-04-05 15:06:30 +00:00
KATO Takenori 083af2b396 Synchronize with sys/i386/isa/sioreg.h revision 1.8. 1997-04-05 15:05:16 +00:00
KATO Takenori 5b6bca02c7 Synchronize with sys/i386/isa/sio.c revision 1.162. 1997-04-05 15:04:32 +00:00
Doug Rabson d41979a063 Fix linux_getdents so that it can cope with filesystems which translate
the directory format (ext2fs, cd9660).  For these filesystems, it must use
cookies to find the correct offset to use for subsequent reads.  Without it,
linux /bin/ls tends to loop re-reading the same block over and over again.

2.2 candidate.
1997-04-05 14:50:56 +00:00
Bruce Evans 8e71151378 Moved COMCONSOLE, CONADDR and CONUNIT to defunct options. 1997-04-05 13:21:08 +00:00
Bruce Evans 24bb2ffb15 Removed defaults for dead options CONADDR and CONUNIT. 1997-04-05 13:15:50 +00:00
Bruce Evans de09b61a0c Use device flags instead of options for serial console configuration
(see LINT).  There is a new low-level console type that is more suitable
for use with gdb-remote.

Fixed setting of speed at probe time for the serial console (if any).

Reviewed by:	dfr
1997-04-05 13:11:27 +00:00
Doug Rabson e7927c1ec7 Support NFS cookies in VOP_READDIR, allowing ext2fs filesystems to be
exported via NFS.

2.2 candidate.
1997-04-05 12:23:44 +00:00
Poul-Henning Kamp 35e68428eb Recognize ZNYX 314 cards that have a MAC address with the low bit set. 1997-04-05 07:59:41 +00:00
Jordan K. Hubbard 6c0a2b9722 Implement dkstats for worm devices so they show up in iostat et al.
I got tired of not seeing my worm stats show up during a burn. :)
[Joerg, I just stapled in 1MB/sec for a bogus xfer rate and left seek = 1,
 as suggested - I'm not going to dynamically calculate the xfer rate from
 a known device spectable, OK? :-)]
Reviewed by:	joerg
1997-04-04 22:12:55 +00:00
Justin T. Gibbs 92fb126230 Add a 1ms delay in the XS_BUSY case. This is the same error code returned
for the QUEUE FULL condition.  This may help avoid wedging a device by
immediately requeeuing the transaction in this case.
1997-04-04 19:37:20 +00:00
Justin T. Gibbs 0f3a99aade Now that we use AAP, we have to explicitly unpause the sequencer when
queueing an abort SCB.
1997-04-04 19:36:04 +00:00
Justin T. Gibbs bb5d13ea1c Add missing Id that was lost when the sequencer file format changed. 1997-04-04 19:35:30 +00:00
Andrey A. Chernov 6a575f6e24 Eliminate some function calls when locale not used 1997-04-04 19:08:19 +00:00
Andrey A. Chernov 5058254947 Speedup in case locale not used 1997-04-04 18:44:19 +00:00
Doug Rabson 4ba14e3a10 Fix various bugs in the locking protocol, allowing proper shared locks
to be used.  This should fix the lock panics that people are seeing.
1997-04-04 17:49:35 +00:00
Doug Rabson 42146e3747 [Previous comment was incorrect for these files]
Added calls to VFS lock debugging macros to make fixing filesystems' locking
easier.
1997-04-04 17:47:43 +00:00
Doug Rabson de15ef6aef Add a function vop_sharedlock which a copy of vop_nolock without the
implementation #ifdef out.  This can be used for now by NFS.  As soon
as all the other filesystems' locking is fixed, this can go away.

Print the vnode address in vprint for easier debugging.
1997-04-04 17:46:21 +00:00
Doug Rabson 754c6d3729 Add some debugging macros for tracing VFS locking bugs.
Declare (hopefully short-lived) vop_sharedlock.
1997-04-04 17:43:32 +00:00
KATO Takenori 30a6636553 Deleted <pc98/pc98/pc98_device.h>. 1997-04-04 16:44:52 +00:00
KATO Takenori 67c09274a3 Synchronize with sys/i386/isa/syscons.c revision 1.208. 1997-04-04 15:23:55 +00:00
KATO Takenori 1964ed8cde Synchronize with sys/i386/isa/wd.c revision 1.128. 1997-04-04 15:22:59 +00:00
David Greenman 66141753e6 Killed unnecessary vp == NULL check after namei. 1997-04-04 09:06:20 +00:00