Commit Graph

477 Commits

Author SHA1 Message Date
chris 4253f3bbfc Set LOOSE_PROTOTYPES to no for cats. This means cats now uses stricter prototype checking. 2002-01-31 09:53:33 +00:00
chris 3ead7271d5 Fix the type of irqmasks (any reason it's even been added as an extern when it's in irqhandler.h with the correct type and array size?) 2002-01-31 09:43:42 +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 5e0726b647 Set the CPU sleep routine to sa11x0_cpu_sleep() on SA-1100 and SA-1110
processors.
2002-01-30 00:37:18 +00:00
thorpej 50f7f1d785 Add prototype for sa11x0_cpu_sleep(). 2002-01-30 00:36:32 +00:00
thorpej 2c0cb97fa8 Add a sleep routine for the SA-11x0. 2002-01-30 00:25:07 +00:00
thorpej cb51977892 When initializing sf->sf_spl, simply always assume that 0 is
equivalent to spl0().
2002-01-29 23:02:48 +00:00
thorpej 558b6aece0 Move the generic ARM soft interrupt code into a generic place. 2002-01-29 22:54:14 +00:00
rearnsha 45b996e3b2 Fix copying and disclaimer (ARM != Causality). 2002-01-29 15:27:29 +00:00
bjh21 e4b1cbedfc Add revision->stepping maps for the SA-110, SA-1100 and SA-1110.
Those for the SA-1100 and SA-1110 are from Intel's documentation.
The mapping for the SA-110 is from various sources on the net, since Intel
don't seem to document it.

Also, change the layout of the maps to have four steppings per line,
so they aren't quite so unwieldy.
2002-01-27 14:43:47 +00:00
thorpej f59990cae7 * Default dcache_inv_range to xscale_cache_flushD_rng for XScale
cores.
* For i80200 Step-A0 and Step-A1, set dcache_inv_range to
  xscale_cache_purgeD_rng to work around a bug where a D$
  "invalidate by address" doesn't properly clear the dirty
  bits on the cache block (i80200 errata item #25).
2002-01-25 21:33:26 +00:00
thorpej 08342df793 Overhaul bus_dmamap_sync for the ARM:
* Track which process (XXX really, vmspace) owns the mapping.  When
  we sync the map, if the mapping doesn't belong to the kernel or to
  the current process (XXX really, vmspace), then no cache fobbing
  is necessary, since the cache is Wb-Inv'd on context switch (XXX need
  to revisit this when we support FCSE).
* Be smarter about which cache operation we do when sync'ing the map:
  - PREREAD -- Invalidate D$ (XXX right now, we actually do Wb-Inv)
  - PREWRITE -- Write-back D$ (note, we do NOT invalidate here)
  - PREREAD|PREWRITE -- Wb-Inv D$

More work is needed here.  In particular, a version for CPUs
with write-through caches should be provided, to eliminate
the write-back steps (which are noops on such CPUs, but skipping
two branches would be nice).
2002-01-25 20:57:41 +00:00
thorpej 2c23251a7a ANSI'ify function decls. 2002-01-25 19:37:49 +00:00
thorpej 4e990d9ccb Overhaul of the ARM cache code. This is mostly a simplification
pass.  Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

	icache_sync_all         Synchronize I-cache
	icache_sync_range       Synchronize I-cache range

	dcache_wbinv_all        Write-back and Invalidate D-cache
	dcache_wbinv_range      Write-back and Invalidate D-cache range
	dcache_inv_range        Invalidate D-cache range
	dcache_wb_range         Write-back D-cache range

	idcache_wbinv_all       Write-back and Invalidate D-cache,
				Invalidate I-cache
	idcache_wbinv_range     Write-back and Invalidate D-cache,
				Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives.  Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
2002-01-25 19:19:22 +00:00
thorpej 8ed8f67cf7 Make the software copy of INTCTL volatile. 2002-01-25 19:05:36 +00:00
thorpej c2004821b2 Use a table to look up stepping names. Add a generic stepping
table ("rev 0", "rev 1", etc.) and an i80200 stepping table that
has the stepping names that appear in the i80200 manuals/errata..
2002-01-24 20:14:19 +00:00
thorpej e05fbea5e8 Shave an instruction off the case where we want to do a CPWAIT and
then return.
2002-01-24 17:53:08 +00:00
thorpej d58e8e800b Update copyright years and author list. 2002-01-24 06:21:27 +00:00
thorpej 68a5455c8b Work around a bug in the XScale core's D-cache. The work-around is to
use 2 adjacent cache-size areas for global cache clean, alternating
between the two of them on each call.  Without this, D-cache blocks
aren't evicted properly, and no one seems to know why.
2002-01-24 06:18:12 +00:00
briggs 2341768d92 Two changes for XScale:
1) Add defparam XSCALE_CCLKCFG to define a parameter for the
	   CCLKCFG register.  Default it to '9' on the IQ80310.
	2) Add a sleep call to the xscale CPU function vector (replacing
	   the nullop) which should drop the CPU into "idle" mode when
	   cpu_switch finds nothing on the run queues.
