Commit Graph

114 Commits

Author SHA1 Message Date
simonb
ef41f16231 Correct a test for setting IFF_OACTIVE on the interface. 2003-10-15 02:10:00 +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
eeh
a6192488f7 Define ksi. 2003-09-26 00:00:17 +00:00
matt
85a5f3065d Add siginfo support for PowerPC. 2003-09-25 18:42:18 +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
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
2977d5a89a Add IBM40x specific machdep functions. 2003-09-23 15:14:02 +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
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
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
matt
47483092bd Cleanup/rework cpu_switch*, switch_exit, Idle routine. Remove pcb_psl
since it was write-only.  When setting up a process, make sure the fake
callframes are properly linked together.

Only lower SPL when in Idle loop.  Raise spl to previous level (which would
be IPL_SCHED) when exiting Idle loop.  Never lower SPL anyplace else.
2003-08-12 18:34:47 +00:00
matt
c0d6cb285d Nuke ci_curpm and curpm. Nuke pcb_pmreal. Those were use for spill stacks
and those no longer exist.  for few uses that need CURPM, use CURPCB/PCB_PM
2003-08-12 05:06:53 +00:00
chs
b90614b54e catch up with changes elsewhere. 2003-08-11 05:13:20 +00:00
matt
a4a468e215 Add SFRAME_USER_SR (even though the 4XX doesn't have one). 2003-08-04 00:30:51 +00:00
eeh
f77f1feee5 Use %r<n> for register names. 2003-08-03 23:26:55 +00:00
matt
777589be9a Add each register in trapframe, switchframe, and faultbuf. 2003-08-03 21:40:13 +00:00
scw
f0f724e255 Fix the default bus dma tag. 2003-07-25 10:50:13 +00:00
scw
728102e66c Switch ibm4xx over to using the more flexible powerpc bus_space/bus_dma code. 2003-07-25 10:12:42 +00:00
simonb
9853da3d35 Remove an unused variable. 2003-07-19 08:20:22 +00:00
simonb
d854b5c002 SZ_BOARD_CFG_DATA is not used anywhere, remove it. 2003-07-16 03:52:31 +00:00
lukem
ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
simonb
649e4ff2d5 Check return value of prop_get() correctly; serial ports now attach on
a walnut, but don't seem to accept input(?!).
2003-07-14 05:21:25 +00:00
matt
554b4aa05f Enhance db_trace to understand syscalls and print the syscall number
that the user requested.  For example:

0xd5c56f40: SC trap #240 by 0x15668c60: srr1=0xd032
            r1=0xffffe470 cr=0x44000045 xer=0 ctr=0xeff27ab8
2003-07-09 22:51:50 +00:00
thorpej
d00b22d0e7 Consult the "mac-addr" property associated with the emac device in
the dev_propdb rather than referencing board_data.
2003-07-04 02:34:47 +00:00
thorpej
5b7c5eadea Consult the "frequency" property associated with the device in the
dev_propdb, rather than using "board_info".
2003-07-04 02:21:02 +00:00
scw
b8b2b1d895 Fix resident page accounting for the kernel pmap. 2003-07-03 13:18:42 +00:00
simonb
ccbfec4208 Sprinkle some KNF. 2003-06-28 14:32:02 +00:00
thorpej
452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
simonb
67417f64a8 Sprinkle some TABs to line up the columns in the cputab models array. 2003-06-13 04:29:39 +00:00
msaitoh
6f197c635e Add support IBM 405GPr 2003-06-13 04:05:26 +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
9ca9578760 Add bit definitions for some registers. 2003-05-01 09:05:56 +00:00
thorpej
c9228c8ddd Use PAGE_SIZE rather than NBPG. 2003-04-02 04:17:50 +00:00
hannken
44b1e07ec9 Add support for the IBM 403GCX cpu. Enabled with "options PPC_IBM403".
- different set of device control registers.
  - non-standard access to the time base.
  - 16 byte cache lines.

Approved by: Eduardo Horvath <eeh@netbsd.org>
2003-03-11 10:40:15 +00:00
matt
107803a3a3 Re-arrange things in evbppc & powerpc to support OEA-based eval boards
in evbppc.  OEA-based board(s) to be added later.
2003-03-04 07:50:57 +00:00
thorpej
6068b273f4 Fix some printf formats. 2003-02-07 04:39:09 +00:00
matt
7c1e50a21a Perform a rototill of the powerpc code. Mandate use of SPRG0 to store
a pointer to current cpu's cpu_info structure.  Use cpu_info for
intstk,intr_depth,still_stk,idle_pcb,curpcb,curlwp,etal even on
non-MULTIPROCESSOR machines.  Add common macros GET_CPUINFO and
INIT_CPUINFO to get and initialize the cpu_info struct on startup.  Make
ibm4xx use the standard <powerpc/frame.h>.  Use IFRAME_xx in ibm4xx
trap_subr.S instead of explicit magic offsets.  Move INTSTK and SPILLSTK
to std.<platform>.  Change faultbuf to a struct instead of an array.

On MPC6XX cpus, stop using the vector page for temporary space and use
reserved space in cpu_info.
2003-02-02 20:43:17 +00:00
thorpej
f91b0bb3f2 Merge the nathanw_sa branch. 2003-01-18 06:23:28 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00