Commit Graph

782 Commits

Author SHA1 Message Date
bjh21
b6228a7d06 New, improved version of copyin(), copyout(), and kcopy() by Allen Briggs.
This version works on both 26-bit and 32-bit machines.  For large copies,
it's up to three times as fast as the old arm32 version and five times as
fast as the old arm26 version.  For small copies it seems to be even faster
(getrusage() is apparently over ten times faster on an ARM610).

Hooray for Allen!
2002-08-11 21:19:12 +00:00
thorpej
76730bd0cc Tidy up pmap_clean_page() a little, and reenable some code that was
disabled previously: Skip cleaning mappings which are read-only, because
the pmap (now) does clean pages on a r/w -> r/o transition.
2002-08-10 00:48:35 +00:00
thorpej
006a578742 Clean up some warts in pmap_protect(). 2002-08-10 00:11:51 +00:00
thorpej
15a5e8f238 cpu_fork(): If PMCs are not enabled in the parent, clear the machine-
dependent PMC state in the child.
2002-08-09 23:44:17 +00:00
thorpej
19227e620e Add a PVF_EXEC -- we don't use it yet, though. 2002-08-09 23:08:39 +00:00
thorpej
6072e74ac1 * Drain write buffer after cleaning the mini-D$.
* Fix a typo in a comment.
2002-08-09 21:51:52 +00:00
thorpej
6ce0a206cc Add an XSCALE_CACHE_READ_WRITE_ALLOCATE option for people who
want to play fast-and-loose.
2002-08-09 21:49:09 +00:00
thorpej
884bc64586 Add some code, conditional on PMAP_ALIAS_DEBUG, that can be used to
hunt for virtual aliases between managed (pmap_enter) and non-managed
(pmap_kenter_pa) mappings.
2002-08-09 18:22:59 +00:00
thorpej
c979315325 Reduce stalls on StrongARM and XScale by waiting one insn before using
the result of a load.
2002-08-09 06:18:24 +00:00
thorpej
afe3274eed Use ldrbt/strbt. Some other random cleanup. 2002-08-09 06:03:02 +00:00
thorpej
0291ab61ec * PMC_TYPE_I80200 -> PMC_CLASS_I80200 to reflect the terminology
used in pmc(3).
* Some minor namespace cleanup.
2002-08-09 05:27:09 +00:00
thorpej
410785d6f0 Use ldrt/strt. 2002-08-09 04:13:20 +00:00
briggs
5da3a2950b When configuring a counter, do not assume that it's not been configured in
this process (mask off the register field before setting it).
2002-08-08 18:23:46 +00:00
thorpej
f91adb85ce * XSCALE_PMC_TYPE_I80200 -> PMC_TYPE_I80200
* XSCALE_PMC_TYPE_CCNT -> PMC_TYPE_I80200_CCNT
* XSCALE_PMC_TYPE_PMCx -> PMC_TYPE_I80200_PMCx

Per discussion with Allen Briggs.
2002-08-07 21:11:35 +00:00
thorpej
fdcc8560e4 Speed up bcopy_page() on the XScale slightly by using the "pld"
insn (prefetch) to look-ahead to the next chunk while we copy the
current chunk.

This could probably use a bit more tuning.
2002-08-07 16:21:29 +00:00
briggs
0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
itojun
e5b5171ab5 integer overflow. from silvio@qualys.com 2002-08-06 22:46:11 +00:00
thorpej
26bc8b27f4 - pmap_remove(): unmap the PTEs *after* we have finished with the
page tables.
- pmap_enter(): if making a mapping for the same PA rw->ro, write-back
  the cache before doing so.
- pmap_clearbit(): if revoking REF on a page, make sure to wbinv the
  cache if the page has write permission, else inv the cache if the page's
  PTE is valid (XXX we actually wbinv in this case, as well, due to lack
  of idcache_inv_range()).  Only flush the TLB if the PTE changed.
2002-08-06 21:43:51 +00:00
thorpej
0886c8cc0f Rearrange the exit path so that we don't do a idcache_wbinv_all *twice*
when a process exits.
2002-08-06 19:20:29 +00:00
thorpej
62d83d05b1 * Pass proc0 to switch_exit(), to make this a little more like the
nathanw_sa branch.
* In switch_exit(), set the outgoing-proc register to NULL (rather than
  proc0) so that we actually use the "exiting process" optimization in
  cpu_switch().
2002-08-06 17:44:35 +00:00
thorpej
0aa15bdf33 Add support for "xor5", "xor6", "xor7", and "xor8". 2002-08-04 02:26:18 +00:00
thorpej
3b50c1710c * Define the 8-input, 16-input, and 32-input descriptors.
* Adjust descriptor sync'ing to work with the additional descriptor
  formats.
