Commit Graph

775 Commits

Author SHA1 Message Date
Andrew Moore
05e634ef64 From: Jeffrey Hsu <hsu@soda.berkeley.edu>
The following patch adds the addr argument to signal handlers.

The kernel with the patch is no more and no less in compliance or in
violation of POSIX and ANSI C than the kernel before the patch.

The added functionality this addr argument provides is quite useful.  It
enables an entire class of algorithms which use mprotect to trace memory
references.  Beside garbage collectors, I have heard of this technique being
applied to debuggers and profilers.  The only benchmarking I've performed is
using akcl to compile maxima:  without the kernel patch, it takes 7 hours to
compile maxima, while with stratified garbage collection, it only takes 50
minutes.

Basically, I can't think of a reason not to add the addr argument and there
is a compelling need for it.

If you find the patch acceptable, please let me know so I can send my
FreeBSD akcl config files to wfs for inclusion in the core akcl release.
The old 386BSD config files there won't work on either NetBSD or FreeBSD.
1993-12-03 05:10:08 +00:00
Andrew Moore
16111ced9f Reset fdc during probe.
From: <dec@lazarus.nrtc.northrop.com>
   Changes between EPSILON and RELEASE of FreeBSD have again caused
the kernel to not see my floppy disk drives.  I don't know what happened,
'cause I don't see any changes to fd.c, but here is an old fix that
I have applied to the probe routine which will solve the problem (at
least for me).  Since this is a rather brute-force solution - I understand
if you want to ignore it...

[Upgrading to pre-Beta FreeBSD caused this on my system. -AM]
1993-12-03 05:01:40 +00:00
Andrey A. Chernov
64990426e4 Sorry, Jordan, but I restore previous version again.
You write that
LDFLAGS+= -Xlinker -Bstatic
no more needed, but you have
CFLAGS += -static -I$(.CURDIR) -I$(.CURDIR)/$(MACHINE)
This -static doesn't make any sense in your version,
because it not passed to linker's state (LDFLAGS),
so we have SHARED /usr/bin/ld in this case.
(Older Makefile produce non-shared ld).
I suppose, that -static in CFLAGS was introduced to
make non-shared ld, so I restore previous LDFLAGS
to have non-shared ld. If we want to have shared ld
we need to remove -static from CFLAGS too, not only LDFLAGS,
but this need special issue and corresponding
commit log. Your current version hang into intermediate
state (beetween two sides), so I move it to one side.

Second, I restore NOPIC dependance again from older Makefile:
.if !defined(NOPIC)
SUBDIR+= rtld
.endif
We don't need ld.so, if NOPIC

P.S. I don't see any purpose to commit new makefile, old version
is better.
1993-12-02 09:56:30 +00:00
Andrey A. Chernov
1f30bc0f0d #ifdef DEBUG unwanted message, third time after Jordan... 1993-12-02 09:32:26 +00:00
Nate Williams
02974dc4fb Moved DEBUG conditional where it belonged to remove DEBUG code out of
default compilation.
1993-12-02 05:09:52 +00:00
Jordan K. Hubbard
1e503f71fb Second attempt to integrate Paul K's changes. 1993-12-02 01:03:47 +00:00
Jordan K. Hubbard
88ac367bd7 Second attempt to integrate Paul K's changes. 1993-12-02 00:56:40 +00:00
Andreas Schulz
5fefaf154f deleted all references to rindex and included string.h instead. 1993-12-01 16:45:42 +00:00
Andreas Schulz
285aeeb5e4 changed the order of the includes and deleted a reference to index
nd added an include to string.h instead
1993-12-01 16:44:43 +00:00
Andrey A. Chernov
db4d1e7156 All -static and -Xlinker -Bstatic flags missed in
newly commited Makefile.
NOPIC dependance missed too!
Oh it is really pain to check all that broken stuff,
Please, check it *before* commit!
1993-12-01 15:58:22 +00:00
Andrey A. Chernov
b242393f9b #ifdef DEBUG missed by several lines!
!!! Please, COMPILE *BEFORE* COMMIT!
1993-12-01 15:34:01 +00:00
Andrey A. Chernov
50b517092a Add DEBUG #ifdef, (second time!)
!!! Please, anybody who update ld to NetBSD current,
!!! look at old cvs logs!
1993-12-01 15:13:42 +00:00
Andrey A. Chernov
730a80c44c Remove hanging #else part (with second sbrk()) without #if & #endif
Add missing argument to findshlib, I am not shure,
but it seems that it is 1.
!!! Does anybody compile it before commit?
1993-12-01 15:05:31 +00:00
Andrey A. Chernov
ff78e5dfcf Remove -g option (second time!)
!!! Please anybody who port Makefiles from NetBSD,
!!! remove -g option!
1993-12-01 14:45:35 +00:00
Rodney W. Grimes
428e3889f9 From: Julian Howard Stacey <stacey@guug.de>
Subject: Bug & Fix for etc/Makefile cpio-floppy: re /tmp creation.
Date: Fri, 26 Nov 1993 11:35:04 +0100

