Commit Graph

111 Commits

Author SHA1 Message Date
chs
b25ecfbe53 only lvalues can be incremented. found by gcc4. 2005-05-20 15:09:45 +00:00
chs
9a563a9ab1 in pmap_protect(), remove the assertion that any entries modified must be
managed.  after the yamt-km changes, the sti driver needs to add execute
permission to the (now unmanaged) mapping for its copy of the card firmware,
and this appears to work fine already.
2005-05-07 15:54:46 +00:00
chs
9159c32c9e add additional args to frame_sanity_check() so we can log which
context it was called from and the trap type (if called from trap()).
2005-05-07 15:06:51 +00:00
chs
e92ef73e64 in the trap handler for T_EMULATION traps, also check if the opcode is 0xe.
if it is, then the instruction is an FPU instruction and we must not check
bits 23-25 since they are not a UID field in this format.

this fixes the spurious SIGILLs sometimes triggered by xmpyu instructions.
2005-05-07 15:03:00 +00:00
chs
750baa7b66 in sendsig(), set tf->tf_iisq_* as well, since a thread might take a signal
while it's executing in the gateway page.
2005-05-07 14:27:14 +00:00
chs
521e1394ad remove the sigcontext signal stuff, we've never used it. 2005-05-01 19:19:25 +00:00
chs
058afa680c flush the FPU before accessing the PCB copy. 2005-05-01 19:18:39 +00:00
chs
e47a91f6f0 paranoia: move the dcache flush to the end. 2005-05-01 19:18:12 +00:00
chs
613d022e34 check pcb_onfault for kernel T_DATALIGN traps (for ddb). 2005-05-01 19:17:52 +00:00
chs
e7346e3b2b in cpu_lwp_free(), use hppa_fpu_flush() instead of a broken inline version.
in vmapbuf() and vunmapbuf(), adapt to yamt-km API changes.
2005-05-01 15:23:18 +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
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
tsutsui
061b204c56 user_backtrace() is used if DEBUG or USERTRACE is defined, but not DIAGNOSTIC. 2005-02-17 14:19:49 +00:00
skrll
015f297666 Modernise these to use GCC __builtin_* functions and types.
Also provide a (protected) va_copy.
2005-02-04 12:15:22 +00:00
jmc
3fed402d23 Provide lint wrappers around the va_* defs like other ports do so this can
make it through lint (was dying in libpam)
2005-02-03 23:45:37 +00:00
jkunz
e4bed1ee79 Implement powerd(8) interface via sysmon(9) for power switch, controllable by sysctl(8). 2005-01-31 18:17:35 +00:00
jkunz
48f11129db Import mfcpu() from OpenBSD, needed by power switch code. 2005-01-31 17:32:15 +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
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
thorpej
6c08646cb8 Garbage-collect pagemove(); nothing use it anymore (YAY!!!) 2004-08-28 22:12:40 +00:00
jkunz
1035c6af08 Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
2004-08-26 16:48:06 +00:00
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