2002-08-03 21:58:55 +00:00
thorpej
a39c3378b6 Restructure the iopaau_function slightly to provide greater
flexibility when using different descriptor formats.
2002-08-03 21:31:16 +00:00
thorpej
c070073d8e Add support for xor2, xor3, and xor4. Fix inverted direction
indications in some bus_dma operations.
2002-08-02 06:52:16 +00:00
thorpej
58983a92ba Let the "zero" and "fill8" functions share a bunch of code. 2002-08-02 02:08:11 +00:00
thorpej
f7328ddbe7 Add dmoverio. 2002-08-02 00:50:25 +00:00
thorpej
321a514c93 Grr, RCS ID tag typo. 2002-08-02 00:36:38 +00:00
thorpej
036da55e8f Add support for the Intel i80321 I/O Processor's Application Accelerator
Unit.  The AAU provides block fill, block copy, XOR, and XOR-parity-check
operations.  We currently provide dmover(9) functions for "zero", "fill8",
and "copy".

Much of this code can be shared with the i80312 Companion I/O AAU, and
will be when support for the older chip is implemented.
2002-08-02 00:35:47 +00:00
thorpej
d038c91c0c Delete all the AAU register definitions; they are moved to a separate
file in a future commit.
2002-08-02 00:33:29 +00:00
thorpej
e3e6d7dfa5 Move the DMA tag initialization functions into i80312.c. 2002-08-01 19:55:02 +00:00
thorpej
f546baba66 Move the DMA tag initialization functions into i80321.c. 2002-08-01 19:40:07 +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
thorpej
79af00bddb Move the calls to uvm_page_physload() out of pmap_bootstrap() and
into platform-specific initialization code, giving platform-specific
code control over which free list a given chunk of memory gets put
onto.

Changes are essentially mechanical.  Test compiled for all ARM
platforms, test booted on Intel IQ80321 and Shark.

Discussed some time ago on port-arm.
2002-07-31 00:20:51 +00:00
thorpej
d3aa5664b7 Move the uvm_setpagesize() call to platform-dependent code in preparation
for other changes to pmap_bootstrap().
2002-07-30 16:16:38 +00:00
thorpej
3dcad9ac9e Don't use pmap_kenter_pa() in pmap_map(); doing so causes an assertion
failure in pmap_kenter_pa().
2002-07-30 16:07:23 +00:00
thorpej
5fed6739d9 Use more descriptive interrupt names. 2002-07-30 04:45:41 +00:00
thorpej
d8eb148780 Clean up some comments. 2002-07-29 22:00:00 +00:00
thorpej
2bbd3be11a Add support for the i80321 watchdog timer. 2002-07-29 18:40:04 +00:00
thorpej
3ab4598cc0 Add sysmon at cdev 101. 2002-07-29 18:26:58 +00:00
thorpej
2367c7fff8 Add support for attaching IOP built-in sub-devices (aau, dma, ssp,
watchdog, etc.)
2002-07-29 17:37:14 +00:00
thorpej
c92ad565ad * Remove some AAU definitions -- they will be defined elsewhere in
a future commit.
* Fix a typo in the watchdog enable names.
* Add SSP (synchronous serial port, for SPI, Microwire, etc.) definitions.
2002-07-29 17:28:06 +00:00
thorpej
7b652cb939 Change the way that DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a pointer to the
original buffer/buftype used to load the DMA map, and use that.  This
lets us shrink the bus_dma_segment_t down from 12 bytes to 8, and the
cache flushing is also more efficient.

Tested on an i80321 -- changes to others are mechanical.
2002-07-28 17:54:05 +00:00
thorpej
efe71a8aac Add support for DMA to/from the on-chip devices of the i80321 (no
PCI window translation).

XXX This would be better done by overhauling the shared ARM bus_dma code.
2002-07-25 15:00:48 +00:00
briggs
c13ee269dd Handle i80200 step D0 and i80321 step B0 2002-07-22 18:17:42 +00:00
ichiro
6349df15da cdev_tty_init(NIXPCOM,ixpcom) move to end of cdevsw array 2002-07-22 01:12:24 +00:00
ichiro
517449c38c some bug fix and cosmetic changes 2002-07-21 14:19:43 +00:00
ichiro
2556a42f35 attach/match separated from ixp12x0_com
Some bug of com driver have been improved.
2002-07-20 03:09:03 +00:00
simonb
895a23e8ae Add an "#ifndef NIXPCOM" check so that this builds on non-evbarm. 2002-07-20 00:26:51 +00:00
ichiro
0fa83706ca make compile "IPAQ" 2002-07-19 19:29:28 +00:00
ichiro
ca24dad921 make compile 2002-07-19 19:07:33 +00:00