Commit Graph

51 Commits

Author SHA1 Message Date
briggs 370a7a67ca Convert evbarm to __HAVE_GENERIC_TODR. 2007-02-19 02:08:12 +00:00
wiz d6a98601a8 s/heirarchy/hierarchy/, from Zafer. 2006-11-24 21:20:05 +00:00
mrg 663096a642 remove 'inline' from the xxx_do_pending() function that is called from
external sources, and conflicts with it's prototype.
2006-05-17 05:15:26 +00:00
mrg d9911429b9 remove a shadow extern decl for ifpga_do_pending(). 2006-05-16 21:38:14 +00:00
thorpej 39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +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 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
drochner 44bf0a7ee2 s/locdesc_t/int/g 2005-08-26 13:19:34 +00:00
rearnsha 0d4235a6ac Fix shaddowed declaration. 2005-06-04 13:35:05 +00:00
christos 7cdea212c0 No 0x in front of %p... 2005-05-22 15:54:45 +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
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
rearnsha da975d6d89 Fix pasto error in comment. 2004-08-07 11:13:09 +00:00
rearnsha 5b0328df32 Add barriers to prevent scheduling of critical code outside of the
SPL-protected region.
2004-08-07 11:08:58 +00:00
kleink 0e5d242328 Update for new pci_devinfo(9) signature. 2004-04-24 15:49:00 +00:00
matt 1df05a73fe Fix GCC 3.3.1 nits. 2003-09-21 19:33:13 +00:00
rearnsha 81594136ec irqhandler.h and related baggage now obsolete. 2003-09-06 13:01:29 +00:00
rearnsha b548db6846 Obsolete. 2003-09-06 12:36:29 +00:00
rearnsha 256da36a1c Switch to using generic soft interrupts. 2003-09-06 11:31:20 +00:00
rearnsha fec013d595 Fix incorrect definition of IFPGA_SC_LBFCODE_BEN1 and missing
definition of IFPGA_SC_LBFCODE_BEN0.
Add definitions for unused interrupt bits and a suitable mask (preparation
for switch to generic soft-ints code).
2003-09-06 11:27:01 +00:00
rearnsha 333d22f36e Fix handling large values of delay when the timer might wrap. 2003-09-06 11:21:44 +00:00
he 5b3551df93 Initialize one more arm32_bus_dma_tag's _cookie to NULL. 2003-07-31 17:51:09 +00:00
lukem 08716eae82 __KERNEL_RCSID() 2003-07-15 00:24:37 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
thorpej dd9bc74460 Use PAGE_SIZE rather than NBPG. 2003-04-02 03:39:59 +00:00
thorpej 6c9c7f3b21 Garbage-collect prev_intr_depth; nothing uses it. 2003-01-02 23:54:39 +00:00
thorpej 1132348b98 Use aprint_normal() for cfprint routines. 2003-01-01 01:24:19 +00:00
bjh21 d599df9587 Continue the " - . - 8" purge. Specifically:
add	rd, pc, #foo - . - 8		->	adr	rd, foo
ldr	rd, [pc, #foo - . - 8]		->	ldr	rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
2002-10-14 22:32:50 +00:00
thorpej 70cc64f942 Make this compile with strict prototypes. 2002-10-06 17:13:58 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej bb34bc8caa When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
2002-09-27 02:16:28 +00:00
thorpej a7d44c2503 Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants.  The compiler will optimize out dead code because
of the constants.  Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
2002-08-17 20:46:26 +00:00
thorpej dce4476374 Overhaul how DMA ranges work in the ARM bus_dma implementation.
A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length.  In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
2002-07-31 17:34:23 +00:00
briggs f03fce66ce Fix odd typo from addition of pba_bridgetag. 2002-05-22 23:54:14 +00:00
thorpej 204183c0fa * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses.  For busses behind a bridge, it points to
  a persistent copy of the bridge's pcitag_t.  This can be very useful
  for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
  uses OFW device nodes to enumerate the bus.  When a PCI bus that is
  behind a bridge is attached, pci_attach_hook() allocates a new PCI
  chipset tag for the new bus and sets it's "curnode" to the OFW node
  of the bridge.  This is used as a starting point when enumerating
  that bus.  Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
2002-05-16 01:01:28 +00:00
thorpej f56b432a79 Use the bus_space_generic bus space ops. 2002-04-12 19:12:31 +00:00
thorpej 32a0860797 Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel.  What
  you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
  on which ARM architecture versions are configured (based on CPU_*
  options).  Also defines ARM_NARCH to determins how many architecture
  versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
  which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
  to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
2002-04-12 18:50:29 +00:00
thorpej 2bc996b0bc New interrupt framework for NetBSD/evbarm, and accompanying new
interrupt code for the IQ80310 board support package.

XXX The Integrator board support package still uses the old-style
arm32 interrupt code, so some compatibility hacks have been added
for it.  When the Integrator uses new-style interrupts, those hacks
can go away.
2002-01-30 03:59:39 +00:00
thorpej 1e0e569ced Remove the "fiqhandler" definitions. 2002-01-13 19:20:06 +00:00
thorpej e41179bfd0 Need <arm/cpufunc.h> for cache-related variables. 2001-11-30 19:43:20 +00:00
thorpej c5ecb8d8c5 Use the new arm_dcache_align variable to set the PCI device BHLC
register.
2001-11-29 02:26:50 +00:00
thorpej 636e9cd08b Add a "cacheline_size" argument to pci_configure_bus(). It is used
to set the cacheline size in the BHLC register.  This should be the
size of the largest D-cache line on a system.
2001-11-28 23:48:34 +00:00
thorpej 8cd82ab7b7 Move interrupt-related stuff out of the generic 32-bit ARM genassym.cf
and into platform-specific genassym.cf files.
2001-11-27 00:15:58 +00:00
thorpej 969599022a Use <arm/cpufunc.h>, not <machine/cpufunc.h>. 2001-11-23 19:36:48 +00:00
thorpej b1ec255377 Add a "firstbus" argument to pci_configure_bus(), indicating the
first bus number to use, rather than always assuming that we should
start at bus #0.
2001-11-09 19:29:12 +00:00
rearnsha 05885de5fc Garbage collect some early debug hacks that should not have been
committed in the first place and prevent linking.
2001-10-29 14:23:35 +00:00