Commit Graph

2988 Commits

Author SHA1 Message Date
thorpej 1a6b241b1d Add a config_init() function to initialize the config data structures.
Normally this is called by configure(), but some ports (amiga, atari,
x68k) need to do this early because of how they find the console.
2002-09-30 17:36:31 +00:00
gmcgarry 395d77f3dc Back out __HAVE_CHOOSEPROC stuff. 2002-09-29 21:11:36 +00:00
thorpej bf97c13c6c Declare all cfattach structures const. 2002-09-27 20:41:46 +00:00
drochner 20d06f6b17 SI prefixes apply to decimal multiplies only. For binary (2^n) multiplies
the most "officially looking" is IEC 60027-2, ie "Ki", "Mi", ...,
which is not too popular, and which would require more code changes.
So stick with the traditional capital "K" for (divisor==1024), and use
the SI "k" otherwise (ie (divisor==1000)).
2002-09-27 18:37:43 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6ffacdd722 Oops, missed one place to use the STREQ() macro. 2002-09-27 06:30:05 +00:00
thorpej 64e87fb459 Skip pspec-less entries (root nodes) in cfparent_match(). This fixes
the "kernel crashes" component of PR #18433.
2002-09-27 06:12:55 +00:00
thorpej 97741f5198 Some ports (like Amiga) want to use the config machinery VERY early
(to initialize the console).  Support this when doing cfdriver lookup.
2002-09-27 05:45:03 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
wiz 079c182094 Kilo abbreviation is a small k (PR 18408). 2002-09-26 15:06:47 +00:00
thorpej fc0fe0347d Overhaul the way parent attachments are specified; instead of using
a vector of indices into the cfdata table to specify potential parents,
record the interface attributes that devices have and add a new "parent
spec" structure which lists the iattr, as well as optionally listing
specific parent device instances.

See:

    http://mail-index.netbsd.org/tech-kern/2002/09/25/0014.html

...for a detailed description.

While here, const poison some things, as suggested by Matt Thomas.
2002-09-26 04:07:35 +00:00
thorpej ca5fd3bd46 Garbage-collect the old rmap code. 2002-09-25 22:27:38 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
thorpej ac1b37ae05 Add support for multiple cfdata tables to the internals of the
autoconfiguration machinery, derived from PR #2112.

More work is left to do, including revamping how matches against
a candidate parent are done.
2002-09-23 23:16:06 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
simonb 333a151694 fp->f_count is unsigned, don't check if it's less than zero. 2002-09-23 04:19:16 +00:00
simonb 2a2b50a0d1 Don't return values in a couple of void functions. 2002-09-23 03:37:59 +00:00
jdolecek c0f46c2a40 check_pty(): make sure to zero the newly allocated pt_softc structure 2002-09-22 18:13:38 +00:00
chs 2b73cf7ece encapsulate knowledge of uarea allocation in some new functions. 2002-09-22 07:20:29 +00:00
gmcgarry 6a6ea308fd Separate the scheduler from the context switching code.
This is done by adding an extra argument to mi_switch() and
cpu_switch() which specifies the new process.  If NULL is passed,
then the new function chooseproc() is invoked to wait for a new
process to appear on the run queue.

Also provides an opportunity for optimisations if "switching to self".

Also added are C versions of the setrunqueue() and remrunqueue()
low-level primitives if __HAVE_MD_RUNQUEUE is not defined by MD code.