Editors Note:  tmp was listed in the CPIO_FILES section and thus the
entire contents of ${DESTDIR}/tmp would end up on the cpio floppy.  This fix
moves tmp to CPIO_DIRS so that no longer happens.
1993-12-01 08:44:39 +00:00
Jordan K. Hubbard
8eae6ddddc Latest from Paul K. for better checking of PIC code. 1993-11-30 20:57:41 +00:00
Jordan K. Hubbard
52c4ca7af3 Many recent fixes from Paul K, add support for chaining of shared lib deps. 1993-11-30 20:47:54 +00:00
Rich Murphey
0da22b8b69 allow spaces in $sendmail_flags. 1993-11-30 16:59:27 +00:00
Andrey A. Chernov
b4afc64b0b wmesg was too long (>7), fixed 1993-11-29 19:26:32 +00:00
David Greenman
97751a63e2 * Revision 2.16 1993/11/29 16:55:56 davidg
* merged in Garrett Wollman's strict prototype changes
 *
 * Revision 2.15  1993/11/29  16:32:58  davidg
 * From Thomas Sandford <t.d.g.sandford@comp.brad.ac.uk>
 * Add support for the 8013W board type
1993-11-29 17:07:33 +00:00
Andrey A. Chernov
b81db928c3 Direct #undefs removed to allow flexible manipulation
via config options. Unneded #defines removed.
Improved dependance of "snd.h" and NSND.
1993-11-28 10:55:59 +00:00
David Greenman
a9627169cd Patch from Gene Stark:
Subject: Page fault in PTE area fails in copyout
Index: sys/i386/i386/trap.c FreeBSD-1.0.2

Description:
	Reading files of several megabytes into Emacs, or many small
	files all at once, would fail with "IO error - bad address".

Repeat-By:
	The bug can be exercised by a test program that malloc()'s
	a 5MB chunk of memory, and then, without accessing the memory
	first, filling it with data from a file using read().
	(I read 64k chunks from /dev/wd0d into successive 64k regions
	of the 5MB chunk.)  The read() will fail with EFAULT at the first
	virtual address boundary that is a multiple of 0x400000.

Fix:
	The problem was code in sys/i386/i386/trap.c that tries to
	figure out what kind of trap occurred and to handle it appropriately.
	It was interpreting any page fault with virtual address
	>= vm->vm_maxsaddr as being a user stack segment fault.
	In fact, addresses >= USRSTACK are in the user structure/PTE area,
	and if they are handled as stack faults, the proper PTE will
	not be paged in when it is supposed to be.  This situation comes
	up in copyout() and copyoutstr(), if PTE's are accessed for the
	first time ever.  The page fault on accessing the nonexistent PTE
	is mishandled as a stack fault, and then the fault that occurs on
	the subsequent access to the page itself causes copyout to fail
	with EFAULT.
1993-11-28 09:28:54 +00:00
Andrey A. Chernov
4a8e05dd59 Move soundcard.h & ultrasound.h to proper location <machine/...>
to allow application access it.
1993-11-27 22:16:44 +00:00
Garrett Wollman
608bcbe953 Declare cnopen, cnclose, and other console routines. 1993-11-27 19:19:19 +00:00
Rich Murphey
d6084ed740 Declared cn{open,close,read,write,ioctl,select} extern. 1993-11-27 06:50:45 +00:00
Rich Murphey
23fc1c7148 Fix conflicting prototypes and return values. 1993-11-27 06:32:41 +00:00
Garrett Wollman
c5fd31718b Fix d_write_t -> d_rdwr_t (typing error). 1993-11-26 22:44:17 +00:00
David Greenman
af70ab7293 Don't start update daemon; it's now internel to the kernel. 1993-11-25 13:23:46 +00:00
David Greenman
57594c8752 Patch from Julian Elischer:
Here is the fix for the 'hanging' bug.

This bug happenned whenever two operations were already underway on the
disk and a third (non-IO) command was requested..
in this case the process submitting the NON-IO command was requested to wait,
and a flag set so that on completion of the IO commands, the Non-io command
was given priority over any pending IO commands. (the queue is not
allowed to drain while there are pending "special" ops).

The flag that indicated this was not being reset, so further IO commands
were prohibited from that moment on.
1993-11-25 06:30:58 +00:00
Garrett Wollman
381fe1aaf4 Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and
add same (sans -Werror) to Makefile for future compilations.
1993-11-25 01:38:01 +00:00
Jordan K. Hubbard
0f81714b34 Added -lgcc_pic back again. 1993-11-25 01:06:42 +00:00
Rich Murphey
65f9ff3f2f /var/run is cleared on boot. Rerun 'ldconfig /usr/X386/lib' after
clearing /var/run if /sbin/ldconfig exists.
1993-11-24 05:17:14 +00:00
Nate Williams
997e3029c9 Subject: Panic - can't mount route (Soren's changes)
From: Geoff Rehmet  <g89r4222@braae.ru.ac.za>

