Commit Graph

695 Commits

Author SHA1 Message Date
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
mycroft 1a2ab14519 In the 68010 code, we were reading sched_whichqs wrong... 2003-10-30 05:12:28 +00:00
kleink dbecd8cc2e Similar to sparc, make available the extended-precision definitions for
_KERNEL; the FPE package will require it once it's used on sun2.
2003-10-28 21:23:47 +00:00
mycroft dd65577904 Remove bogus initializer. 2003-10-28 20:39:54 +00:00
mrg 93b8296886 m68k_make_fpu_idle_frame() is not needed/wanted if defined(M68010) 2003-10-28 06:55:45 +00:00
kleink 91af1eaa96 #define __HAVE_LONG_DOUBLE on platforms which implement a distinct
`long double' type.
2003-10-28 00:55:28 +00:00
cl 7585316531 initialize uninitialized 2003-10-27 02:03:10 +00:00
kleink 964d6747b5 Err, rename some members added in previous to make them reflect their
semantics better.
2003-10-27 01:11:46 +00:00
cl 16d49327a2 appease lint's ``warning: nonportable bit-field type'' in MD header 2003-10-27 01:05:08 +00:00
kleink b37192f049 For convenient use in libc, add unions of the C floating types and their
corresponding structure definitions.
2003-10-26 21:46:46 +00:00
kleink 95971b8759 Correct the position of the QUIETNAN bit. 2003-10-26 20:59:51 +00:00
kleink a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00
kleink 7bc235809e Hide the extended-precision definitions from __mc68010__. 2003-10-26 10:08:02 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
kleink 422697679e * Move the definitions for types other than single-precision and double-
precision back to machine-dependent headers.  C99 has no strict
  requirement which, if any, extended-precision type `long double' must
  match, and even between 80-bit formats there are differences in
  implementation (m68k vs. x86).
* On arm, consider __VFP_FP__.
2003-10-23 23:26:06 +00:00
kleink e015c8ea64 Account separately for the explicit integer bit in extended-precision
format, due to its role in denormal representation; inspired by communication
with Charles Hannum.
2003-10-23 16:57:20 +00:00
kleink c51a4365e2 While I'm here, retire the FPE code's own copy of ieee.h. 2003-10-23 15:07:30 +00:00
kleink d216ee1de2 Make struct ieee_ext actually match the layout of m68k extended-precision. 2003-10-23 15:04:00 +00:00
briggs 093821886e Define SIGTRAMP_VALID(v). 2003-10-18 17:57:06 +00:00
thorpej 901da40cf9 Add some accessor macros for the ucontext:
* _UC_MACHINE_PC() - access the program counter
* _UC_MACHINE_INTRV() - access the integer return value register
* _UC_MACHINE_SET_PC() - set the program counter (this requires
  special handling on some platforms).
2003-10-08 22:43:01 +00:00
thorpej 68723a995b * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.
2003-10-08 00:28:40 +00:00
cl 3f16119f55 Cast through (void *) to appease gcc3. 2003-09-27 20:01:58 +00:00
mhitch 28527002f8 Cast through (void *) to appease gcc3. 2003-09-27 19:34:17 +00:00
nathanw 4d59420344 Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
2003-09-26 22:45:41 +00:00
christos ecfb034cb3 constify siginfo/trapsignal 2003-09-25 22:04:17 +00:00
cl 3337c2e727 move #defines back to frame.h 2003-09-23 11:33:50 +00:00
cl 95bf6d89d8 SA_SIGINFO support for m68k (compat svr4) 2003-09-22 14:47:35 +00:00
cl 11af0a3c8d SA_SIGINFO support for m68k (emul linux) 2003-09-22 14:36:42 +00:00
cl bf9728e0db SA_SIGINFO support for m68k (compat sunos) 2003-09-22 14:34:57 +00:00
cl 9289d63920 SA_SIGINFO support for m68k 2003-09-22 14:18:33 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
lukem 4b2744bf35 __KERNEL_RCSID() 2003-07-15 02:43:09 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
thorpej f4fff81d3a Adapt to ktrace/lwp changes. 2003-06-29 15:49:49 +00:00
thorpej e3165e7ebd Adapt to ktrace/lwp changes. 2003-06-29 15:27:59 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
martin a394980af5 Move (and unify) PMAP_DEBUG and FPU_EMULATE here - it is tested in
shared files.
2003-06-24 19:55:22 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
kleink 776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
thorpej 36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
scw 8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
bjh21 2020a72f18 Use <sys/float_ieee.h> rather than <sys/math_ieee.h>, which doesn't exist. 2003-04-20 12:57:43 +00:00
christos a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
nathanw ff28c51cc0 Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.
2003-04-11 22:02:28 +00:00