Commit Graph

23137 Commits

Author SHA1 Message Date
Paul Saab
43ab35c8c7 Add support for probing the keyboard from pxeboot which will behave
exactly the same as passing -P to boot2.

Submitted by:	jhb
2000-11-30 14:55:10 +00:00
Sheldon Hearn
0d125a5daf Retire the osf1(8) utility. The Makefile hasn't installed this critter
for a while.

Providing shell scripts that do nothing but load a similarly named
kernel loadable module is out of vogue.
2000-11-30 08:16:19 +00:00
Marcel Moolenaar
d034d459da Don't use p->p_sigstk.ss_flags to keep state of whether the
process is on the alternate stack or not. For compatibility
with sigstack(2) state is being updated if such is needed.

We now determine whether the process is on the alternate
stack by looking at its stack pointer. This allows a process
to siglongjmp from a signal handler on the alternate stack
to the place of the sigsetjmp on the normal stack. When
maintaining state, this would have invalidated the state
information and causing a subsequent signal to be delivered
on the normal stack instead of the alternate stack.

PR: 22286
2000-11-30 05:23:49 +00:00
Peter Wemm
083e9ed543 Increase NKPT from 17 to 30. This fixes the 4GB ram boot panic on both
-current and RELENG_4 with GENERIC.

NKPT is the number of initial bootstrap page table pages we create for
the kernel during startup. Once VM is up, we resize it as needed, but
with 4G ram, the size of the vm_page_t structures was pushing it over
the limit.  The fact that trimmed down kernels boot on 4G ram machines
suggests that we were pretty close to the edge.

The "30" is arbitary, but smaller than the 'nkpt' variable on all
machines that I checked.
2000-11-30 01:53:02 +00:00
John Baldwin
1bd0eefb4c Fix up priority propagation:
- Use a better test for determining when a process is running.
- Convert some checks to assertions.
- Remove unnecessary tests.
- Save the priority before acquiring a mutex rather than in msleep(9).
2000-11-30 00:51:16 +00:00
John Baldwin
86327ad8a4 Set p_mtxname when blocking on a mutex and clear it when waking up. 2000-11-29 20:17:15 +00:00
John Baldwin
62ca2477d8 Save a copy of p_mtxname in e_mtxname when creating an eproc. 2000-11-29 20:14:50 +00:00
John Baldwin
c345dd3371 - Add a p_mtxname field to proc which points to the description of the
mutex a process is blocked on or NULL.
- Add a corresponding field e_mtxname to eproc.
- Fix a spelling nit in a comment.
2000-11-29 20:10:54 +00:00
Jonathan Chen
d58b9dbc97 This fixes several problems with CIS as suggested by Justin Gibbs:
4) The cardbus CIS code treats the CIS_PTR as a mapping register if
   it is mentioned in the CIS.  I don't have a spec handy to understand
   why the CIS_PTR is mentioned in the CIS, but allocating a memory range
   for it is certainly bogus.  My patch ignores bar #6 to prevent the
   mapping.
   [The pccard spec says that BAR 0 and 7 (-1 and 6 in thic case since we
    did a minus one) is "reserved".  The off by 1 error has been fixed.
    also bar=5 is invalid for IO maps, so we check it.]

5) The CIS code allocated duplicate resources to those already found
   by cardbus_add_resources().  The fix is to pass in the bar computed
   from the CIS instead of the particular resource ID for that bar,
   so bus_generic_alloc_resource succeeds in finding the old resource.
   [fixed, also removed superfluous (and incorrect) writing back to the
    PCI config space.]

7) The CIS code seems to use the wrong bit to determine rather a particular
   register mapping is for I/O or memory space.  From looking at the
   two cards I have, it seems TPL_BAR_REG_AS should be 0x10 instead
   of 0x08.  Otherwise, all registers that should be I/O mapped gain
   a second mapping in memory space.
   [Oops, the spec does say 0x10..., fixed]

Submitted by: Justin Gibbs
2000-11-29 19:38:25 +00:00
John Baldwin
f404050e44 Use an atomic operation with an appropriate memory barrier when releasing
a contested sleep mutex in the case that at least two processes are blocked
on the contested mutex.
2000-11-29 18:41:19 +00:00
John Baldwin
8f838cb563 The sched_lock mutex goes after the sio mutex in the locking order since
a software interrupt can be scheduled in the sio interrupt handler while
the sio mutex is held.
2000-11-29 18:38:14 +00:00
John Baldwin
bbc7a98a31 Save the line number and filename of the last mtx_enter operation for
spin locks.  We already do this for sleep locks.
2000-11-29 18:37:01 +00:00
John Baldwin
e2979dcc85 Don't drop Giant and the passed in mutex incorrectly in the
cold || panicstr case.  Do drop the passed in mutex in that case if
PDROP is specified.
2000-11-29 18:32:50 +00:00
Jonathan Chen
49f158ccc8 Oops, broke CIS reading from ROM on my last commit.
This should fix it.
2000-11-29 16:08:01 +00:00
KATO Takenori
504a7aad9e Merged from sys/i386/i386/userconfig.c revision 1.185. 2000-11-29 12:31:13 +00:00
Sheldon Hearn
fd71ea53b4 Remove the ibcs2(8) shell script.
Providing shell scripts that do nothing but load a similarly named
kernel loadable module in out of vogue.

