Commit Graph

1466 Commits

Author SHA1 Message Date
freza
19461b0a95 Make sure we mask statclock timer on ibm4xx systems. This avoids
pthread "related" panics like:

    panic: remrunqueue: bit 18 not set
    Stopped in pid 479.3 (exsprite) at      netbsd:cpu_Debugger+0x10:       lwz
    r
    0, r1, 0x14
    db> bt
    0x869abe00: at panic+0x1b4
    0x869abe50: at remrunqueue+0x80
    0x869abe60: at mi_switch+0x114
    0x869abea0: at sa_unblock_userret+0x4e8
    0x869abee0: at syscall_plain+0x224
    0x869abf40: user SC trap #93 by 0x41949810: srr1=0xc030
               r1=0x445fff40 cr=0x40000002 xer=0 ctr=0x41aae208 esr=0 pid=0x36

While there, cleanup IPL_ definitions somewhat and fix interrupt mask
calculation per spl(9).

OK by matt@
2006-09-27 09:11:47 +00:00
briggs
31c06a3ac5 Obvious (now that Jorge Acereda pointed it out) bug in the restoremmu
section of ENTRY(ofwr_init) (a constant offset of 4 was changed to %r4).
2006-09-25 01:45:27 +00:00
matt
6ec9b8bc84 Define a PHYSMAP_VSID for mapping pa==va. 2006-09-21 18:43:30 +00:00
matt
b62d9f714a When mapping the kernel, make to update its segment register to be valid. 2006-09-19 22:15:06 +00:00
matt
cbdd4e594a At the end of pmap_bootstrap, if PMAP_NEED_MAPKERNEL, map the kernel into
the kernel's pmap (text will be rx, data will be rw).
2006-09-19 20:19:53 +00:00
simonb
efa68b8f30 Fix white-space nit. 2006-09-19 00:50:39 +00:00
gdamore
825211a4f8 Conversion of evbppc to generic TODR. ok freza@ 2006-09-18 22:05:47 +00:00
sanjayl
e08ce7a8c2 Remove debug printf 2006-09-18 13:25:33 +00:00
gdamore
d87601b78b Remove unused todclock files -- these are left overs from pre-generic-TODR. 2006-09-17 04:11:55 +00:00
yamt
9d3e3eab23 merge yamt-pdpolicy branch.
- separate page replacement policy from the rest of kernel
	- implement an alternative replacement policy
2006-09-15 15:51:12 +00:00
garbled
50c16ab16f Apply the patch found in PR/28512 and PR/23801. Ok'd by a few people.
From the PR:
The cache is flushed using the bus address where the phys address
is required.  Errors would be seen only on ports where address
translation is done between the bus and physical memory.
2006-09-07 19:13:11 +00:00
sanjayl
3c19528c31 Remove debug printf that got left in accidentally 2006-09-07 16:00:29 +00:00
ad
6c8685b2d2 Use p_find(addr, PFIND_LOCKED) in case the proclist_lock is held. 2006-09-06 23:58:20 +00:00
matt
c8b1a4622f Add/rename macros (PVO_xxx_P) for testing WIRED, MANAGED, EXECUTABLE ness
of a PVO entry.  (Fixes where PVO_WIRED was tested against pvo_pt.pte_lo
instead of pvo_vaddr)
2006-09-02 17:08:44 +00:00
freza
fd156a0bc9 * move the "cheating" conditional into unmapiodev() implementation
itself (instead of memio_unmap()), as it differs between OEA and
  ibm4xx.

OK by matt@
2006-08-31 23:14:38 +00:00
freza
ca97defaa7 * ppc4xx_tlb_reserve(): allocate "reserved" TLB entries dynamically
* ppc4xx_tlb_mapiodev(): resolve pa to va from reserved TLB entries

OK by matt@