All these changes are contingent upon the __HAVE_CHOOSEPROC flag being
defined by MD code to indicate that cpu_switch() supports the changes.
2002-09-22 05:36:48 +00:00
manu 80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
christos 2d05cb6a47 Add special handling of VFS_GETARGS (similar to VFS_UPDATE) so that it
can be done non-root, and it does not affect the mount lists.
2002-09-21 18:07:52 +00:00
lha 4fa2032edc uppercase the lkm kernel-userspace dev macros and prefix them with LKM_
make modload print the bdev and cdev major when its a dev lkm
2002-09-18 22:59:36 +00:00
chs 9672ac098f add a new km flag UVM_KMF_CANFAIL, which causes uvm_km_kmemalloc() to
return failure if swap is full and there are no free physical pages.
have malloc() use this flag if M_CANFAIL is passed to it.
use M_CANFAIL to allow amap_extend() to fail when memory is scarce.
this should prevent most of the remaining hangs in low-memory situations.
2002-09-15 16:54:26 +00:00
tsutsui a4c0983618 Fix devsw_name2blk() to return the correct device name for devname arg.
Ok'ed by gehenna.
2002-09-15 14:29:01 +00:00
chs 0e83d71253 print a stack trace in the "spinout" case too. 2002-09-14 21:42:42 +00:00
gehenna a1d78935eb overload block/character into u_long field.
kern/18234: slightly modified
2002-09-13 13:08:53 +00:00
mycroft 30d477000a The entry point address for the interpreter must be adjusted by the text
section VMA on all platforms.  It just happens to 0 normally on everything but
MIPS.
2002-09-12 16:57:44 +00:00
gehenna fcba53f1a9 fix that no major numbers is assigned dynamically if the
not-listed-in-majors device switch is loaded.
2002-09-11 16:33:03 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
jdolecek 32fad21d27 regen: claim syscall slots for kqueue(2) and kevent(2) 2002-09-04 07:46:25 +00:00
jdolecek 281be34ad1 claim syscall slots for kqueue(2) and kevent(2) 2002-09-04 07:45:41 +00:00
jdolecek 4581b93651 Fix comments for #endif, to keep proper nesting and reflect reality.
Fixes kern/18162 by Roskens.
2002-09-04 06:34:21 +00:00
matt 48bbf5f234 Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.
2002-09-04 01:32:31 +00:00
sommerfeld 782a77d899 Initialize proc0.p_raslock to avoid a lock assertion on the first fork(). 2002-08-31 20:02:09 +00:00
hannken 815491c0b3 Remove the old device buffer queue interface.
Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
2002-08-30 15:43:36 +00:00
chs 2f11784ca7 only create a vmcmd for the BSS if there is any BSS. fixes PR 17834. 2002-08-29 06:31:21 +00:00
gmcgarry 366dfb04d7 Attempt to protect restartable atomic sequences of a traced process
being written to.  Breakpoints aren't good in a RAS.  This test isn't
infallible, since we can't protect memory which will be registered
as a RAS in the future.

Also, set the PC before attempting to single-step, so we can backout
from single-stepping.  Just in case we try to single-step into a RAS.
2002-08-28 07:27:14 +00:00
gmcgarry 14e30716d8 Regenerate: rasctl 2002-08-28 07:18:50 +00:00
gmcgarry 5bcbbd40bf MI kernel support for user-level Restartable Atomic Sequences (RAS). 2002-08-28 07:16:33 +00:00
itojun 6e85b03958 reduce diff w/ openbsd 2002-08-28 03:40:54 +00:00
christos fea7af3bbe - Implement passing AT_{R,E}{U,G}ID in the elf aux vector.
- Pass struct proc to copyargs
- fix svr4_copyargs functions
2002-08-26 21:07:38 +00:00
augustss 731d1eccf2 Get rid of sysctl for setting BCM2033 firmware path. It doesn't work
for ports that don't include files.usb, and it's also not done quite
the way it should.
2002-08-26 13:09:39 +00:00
scw a82718b34d Casting from a pointer, to a db_expr_t, has to go via an intptr_t.
(db_expr_t == int64_t on sh5, for example).
2002-08-26 11:34:27 +00:00
scw 41e5042829 Pointers must be cast to {,u}intptr_t before they can be cast to register_t,
at least on sh5, where sizeof(register_t) != sizeof(void *) in ILP32 mode.
2002-08-26 11:26:09 +00:00
thorpej 3767580d1a Fix a signed/unsigned comparison warning from GCC 3.3. 2002-08-26 01:26:29 +00:00
thorpej 79111bb802 Fix signed/unsigned comparison warnings from GCC 3.3. 2002-08-26 01:21:58 +00:00
thorpej d2f6f092f9 Avoid signed/unsigned comparison warnings from GCC 3.3. 2002-08-26 01:17:18 +00:00
thorpej fde1164ef5 Fix some signed/unsigned comparison warnings from GCC 3.3. 2002-08-25 23:23:22 +00:00