There is no ibcs2(4) manual page, and I haven't managed to coax
anyone into contributing one based on the linux(4) manual page.
2000-11-29 10:46:14 +00:00
Sheldon Hearn
1f46e6239c Decommission the svr4(8) shell script, which has been pointless since
our kernel module system learned how to handle dependencies.

Providing a whole bunch of shell scripts that do nothing but load
a similarly named kernel loadable module is out of vogue.

The svr4(8) manual page has been replaced with a much better svr4(4)
page.
2000-11-29 10:40:53 +00:00
John Baldwin
2bcc63c545 Only print out APIC info on an SMP system during a panic if APIC_IO is
defined.
2000-11-29 01:33:15 +00:00
John Baldwin
8d9888d37a Don't wait forever for CPUs to stop or restart. Instead, give up after a
timeout.  If DIAGNOSTIC is turned on, then display a message to the console
with a map of which CPUs failed to stop or restart.  This gives an SMP box
at least a fighting chance of getting into DDB if one of the other CPUs has
interrupts disabled.
2000-11-28 23:52:36 +00:00
John Baldwin
bf8bfade99 Use atomic ops to close a race condition on the in_Debugger variable used
to only allow 1 CPU at a time to (non-recursively) enter the debugger.
2000-11-28 23:15:44 +00:00
Mike Smith
ee435af1ae Remove some over- 2000-11-28 20:51:04 +00:00
Jordan K. Hubbard
7022a92395 Kernel support for erase2 character.
Submitted by:	Rui Pedro Mendes Salgueiro <rps@mat.uc.pt>
2000-11-28 20:03:23 +00:00
Mike Smith
b60f56f73b MFS:
Fix amr_map_command so that 40LD-specific commands get the scatter-gather
   list count in the right place.  I don't understand why AMI did it like
   this, but now the AMI MegaManager can talk to the newer (1600 and later)
   controllers.

   Remove an unused variable.

   Include <machine/clock.h> when necessary.

   Tweak some debugging levels to make things more intelligible.
2000-11-28 19:28:22 +00:00
Jonathan Chen
c3342a3d99 Oops, broke newcard because I forgot to commit this in my last round of changes to pccbb.c 2000-11-28 15:50:13 +00:00
Matthew N. Dodd
1581afb38d Reduce code duplication by using the GET_RESOURCE_LIST bus method and related
generic resource_list management functions.

I'll deal with the EISA bits later.

Not objected to by:	 new-bus
2000-11-28 07:12:12 +00:00
Matthew N. Dodd
46aa504e42 Alter the return value and arguments of the GET_RESOURCE_LIST bus method.
Alter consumers of this method to conform to the new convention.
Minor cosmetic adjustments to bus.h.

This isn't of concern as this interface isn't in use yet.
2000-11-28 06:49:15 +00:00
Greg Lehey
e19bc84f20 Don't include system-specific header files for userland program.
Discovered by default by: alfred
2000-11-28 06:38:53 +00:00
Matthew N. Dodd
9b11c7ba44 Avoid hardcoding the 'rid' and 'type' of the MEM/IOPORT resource.
Store the 'rid' and 'type' in the softc and use them in mlx.c:mlx_free().

EISA and MCA front ends will require this.

Approved by:	 msmith
2000-11-28 06:17:32 +00:00
Jonathan Chen
c669d6a002 1) When mucking with mapping registers, it is best to *not* have
io or memory space access enabled.  This patch defers the setting
   of these bits until after all of the mapping registers are probed.
   It might be even better to defer this until a particular mapping
   is activated and to disable that type of access when a new
   register is activated.

2) The PCI spec is very explicit about how mapping registers and
   the expansion ROM mapping register should be probed.  This patch
   makes cardbus_add_map() follow the spec.

3) The PCI spec allows a device to use the same address decoder for
   expansion ROM access as is used for memory mapped register access.
   This patch carefully enables and disables ROM access along with
   resource (de)activiation.

This doesn't include the prefetching detection stuff (maybe later when code is written to actually turn on prefetching).  It also does not use the PCI definitions (yet, I'll try to put this in all at once later)