2002-01-24 04:23:18 +00:00
thorpej bd098d4ca4 Fix a typo (thanks Allen). 2002-01-24 03:58:09 +00:00
thorpej 7c2247336b Clean up the i80312 PMU definitions. 2002-01-24 01:21:44 +00:00
thorpej e33cde5940 Add an IRQ vector to be shared by all i80200 applications. This
consults the interrupt source bits in the i80200 ICU and calls
a board-specific external IRQ dispatcher if an external IRQ is
pending.
2002-01-24 01:12:40 +00:00
thorpej 372342ce22 i80200: Call i80200_intr_init() to initialize the ICU, rather than
doing it ourselves.
2002-01-23 21:03:07 +00:00
thorpej d70b940ca2 Add generic code to manipulate the i80200 ICU. 2002-01-23 21:00:12 +00:00
thorpej 361cbb0a88 Make this usable directly by assembly code. 2002-01-23 20:58:29 +00:00
bjh21 8a3c27fbf7 Add support for the ARM-specific syscalls in ARMLinux. These are invoked
by SWI numbers above 0x9f0000, but we re-map them down to somewhere just
after the end of the usual syscall range, since NetBSD doesn't handle
sparse syscall arrays well.

The only syscall I've actually implemented in this range is cacheflush(),
which was previously being mapped to fork(), causing ... interesting results.
2002-01-23 15:52:58 +00:00
thorpej e594c94727 Some prototype cleanup. 2002-01-20 03:41:47 +00:00
thorpej ce74acf44c XXX Local prototype for syscall(). 2002-01-20 03:39:51 +00:00
chs b263a7eb4d add a new flag PMAP_CACHE_VIVT for the pmap to inform the MI code that
that the cache is virtually-indexed and virtually-tagged (such as on the ARM),
and use this flag in the UBC code to be more friendly to those caches.
2002-01-19 16:55:20 +00:00
thorpej 940aa6cbf5 Add cpwait's after TLB operations. 2002-01-17 23:56:01 +00:00
bjh21 6ad60873c2 More-or-less working signal handling for Linux processes on ARM. 2002-01-17 22:50:38 +00:00
thorpej e422b995b1 Cleanup a little, and teach db_write_text() about section mappings. 2002-01-17 20:47:00 +00:00
bjh21 0598bbd10f Separate out syscall() out into three parts:
swi_handler() does stuff that all SWIs will need, then calls
   curproc->p_emul->e_syscall.
  syscall() handles native NetBSD system calls.
  linux_syscall() handles Linux system calls.
2002-01-17 17:26:03 +00:00
thorpej 79543e3e0b * db_validate_address(): Use pmap_extract().
* db_read_bytes()/db_write_bytes(): Do comparisons against the
  (unsigned) size_t correctly.
2002-01-17 03:52:06 +00:00
thorpej 3609326b93 Teach pmap_extract() about section mappings. 2002-01-17 03:06:21 +00:00
bjh21 b5c6c1df63 Simplify SWI entry: syscall() now extracts the SWI comment field itself. 2002-01-14 23:21:06 +00:00
bjh21 6462506466 Crude first cut at ARMLinux binary compatibility. Successfully runs
"/emul/linux/bin/echo hello, world", dynamically linked.
2002-01-14 23:14:32 +00:00
bjh21 ef2920350e Use symbolic names for SWI number blocks (from <arm/swi.h>). 2002-01-13 15:04:09 +00:00
bjh21 d46952877d Add an <arm/swi.h>, containing symbolic names for SWI ranges. 2002-01-13 15:03:06 +00:00
bjh21 9379550701 Make this actually compile on acorn32. 2002-01-13 14:39:13 +00:00
bjh21 9fe68c4f64 Combined syscall handler for all ARM ports. This is basically the arm32
version, made readable and compatible with arm26.  In addition, this adds
support for NetBSD/arm's newly allocated SWI range.
2002-01-12 20:02:13 +00:00
chris c3abf9a50c Make GENERIC cats kernel boot again. By allocating a 2nd second level page table for the kernel and stack space we can now have to 8MB of kernel and stacks (if the kernel ever gets really bloated might need to add a 3rd!)
Also update the funcs in arm32_machdep.c that create the entries so that on cats they expect the 2 pagetables to be contiguous, note this means that for now cats is special cased in lots of funcs.  I'll tidy this up to something a bit more sane soon, to avoid the multitude of #ifndef cats that I had to sprinkle in.
2002-01-12 13:37:55 +00:00
rjs adde6b76ba Interrupt related defines for SA11x0. 2002-01-09 15:54:19 +00:00
bjh21 33096a0e18 Add a couple of ARM7500 registers I missed last time, and correct a couple
of others to match the names in the data sheet.
2002-01-08 21:00:12 +00:00
rjs 1d49b1abec Establish interrupt handlers before enabling the clocks. 2002-01-08 11:40:56 +00:00
rjs 4bb5c4fa7c Add extra SA1111 register definitions. 2002-01-08 11:36:52 +00:00
rjs cd6d465f6b Add reset controller register definitions. 2002-01-08 11:29:51 +00:00
rjs 1b4e5cf968 Add check for microtime() being called before clock is initialized. 2002-01-08 11:21:02 +00:00
chris 8dd3ca5994 Finish up the changes to get LOOSE_PROTOTYPES working for cats.
Note that this leaves a few inconsistencies (no more than we already had though) eg initarm is now prototyped in arm32/machdep.h, however only cats currently makes use of that header.
2002-01-07 22:58:07 +00:00