Description:
	On bootup, probe of wd drives fails (CP30104), and kernel panics
	- cannot mount root
	It appears that the device probe just times out.
	Increasing the timeout back to its old value fixes the problem.
Repeat-By:
	SUP FreBSD-current,  Find a CP30104 .....  (ok ok ok)
	Basically - Soren's changes barf my disk.
1993-11-23 21:36:37 +00:00
Christoph Robitschko
5a0cfe828a Changed return(-1) in switch_scr to return(EINVAL), because -1 is
ERESTART on return from a system call.
1993-11-23 18:20:52 +00:00
Nate Williams
1b0b2339ce Stop gap measure until we can get Bruce's driver debugged.
---
From: sos@login.dkuug.dk (S|ren Schmidt)
Subject: IDE-disk hangs - solution/patches NetBSD/FreeBSD
Summary: fixes for lost interrupts with IDE disks
Keywords: hanging-disk, IDE-disk, lost-interrupt


Due to "popular" demand I'm posting these patches to NetBSD/FreeBSD
instead of mailing them around the world :-)

As many have found out there is a problem when using IDE disks on
FreeBSD. Following is a patch that fixes the problem with lost intterrupts.
Both fixes is based on a patch posted here some month ago by
Stefan Behrens?? (sorry I've lost the original article). But anyway it
works (for me :-).
Basically it does a timeout on lost interrupts, starting the operation
again and logging and error message on the console.

It additionally makes the allready present while loop timeouts
independent of CPU speed, and adds minor numbers for easy access to
dos partitions.
1993-11-22 23:25:46 +00:00
Jordan K. Hubbard
d3ab4e4900 Some of the latest changes from Paul K (taken from NetBSD-current). 1993-11-22 19:05:31 +00:00
David Greenman
047ea5bd0c * Revision 2.14 1993/11/22 10:55:30 davidg
* change all splnet's to splimp's
 *
 * Revision 2.13  1993/11/22  10:53:52  davidg
 * patch to add support for SMC8216 (Elite-Ultra) boards
 * from Glen H. Lowe
 *
 * Revision 2.12  1993/11/07  18:04:13  davidg
 * fix from Garrett Wollman:
 * add a return(0) at the end of ed_probe so that if the various device
 * specific probes fail that we just don't fall of the end of the function.
1993-11-22 11:08:16 +00:00
David Greenman
b513c26294 patches from Julian Elischer -
Added support for mmapping /dev/mem
1993-11-22 09:46:45 +00:00
Rodney W. Grimes
9d08e5f2ce Missing part of Julians new scsi code, add new driver uk and revise the
entries for st.
1993-11-22 05:40:49 +00:00
Jordan K. Hubbard
44f6e41b43 If we're not logging history information, don't demand write access. 1993-11-20 00:33:12 +00:00
David Greenman
d333677271 added 5us delay before checking BUSY flag to conform to ATA spec -
as suggested by John Dyson (dyson@implode.rain.com)
1993-11-19 06:30:00 +00:00
Jordan K. Hubbard
437c34ef5b Recent Paul K. changes for compiling X shared (tested on my box). 1993-11-18 20:52:34 +00:00
Rodney W. Grimes
57bb0ee45f New version of scsi code from Julian 1993-11-18 05:03:27 +00:00
Andrey A. Chernov
0def918bed remove HAVE_SETPGRP, because it doesn't detach terminal
in POSIX (setsid() is only way to do it)
1993-11-18 01:19:06 +00:00
Andrey A. Chernov
03e2b4a1fd IMAXBELL & PENDIN now cleared to satisfy new sio driver.
From Ian Taylor.
Fix POSIX CLOCAL behaviour, set controlling terminal after it.
Change VTIME from 0 to 1 to fix timeouts waiting for data
1993-11-18 01:03:18 +00:00
Andrey A. Chernov
590ab56698 From Ian Taylor.
Fix POSIX detach behaviour, based on setsid() call.
stpgrp(0,0) not used for POSIX now.
1993-11-18 00:59:17 +00:00
Garrett Wollman
c8b18017ac Fixed comments. 1993-11-18 00:12:13 +00:00
Andrey A. Chernov
fe596e6795 -r option incorrectly removed:
it is impossible to make gcrt0.o from moncrt0.o and gmon.o without it.
1993-11-18 00:08:03 +00:00
Andrey A. Chernov
aa0028f8cf Fix attach message, make separate line for it
(old version assumed that line is probe line)
1993-11-17 23:38:23 +00:00
Garrett Wollman
35089dd415 Fixed comments that start within a comment, so code compiles cleanly with
-Wcomment.
1993-11-17 23:25:28 +00:00