Submitted by: Justin T. Gibbs
2000-11-28 00:52:40 +00:00
Jonathan Chen
7bec1dd5e1 overhaul cis functions to read cis tuple by tuple (instead of all at once).
Also fix incorrect parsing of BAR.
2000-11-28 00:08:18 +00:00
Jonathan Chen
af82f62d2f A bunch of newcard/cardbus changes that's been sitting in my tree for a while:
- Make pccbb/cardbus kld loadable and unloadable.
- Make pccbb/cardbus use the power interface from pccard instead of inventing its own.
- some other minor fixes
2000-11-28 00:05:20 +00:00
Jonathan Chen
a8e5d9ac32 Patch to use M_ZERO
Submitted by: David Malone
2000-11-27 23:55:19 +00:00
Jake Burkholder
4f55983606 Use callout_reset instead of timeout(9). Most callouts are statically
allocated, 2 have been added to struct proc for setitimer and sleep.

Reviewed by:	jhb, jlemon
2000-11-27 22:52:31 +00:00
John Baldwin
91b7c97713 Drop Giant around the mi_switch() call in yield().
Submitted by:	tegge
2000-11-27 18:48:13 +00:00
Dag-Erling Smørgrav
fbbd9aebdd Add bogomips to cpuinfo (set it equal to the CPU frequency, which is bogus
but not more so than Linux' definition).
This should get the IBM JDK 1.3 working again.

Prompted by:	sobomax
2000-11-27 11:10:03 +00:00
David E. O'Brien
e02433fdc4 Don't install the osf1 script from here. It causes the release build to
break as ${DESTDIR}/usr/bin doesn't exist where the module is being
installed.
2000-11-27 07:27:44 +00:00
David E. O'Brien
4a93f235c1 `cdboot' is broken as it cannot load a kernel.
The release engineer keeps using the wrong /boot/cdboot when creating the
ISO images.  So we'll add the 4.0-RELEASE cdboot to the tree until someone
bothers to fix the source so a working `cdboot' is built.
2000-11-27 02:15:13 +00:00
Alfred Perlstein
1e5d626ad9 ucred system overhaul:
1) mpsafe (protect the refcount with a mutex).
2) reduce duplicated code by removing the inlined crdup() from crcopy()
   and make crcopy() call crdup().
3) use M_ZERO flag when allocating initial structs instead of calling bzero
   after allocation.
4) expand the size of the refcount from a u_short to an u_int, by using
   shorts we might have an overflow.

Glanced at by: jake
2000-11-27 00:09:16 +00:00
David Malone
373134cc60 Don't scroll of the end of the help pages when using the visual
option in for "boot -c".

PR:		17539
Submitted by:	Edwin.Groothuis@cgmd76206.chello.nl
2000-11-26 23:39:46 +00:00
Jonathan Lemon
fe96e26dd0 Fix another callout_init() that I missed. 2000-11-26 21:59:30 +00:00
Jonathan Lemon
9ba20c3119 Unbreak world; #include <sys/mutex.h> instead of <machine/mutex.h>
Only include <sys/mbuf.h> when building kernel sources.  This should
probably be changed to require callers to include it themselves.
2000-11-26 21:47:01 +00:00
Alfred Perlstein
0931dcefb3 Move the #define of _KERN_MUTEX_C_ so that it's before any system headers
are included.  System headers can include sys/mutex.h and then certain
macros do not get defined.

Reviewed by: jake
2000-11-26 21:14:17 +00:00
Poul-Henning Kamp
a52585d77e Simplify the tprintf() API.
Loose the special <sys/tprintf.h> #include file.
2000-11-26 20:35:21 +00:00
Poul-Henning Kamp
4d88c4598f Make log(-1, ...) do what addlog(...) did.
Replace all uses of addlog(...) with log(-1, ...)

Remove bogus "register" keywords in subr_prf.c

Make log() return void.
2000-11-26 19:34:06 +00:00
Poul-Henning Kamp
cb7e609a3c Make diskerr() always log with printf. 2000-11-26 19:29:15 +00:00
Poul-Henning Kamp
a1bb9fabb1 unhook netgraph/bridge until somebody makes it compile in LINT 2000-11-26 16:40:00 +00:00
Jake Burkholder
a5d5c61c12 Add uidinfo hash and uidinfo struct to the witness order list. 2000-11-26 15:05:46 +00:00
Jonathan Lemon
9528be94e8 Add 'mpsafe' parameter to callout_init() in MD bits.
Reminded by:  jake
2000-11-26 13:52:17 +00:00
Alfred Perlstein
9c19bcddf0 Make uidinfo subsystem mpsafe
use a mutex lock when looking up/deleting entries on the hashlist
use a mutex lock on each uidinfo when updating fields

make uifree() a void function rather than 'int' since no one cares

allocate uidinfo structs with the M_ZERO flag and don't explicitly initialize
them

Assisted by: eivind, jhb, jakeb
2000-11-26 12:08:17 +00:00
Mark Murray
17c9715049 Fix safety-net code. While technically a bug, I'm delighted to see
that it has never (apparently) been invoked.

Submitted by:	ache
2000-11-26 09:58:18 +00:00