Commit Graph

1084 Commits

Author SHA1 Message Date
matt
3575370e0a Remove worthless load.
Save curcpu before doing uniprocessor dispatch.
2003-10-17 22:21:38 +00:00
matt
12ecf72b47 Don't zero curlwp/curpcb in cpu_switchto.
Use correct register in the store conditional.
Add DIAGNOSTIC check for null curpcb on cpu_switch exit.
2003-10-17 21:08:57 +00:00
matt
67ab911529 Add a KASSERT() to verify the pcb is not NULL. 2003-10-17 19:56:18 +00:00
simonb
ef41f16231 Correct a test for setting IFF_OACTIVE on the interface. 2003-10-15 02:10:00 +00:00
matt
4b22ee736b Add support for MPC74[45]7 2003-10-09 20:49:06 +00:00
matt
acf4563b13 Add code to drop into DDB if you get a DSI fault on the current stack page. 2003-10-09 07:12:24 +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
9ed3b44b84 Use ksi_signo and ksi_code accessor macros. 2003-10-08 00:40:54 +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
scw
4eea84b735 Gah. Pick up the MI i2c headers from the right place.
Pointed out by Shigeyuki Fukushima on port-powerpc@.
2003-10-06 18:19:24 +00:00
shige
0af4acb526 Add Real time clock support code. 2003-10-06 18:15:08 +00:00
scw
2ba7642346 MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
2003-10-06 16:15:46 +00:00
manu
2522a3f784 Build PowerPC again with _HAS_SIGINFO. Remove the ifdef on _HAS_SIGINFO
in the header file since all platforms supported by COMPAT_DARWIN now have it.
2003-09-30 21:04:54 +00:00
simonb
953b5b465b Add a dependancy on assym.h; helps "make -j N" kernel builds. 2003-09-29 05:14:23 +00:00
matt
a8a3bf5bed ANSIfy. 2003-09-27 04:44:42 +00:00
matt
827263a8bc Use ksi_signo instead of _signo. 2003-09-27 03:51:54 +00:00
matt
60ff688f72 Define SIGTRAMP_VALID properly. 2003-09-27 00:58:32 +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
matt
6986092cfe Add a machine-dependent SIGTRAMP_VALID macro which is used to test whether
a trampoline version is valid or not.
2003-09-26 22:14:19 +00:00
matt
fb54d529b8 Copy out the entire ksiginfo_t, not just the first word. 2003-09-26 18:00:47 +00:00
eeh
a6192488f7 Define ksi. 2003-09-26 00:00:17 +00:00
matt
2deb8b2e7b Deal with the constification of ksiginfo_t and sigset_t in signalling. 2003-09-25 22:22:36 +00:00
christos
ecfb034cb3 constify siginfo/trapsignal 2003-09-25 22:04:17 +00:00
matt
9a305fca59 Use direct entry for siginfo trampoline. Deal with missing
legacy trampolines in a cleaner manner.
2003-09-25 21:59:55 +00:00
matt
83003b0798 Fill in ksi_code. 2003-09-25 21:58:46 +00:00
matt
85a5f3065d Add siginfo support for PowerPC. 2003-09-25 18:42:18 +00:00
matt
49317aa149 Remove db_onpanic check. 2003-09-25 17:36:33 +00:00
shige
95fa35eb8e Delete this file because filename includes uppercase letters. 2003-09-24 11:51:19 +00:00
shige
0a36d23137 Copy IBM4xxGPx specific autoconf code from evbppc/walnut/autoconf.c. 2003-09-24 11:47:02 +00:00
matt
9c8a5009b3 Define va_list as __builtin_va_list for GCC 3.x. Change stdarg macros
appropriately.  (this is committed from a system run a kernel and userland
built with these changes).
2003-09-24 02:39:56 +00:00
shige
dc98452dce Copy PCI codes for IBM405GPx from evbppc/walnut/pci/{pchb.c,pci_machdep.c}. 2003-09-23 15:30:22 +00:00
shige
03467d74b5 Add devices info for IBM405GPR. 2003-09-23 15:26:46 +00:00
shige
91be153592 Add global cpu_model variable. 2003-09-23 15:25:26 +00:00
shige
e20e959b37 Copy IBM4xxGPx specific autoconf code from evbppc/walnut/autoconf.c. 2003-09-23 15:24:15 +00:00
shige
a8dd07e005 Copy IBM4XX OpenBIOS locore.S from evbppc/walnut. 2003-09-23 15:21:58 +00:00
shige
fc29eb23bf Add some PCI definitions listed in evbppc/include/walnut.h. 2003-09-23 15:19:05 +00:00
shige
2977d5a89a Add IBM40x specific machdep functions. 2003-09-23 15:14:02 +00:00
shige
87f629a7b8 Add IBM405GPr PVR. 2003-09-23 15:10:05 +00:00
shige
94959351e8 Add IBM405GPx specific kernel configuration file. 2003-09-23 15:06:40 +00:00
shige
ee990c494d Move todclock driver from evbppc/walnut/dev. 2003-09-23 15:01:50 +00:00
shige
ff6df75f63 Add on-chip IIC driver.
Add some definitions for IIC driver.
2003-09-23 14:56:08 +00:00
cl
b826d7b216 add MD part of SA/pthread pagefault handling on powerpc 2003-09-19 00:16:34 +00:00
kleink
8d633905ac Bring /* LINTSTUBs */ closer to reality. 2003-09-08 22:37:01 +00:00
kleink
a4909cd01e g/c byte-reversing bus_space_set_region_1() entries. 2003-09-07 22:12:05 +00:00
manu
d13828a7dd forgotten commit for KERN_PROCARGS sysctl in COMPAT_DARWIN 2003-09-07 07:50:31 +00:00
matt
cec9cb32df Move CLKF_BASEPRI to machine specific <intr.h> file since it depends on
the encoding of the spl for the port.
2003-09-03 21:33:31 +00:00
simonb
05c33c1c05 Need to set BUS_DMA_COHERENT to BUS_DMA_NOCACHE on IBM ppc4xx CPUs.
The "emac" interface now works properly again on my Walnut.  Much
thanks to Steve Woodford for tracking this down.
2003-09-03 13:30:05 +00:00
matt
31cc6ab700 Move SFRAMELEN to frame.h and use it in vm_machdep.c. In setfunc, setup
callframe linkages correctly.  Restore use of ldptr to locore_subr.S
[pthreads and gdb no longer crash/hang the system]
2003-08-27 20:20:07 +00:00
matt
56f115e896 Switch back to adjusting stack by addi instead of ldptr until I can locate
who's setting up the stack wrong.
2003-08-27 19:45:28 +00:00
chs
939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00