Commit Graph

740 Commits

Author SHA1 Message Date
matt e1245a3c46 Rework the coredump code to have no explicit knownledge of how coredump
i/o is done.  Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o.  This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
2005-06-10 05:10:12 +00:00
scw e3896510e9 Fix const fallout when DEBUG is defined. 2005-06-03 08:55:33 +00:00
tsutsui e29ae5bc6f Fix one more shadow warning in #ifdef DIAGNOSTIC. 2005-06-02 16:47:42 +00:00
tsutsui a4c79ce346 Fix a shadow warning. 2005-06-02 14:56:58 +00:00
tsutsui 4b933e86cb Adapt to ddb constification. 2005-06-02 14:51:32 +00:00
tsutsui 096dae56ce Fix hexstr() for -Wwritable-strings. 2005-06-02 14:29:02 +00:00
tsutsui e240af5cd6 Add consts and fix a shadow warning. 2005-06-02 14:24:26 +00:00
scw 8f4aee207b Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).
2005-06-01 13:01:35 +00:00
he 57ef378309 Adapt to recent constification of db_interface.h and db_sym.h. 2005-05-30 21:15:28 +00:00
christos 362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
kleink b2cb7fcd8a Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.

IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
2005-04-15 22:39:10 +00:00
matt 1b5520b3d6 For GCC3 and beyond, use the __builtin_va_* types and functions to
deal with variable argument lists.
2005-04-14 20:06:15 +00:00
scw 54e140a9bb In m68k_make_fpu_idle_frame(), replace fmove.x with fmove.d as the former
is not supported natively by the 060's FPU.

Fixes a problem on MVME177 reported by Matt Thomas on port-mvme68k@
2005-04-14 12:35:42 +00:00
yamt 6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
matt a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
chs 589a29e548 fix an off-by-on in pmap_check_wiring(): we increment the PTP refcount
before calling this, so it's ok to see the max value here.
2005-02-14 02:15:43 +00:00
atatat a076957818 Convert the PMAP_PREFER() macro from two arguments (offset and hint)
to four (adding size and direction).

In order for topdown uvm to be an option on ports using PMAP_PREFER,
they will need to "prefer" lower addresses if topdown is being used.
Additionally, at least one port also needs to know the size.
2005-01-17 04:37:20 +00:00
yamt 95c82bfee4 introduce vm_map_kernel, a subclass of vm_map, and
move some kernel-only members of vm_map to it.
2005-01-01 21:02:12 +00:00
chs 6bd8ed04bb add cases for '040 and '060 FPUs. from Radek Kujawa. 2005-01-01 17:11:39 +00:00
thorpej 7a60e77293 bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
2004-11-28 17:34:45 +00:00
christos 527610e2db moved from x86k/x68k 2004-11-16 01:21:45 +00:00
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
rumble b1a9752c01 Correct a few comment typos that have propagated through the
tree.
2004-09-16 03:57:10 +00:00
thorpej 6c08646cb8 Garbage-collect pagemove(); nothing use it anymore (YAY!!!) 2004-08-28 22:12:40 +00:00
thorpej 605050704a Use ANSI function decls and static. 2004-08-28 22:06:28 +00:00
thorpej cfc755477e Minor style nit. 2004-08-28 21:56:00 +00:00
thorpej 606336a153 De-__P 2004-08-28 21:31:07 +00:00
thorpej 63a3547c69 - De-__P.
- Also define DB_ELF_SYMBOLS and DB_ELFSIZE.
2004-08-28 21:24:20 +00:00
skrll adf5c92842 Include <sys/cdefs.h> once. 2004-08-10 07:35:53 +00:00
is fae5cbad97 Revert last change. It breaks the build due to interactions with
frame.h.
2004-07-29 12:54:46 +00:00
is 3f5c400809 For a while, we exported symbols in the user namespace (which should only
be interesting for the kernel), thus breaking (e.g.) vim. (PR 26048)
2004-07-28 11:39:37 +00:00
wiz 1249084227 "panicking" needs a k. 2004-05-16 15:44:10 +00:00
drochner 19f047f8d0 SIGTRAMP_VALID() should not pollute the user namespace 2004-05-10 21:51:49 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
drochner c83eb997b8 nothing cares about __HAVE_SIGINFO anymore, so nuke it 2004-03-26 21:39:57 +00:00
wiz f0d2889eb5 Move
(c) TNF
line from 4-clause UCB to 3-clause UCB license; in other words,
remove UCB's ad clause from the license TNF grants.
There is no point in TNF demanding that UCB's ad clause be followed
when even UCB doesn't demand it any longer.

Ok'd by board@ and agc@.
2004-03-24 15:38:41 +00:00
nathanw 797c90374e Centralize identical copies of proc_trampoline code.
(lots more opportunites here for the bored hacker, such as rei and trap0...)
2004-03-04 19:53:44 +00:00
wiz dc4cc98b15 becuase -> because. From Peter Postma. 2004-02-24 15:05:53 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
martin da4e67accc Do not export __HAVE_RAS to userland. Applications are supposed to try
rasctl() and detect failure with EOPNOTSUPP.
2004-01-18 18:23:19 +00:00
jdolecek 089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
keihan 29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
christos a21fdf3b43 bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa. 2003-11-25 23:11:52 +00:00
dsl 2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
he d800494086 Based on the historic hp300 pmap, initialize firstpage to TRUE, and
negate that after processing the first page.
2003-11-01 17:16:30 +00:00
he 22c1eedd0c Initialize needcflush to FALSE in pmap_do_remove(). 2003-11-01 15:32:47 +00:00
simonb 6d85c5e0d5 Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
2003-10-31 03:28:12 +00:00
kleink 6d25a1e180 Don't define __HAVE_LONG_DOUBLE for __mc68010__. 2003-10-30 13:18:24 +00:00
mycroft c948a7f77b Allow a port to override MAXPHYS. 2003-10-30 06:13:19 +00:00