Commit graph

7519 commits

Author SHA1 Message Date
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