XXX we'll keep TLB_NRESERVED defined until we fix explora to use new API
2006-08-31 22:13:51 +00:00
freza
60d1041835 * add PVR values for Xilinx 405 cores
* don't try to decode vendor-specific PVR, print raw value instead.
* panic() if we see cache wasn't probed, we'd crash later anyway.
* rework the way PVR gets translated to core name.
* while there, normalize printf format ("%s: ...", device_xname(self), ...).

OK by matt@
2006-08-31 21:32:27 +00:00
matt
77ef4246de Call unmapiodev when unmapping bus_space to possibly reclaim the VA. 2006-08-31 18:28:47 +00:00
matt
3d324b035e Add unmapiodev(vaddr_t, vsize_t) (to be used by bus_space_unmap) 2006-08-31 18:23:40 +00:00
matt
25159b5f42 Add unmapiodev. 2006-08-31 18:18:17 +00:00
matt
d2fa9e5329 Make cpu_coredump dependent on COREDUMP 2006-08-31 16:49:21 +00:00
yamt
e527ebac6f - remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
	ctod
	dtoc
	ctob
	btoc
	dbtob
	btodb
2006-08-28 13:43:35 +00:00
sanjayl
265929b20e 1st cut of Powermac G5 support (uses bridge mode). 2006-08-05 21:26:48 +00:00
elad
290bf1e3e7 fix typoe; thanks ober 2006-07-25 18:14:20 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
ad
2b79369c7e - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
gdamore
34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
ross
afb5180310 wrap as(1)-only elements in #ifdef _LOCORE 2006-07-12 23:52:21 +00:00
simonb
cc85b518f1 Remove unused ppc4xx_tlb_unpin() function. 2006-07-12 06:22:17 +00:00
thorpej
55e8bbeb6e Put appropriate prefixes on property names to reduce chances of name
collisions.
2006-07-10 16:28:44 +00:00
freza
75998ff7ee Fix recent ibm4xx/intr.c rework:
- Recalculate masks _after_ new interrupt handler is enqueued, otherwise
  the very last one won't ever be enabled (from hannken@)

- We can't use splhigh() to protect intr_calculatemasks() since it would
  use soon-to-be-invalid mask. Instead, fiddle PSL_EE directly as we do
  in other places.

Reviewed and tested (evbppc/explora) by hannken@
2006-07-10 12:52:13 +00:00
ross
dd8ab8abc4 add new split personality for ELF64 2006-07-08 06:36:42 +00:00
ross
c389a93699 Add _LP64 version of _mcount for ppc64 2006-07-07 21:28:03 +00:00
ross
d08a822069 Add stmd and lmd macros. 2006-07-07 21:26:54 +00:00
ross
96cf233754 more refinements for ppc64 PIC/PLT/TOC issues 2006-07-06 15:26:51 +00:00
scw
5914c06c4c Fix the entries for SPR_DC_ADR and SPR_DC_DAT. 2006-07-06 15:09:54 +00:00
simonb
78877867ee Remove some unused variables. 2006-07-04 06:25:50 +00:00
ross
db9b461644 Add ppc64 ENTRY() macro that defines the descriptor and the dot symbol. 2006-07-01 20:34:49 +00:00
freza
78037d3f6d Bring ibm4xx interrupt code up to date:
- generic soft interrupts (ie. use powerpc/softintr.c)
- interrupt event counters (using the ones from powerpc/cpu.h:cpu_info
  where appropriate)
- cleanup ibm4xx_intr.h, move implementation details to intr.c

Convert all affected evbppc platforms.

OK by simonb@, some points discussed with matt@
2006-06-30 17:54:50 +00:00
drochner
a3464e1d27 use the "i2cbus" interface attribute rather than putting a string name
into the i2cbus attach args
2006-06-26 18:21:38 +00:00
freza
dc25af75d0 Merge multiple definitions of cntlzw() ("count leading zeros")
instruction-wrapper to <powerpc/cpu.h>.

