Commit Graph

90 Commits

Author SHA1 Message Date
chs
7732d6db9d handle T_CONDITION traps (by sending SIGFPE).
fix T_EXCEPTION code to handle the other FP major opcodes.
2004-08-07 21:47:05 +00:00
chs
43d9a77774 remove the alignment attribute from the typedef of __cpu_simple_lock_t
since it doesn't have any affect and lint chokes on it.
2004-08-07 21:42:10 +00:00
chs
1974de97c5 stub out the ldcw stuff for now, since gcc -O2 chokes on it. 2004-08-07 21:41:44 +00:00
chs
2e5e9111d9 clean up some register naming. 2004-08-07 21:41:18 +00:00
chs
f05f720ae1 real siginfo support. 2004-07-24 19:04:53 +00:00
chs
d2943099a2 FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
 - emulation of unimplemented instructions (eg. on PA-7300LC)
2004-07-24 18:59:05 +00:00
chs
7a0d577e38 put RAS_DECL() back to declaring a function by default (since SH5
requires that).  instead, allow <machine/types.h> to override the
default definition and do so on hppa.
2004-07-19 03:12:31 +00:00
chs
0d86a5cd52 add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
 - fill in the definition of struct mcontext.
 - implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
   cpu_switchto().
 - for now, force the right priviledge bits and space regs in setcontext().
 - use correct values for __SIMPLELOCK_*.
 - move the user stack to start at a multiple of the pthread stack size
   so that libpthread can use the sp-masking trick.
2004-07-18 23:21:35 +00:00
chs
611ac30047 use mi_userret(). 2004-07-18 20:57:34 +00:00
chs
807ed3c6d2 store the kernel stack pointer for a sleeping LWP in its PCB instead of
in its trapframe.  this is needed for scheduler activations, so that we can
change the user stack pointer via the trapframe.  from openbsd.
2004-07-18 20:27:11 +00:00
chs
8f2322ff01 remove an extra instruction I added with an overzealous cut+paste. 2004-07-14 07:23:10 +00:00
chs
9c209c4b37 clear pcb_onfault before calling uvm_fault() and restore it after.
remove some debug code that actually makes debugging harder.
2004-06-15 16:29:32 +00:00
chs
b7bd18170e flush the dcache after accessing pcb_fpregs.
we access it with the DTLB both on and off,
so we need to avoid bad cache aliases.
2004-06-15 16:29:01 +00:00
skrll
31fb35bd8d Fix MAKEOBJDIRPREFIX builds and remove a line continuation that is not
needed.
2004-06-15 07:41:36 +00:00
chs
5579fe0ffc change sigdebug default to not print anything. 2004-06-11 14:01:02 +00:00
chs
5183104959 redo rev. 1.13, handle curlwp being NULL correctly. 2004-06-09 16:06:56 +00:00
chs
6e6e8ad7fe convert pmap_deactivate() from a macro to an inline function
so that the kernel builds again.
2004-05-18 15:33:11 +00:00
chs
df674b2ca1 for instruction TLB miss traps, process the fault with VM_PROT_EXECUTE
instead of VM_PROT_READ (to support non-executable mappings).
2004-05-16 17:07:29 +00:00
chs
f6d0516ba0 in pmap_protect(), don't just return if the desired permissions include write.
we could be removing execute permission.
2004-05-16 17:07:07 +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
80bded6289 To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
2004-03-26 14:11:01 +00:00
cl
ea5ec0212d add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
2004-03-14 01:08:47 +00:00
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
chs
7e6508e29e add a PMAP_NC flag for pmap_kenter_pa() to specific a non-cached mapping.
use this in mbus_dmamem_map() to fix corruption of DMA memory.
note that this TLB bit is ignored on some CPUs (PA7100 and probably
others of that era), so this doesn't fix the problem in general,
but it does work on newer models and will make things easier later.
2004-01-05 02:25:32 +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
chs
d740b5e191 de-__P, remove register, ansify. 2003-11-28 19:02:25 +00:00
chs
da3e14c277 fix address computation in vmapbuf(). use uvm_km_valloc_prefer_wait().
call pmap_remove() explicitly in vunmapbuf(), this has been required
for several years now.  fixes PR 20933.
2003-11-18 11:37:39 +00:00
tsutsui
3dc4924359 In trap(), curlwp could be NULL so don't refer it implicitly. 2003-11-08 12:08:12 +00:00
matt
1dc67abbb1 Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
2003-11-01 18:23:37 +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
617742615c It turns out the hppa ABI we're using does not support an extended-
precision type, so drop the library support for now but leave in place
(#ifdef _LP64) the header definitions.
2003-10-30 22:46:17 +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
kleink
964d6747b5 Err, rename some members added in previous to make them reflect their
semantics better.
2003-10-27 01:11:46 +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
a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00
kleink
d7efc4af9e Rip out E80 format definitions which are neither "notyet", nor going to
happen.
2003-10-26 00:36:43 +00:00
jdolecek
690bfc89f6 g/c #if 0'ed (and empty) cpu_wait() 2003-10-25 17:49:57 +00:00
chs
0e9360f160 NULL -> 0 2003-10-25 16:15:07 +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
eef6265460 G/c the local declaration of __nanf; handling of this (conditional on
__HAVE_NANF) was moved to <math.h> some time ago.
2003-10-22 21:04:40 +00:00
fvdl
a08babb013 NULL -> 0 for preempt() argument. 2003-10-21 00:49:34 +00:00
cl
1f11f69f25 add MD part of SA/pthread pagefault handling on hppa 2003-10-13 21:12:12 +00:00
chs
06332c88ef update for new gas syntax. from Jochen Kunz. 2003-10-10 15:07:43 +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
matt
0c7bac0672 Change headers to comply with the new toolchain changes. 2003-10-06 05:27:19 +00:00
simonb
550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
matt
200ff49b87 Use #ifdef _KERNEL_OPT around #include "opt_XXX.h" 2003-09-20 22:28:19 +00:00
matt
70060b7c61 Add multiple inclusion protection. 2003-09-20 22:26:16 +00:00
matt
e104d5f8a7 Install <hppa/mcontext.h> 2003-09-20 22:25:40 +00:00
chs
e46cb5bfce add some placeholders so we can at least build. 2003-08-31 01:28:58 +00:00