Commit Graph

445 Commits

Author SHA1 Message Date
yamt e527ebac6f - remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
	ctod
	dtoc
	ctob
	btoc
	dbtob
	btodb
2006-08-28 13:43:35 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
ad 2b79369c7e - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
mrg d6b63d330d use "j" instead of "ll" for intmax_t and friends.
XXX: we should probably use "j" for all(?) other platforms as well
(just for intmax_t and friends.)
2006-05-22 07:38:41 +00:00
yamt b146bf6cab include kauth.h for kauth_cred_geteuid. 2006-05-15 20:55:47 +00:00
elad 8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
cherry 93447d7ac4 closes: PR kern/32359
modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.

Patch from cherry@mahiti.org
2006-04-01 15:45:00 +00:00
drochner 47fbb9d86b adapt to uvm_fault() interface cleanup: kill the useless 3rd argument 2006-03-15 18:12:02 +00:00
thorpej 61dd49d3bc Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
2006-03-07 07:21:50 +00:00
thorpej be8b235384 Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
he 26393ce66e Remove another instance of the SET/CLR/ISSET macro triplet, now that
they have been moved to <sys/types.h>.
2006-03-06 15:03:49 +00:00
christos beea4fc3fa Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
2006-03-05 19:08:38 +00:00
christos a4495f4cec implement PT_SYSCALL 2006-03-05 07:21:37 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
thorpej 3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
dsl 67d47e0290 Change sys/arch/xxx/include/bswap.h to #include machine/byte_swap.h then
sys/bswap.h in order to pick up the MD inline routines and the constant
folding definitions in the right order.
Code can include either sys/bswap.h or machine/bswap.h with the same effect.
2006-01-31 07:49:18 +00:00
dsl c88ae1f9ee Move all the stuff that detects bswapxx(constant) into the MI sys/bswap.h
Put the minimum to define the required inline assembler or C into the MD files.
NB: there may be some fallout from this!
2006-01-30 22:46:35 +00:00
dsl 2723c11bd9 Move the definitions of ntohl() and friends into sys/endian.h where they
are defined in terms of bswap32() and bswap16().
This makes the definition be in the same place for all systems regardless
of creed^Wendianness.
2006-01-30 21:52:38 +00:00
dsl 6f0f9f8763 Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
2006-01-29 21:42:40 +00:00
christos 3ffa241fcd Add a STRONG_ALIAS macro 2006-01-20 22:02:40 +00:00
perry 2d542ba1f8 inline -> __inline 2005-12-28 19:09:29 +00:00
perry e7b322a5f7 inline -> __inline 2005-12-28 18:40:13 +00:00
perry 50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry 2d65de2479 bare asm -> __asm 2005-12-24 22:45:33 +00:00
perry 5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt 6bba73019a use VM_PAGE_TO_PHYS macro. 2005-12-08 22:41:44 +00:00
yamt bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
yamt d597202302 make VMSWAP optional again. 2005-09-17 14:38:38 +00:00
drochner 44bf0a7ee2 s/locdesc_t/int/g 2005-08-26 13:19:34 +00:00
yamt 38ca5312d2 revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
2005-07-31 04:04:30 +00:00
yamt 1d0891101c defflag VMSWAP. 2005-07-30 06:33:33 +00:00
christos f1461c7e8a No point in declaring syscall_intern and syscall in a zillion places. 2005-07-10 00:45:52 +00:00
cube 72f6b3a65c Constify machine32 and machine_arch32. 2005-07-03 17:18:02 +00:00
cube 6f082c10a9 Make COMPAT_NETBSD32 emulate hw.machine. While it might seem wrong to do
so, it introduces breakage because a lot of applications make assumptions
from its value.  It's especially bad in the sparc64 case, where 64-bits
instructions can be used in 32-bits addressing mode.  However, there are
other means to know the capabilities of the CPU.
2005-07-03 16:53:46 +00:00
christos 6d30dcee75 PR/29607: Christian Biere systrace doesn't handle interrupted syscalls properly
Instead of jumping to the default "bad" case, jump to the error handling
switch, so that we can deal with ERESTART/EJUSTRETURN properly.
2005-07-01 18:01:44 +00:00
drochner 996c273eda adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes 2005-06-30 17:03:51 +00:00
he 970b620d42 Adapt to changed signature of cpu_coredump32(). 2005-06-16 05:38:43 +00:00
dyoung a37289db57 Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/.  That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such.  I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 19:46:15 +00:00
he 15f674bbfa Modify the rtc_gettime() and rtc_settime() functions to take a volatile
argument to make this build with -Wcast-qual.
2005-06-10 22:25:42 +00:00
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
he c74477c157 Adapt to constification. 2005-06-03 15:18:38 +00:00
scw 6d4597956c Fix const/cast fallout. 2005-06-01 13:05:29 +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
scw 51d46cb132 Fix const and shadow variable fallout. 2005-06-01 10:55:07 +00:00
christos f6b4c20f18 s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name. 2005-05-31 04:03:08 +00:00
kleink 4a6a03b162 Include <sys/cdefs.h> for __signed; related to lib/30072. 2005-05-25 20:58:00 +00:00
jdolecek 4d515665c5 assign major for nsmb(4) 2005-05-10 00:02:35 +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