OK by briggs@
2006-06-13 18:24:37 +00:00
mrg
77b9fb02b9 undef memset before calling it with a destination address of 0.
GCC4.1 complains about this when using the builtin, so force
this to call the real function normally.
2006-06-04 07:32:20 +00:00
freza
fbb6d5fc9e Remove duplicate definitions of mfdcr()/mtdcr() in favor of a single one
in cpu.h

OK Matt Thomas
2006-05-30 22:44:13 +00:00
shige
b920e23d24 Move cpu_configure to evbppc/*.c.
(Remove ibm4xxgpx_autoconf.c)
I'm sorry for my wrong thinking.
2006-05-15 15:56:54 +00:00
yamt
d73ce018b0 include kauth.h for kauth_cred_geteuid. 2006-05-15 09:26:18 +00:00
yamt
069692b8ed include kauth.h for kauth_cred_geteuid. 2006-05-15 09:21:21 +00:00
elad
8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
matt
0e504287d7 Fix a problem when an exec page is mapped, modified, and then unmapped.
Make sure to either clear the execness or sync the page to the icache.

This fixes gdb testsuite failures.  Thanks for nathanw for testing.
2006-05-13 04:04:45 +00:00
nathanw
a255fcef8d Fix a typo in a comment. 2006-05-12 16:01:05 +00:00
simonb
5b933f2a90 Unwrap not-too-long long. 2006-05-07 04:45:03 +00:00
thorpej
fb44a8574b Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
2006-05-05 18:04:41 +00:00
simonb
02119658ff Add a NetBSD RCS id. 2006-04-12 12:30:50 +00:00
cherry
dc0898b362 closes kern/32359 2006-04-01 15:44:59 +00:00
shige
f9232cd159 Move pci_intr_map and pci_conf_interrupt functions to MD codes.
Change Max PCI devices from 5 to 31.
2006-03-29 17:50:33 +00:00
thorpej
11c16d3717 Use opb_instance instead of dv->dv_unit when checking if we should set
the mac-addr property.
2006-03-28 17:22:15 +00:00
shige
205ee851c8 Make cpu_setmcontext() fix up the passed-in MSR value. 2006-03-26 16:15:57 +00:00
drochner
47fbb9d86b adapt to uvm_fault() interface cleanup: kill the useless 3rd argument 2006-03-15 18:12:02 +00:00
shige
61e6e07d5b IBM4xx on-chip GPIO controller applying MI GPIO framework. 2006-03-13 16:17:57 +00:00
shige
17629c725d IBM4xx on-chip GPIO controller apllying MI GPIO framework. 2006-03-13 15:31:11 +00:00
yamt
04ff17cc06 fix mistakes in yamt-uio_vmspace changes. 2006-03-12 22:44:27 +00:00
lukem
a1f606d3fd Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
2006-03-08 23:46:22 +00:00
thorpej
61dd49d3bc Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
2006-03-07 07:21:50 +00:00
thorpej
be8b235384 Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
he
53c5776a46 syscall_fancy is only defined if either KTRACE or SYSTRACE is set,
so enclose its use in the same set of conditionals.
2006-03-06 08:05:06 +00:00
rjs
15f20d6c5b Always define syscall_fancy. 2006-03-05 22:34:34 +00:00
christos
beea4fc3fa Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
2006-03-05 19:08:38 +00:00
christos
a4495f4cec implement PT_SYSCALL 2006-03-05 07:21:37 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
simonb
5034f87d7b Fix fallout from obviously untested device_is_a() rototill. 2006-02-28 01:16:59 +00:00
thorpej
132ce1f07f Use device_is_a() 2006-02-26 05:24:52 +00:00
thorpej
458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00
thorpej
b636d4910e Add an "instance" member to opb_attach_args and use it when fetching
the mac-address property from board_info.  port-powerpc/32862
2006-02-21 04:25:29 +00:00
thorpej
3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
thorpej
680d9eea68 - Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
  associates the MAC address property with the epe device instance.
2006-02-18 05:04:11 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
gdamore
8430838831 PCI_NETBSD_CONFIGURE should allocate (but not map) address space expansion
ROMS by default.   Full discussion at
http://mail-index.netbsd.org/tech-kern/2005/12/16/0023.html
Closes PR kern/32467
Reviewed by briggs@
2006-02-10 20:52:56 +00:00
dsl
498e318d85 This file only needs to #include sys/bswap.h 2006-01-31 07:51:41 +00:00
ross
3039e0bce8 Work around a PIBS bug: OF_write() doesn't get a returned count. 2006-01-22 22:53:56 +00:00
christos
3ffa241fcd Add a STRONG_ALIAS macro 2006-01-20 22:02:40 +00:00
hannken
3bb1c71f4a Fix a typo introduced in revision 1.8:
-     #define splraiseipl(x)  splraise(x)
    +     #define splraiseipl(x)  splraise(imask[x])

Approved by: YAMAMOTO Takashi <yamt@netbsd.org>
2005-12-31 14:07:32 +00:00
perry
2d542ba1f8 inline -> __inline 2005-12-28 19:09:29 +00:00
ross
0d8bcff6f5 Fix typo inside PPC_OEA64 2005-12-27 02:19:27 +00:00
perry
50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry
2d65de2479 bare asm -> __asm 2005-12-24 22:45:33 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
6bba73019a use VM_PAGE_TO_PHYS macro. 2005-12-08 22:41:44 +00:00
yamt
ba38016298 implement splraiseipl() for the following ports.
evbppc, evbmips, evbsh3, hp700, mac68k, vax, x68k.
2005-11-27 14:01:45 +00:00
yamt
bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
dbj
8000972bbe . Have dbsym explicitly suggest increasing SYMTAB_SPACE when
an overflow occurs.
   . Make this error a fatal build time error
   . Move the support for dbsym into the MI Makefile.kern.inc,
     conditional upon the SYMTAB_SPACE option being defined in
     the kernel config file.
2005-11-24 12:54:29 +00:00
nonaka
292989c8b6 In decr_intr(), update lasttb only when clock interrupt is not masked.
(sync with macppc/macppc/clock.c: rev.1.11 -> 1.12)
2005-11-23 13:00:51 +00:00
matt
9b978162a2 Add MPC5200 SVR definition 2005-11-15 18:26:49 +00:00
he
dffb25a969 Complete the renaming gpio -> ppcgpio for evbppc, to make room for
the MI gpio.  Internal static functions in gpio_opb.c are not
renamed here, but the softc type is renamed together with the attach
declaration data.
2005-10-16 16:35:44 +00:00
jmc
a64b99061e Rename gpio to ppcgpio to resolve naming conflicts w. gpio framework 2005-10-13 21:38:11 +00:00
manu
bc210edac8 Fix COMPAT_DARWIN build. This closes PR#31336 2005-10-03 17:11:25 +00:00
chs
708b1a54c3 remove unnecessary extern declaration. 2005-10-02 15:10:16 +00:00
chs
0b934711f4 avoid calling into the pool code while PSL_EE is off.
the pool code can do spl*()/splx(), and splx() requires PSL_EE to be on.
2005-09-27 08:03:11 +00:00
he
1d4573eec9 We need <compat/sys/signal.h> and <compat/sys/signalvar.h> here
for native_sigset13_to_sigset, sigset13_t, and sigvec.
The includes in sparc's machdep.c is conditional on COMPAT_13, as is
the use of native_sigset13_to_sigset.
2005-09-14 15:03:50 +00:00
kiyohara
db37c957e1 Support the 'PCMCIA adapter BOX' for OpenBlockS266. 2005-09-04 15:23:55 +00:00
drochner
44bf0a7ee2 s/locdesc_t/int/g 2005-08-26 13:19:34 +00:00