Commit Graph

718 Commits

Author SHA1 Message Date
skrll f9d21f3995 Use shell arithmetic as much as possible and reduce the number of times
that awk is used to one.

No functional change.
2002-02-20 21:54:08 +00:00
thorpej 425011f621 map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c 2002-02-20 20:41:15 +00:00
thorpej c44b9117f0 Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
2002-02-20 02:32:56 +00:00
thorpej 9c31f51c34 Rename map_section() to pmap_map_section(), move it to pmap.c, and give it
an extra argument (prot - specifies protection of the mapping).
2002-02-20 00:10:15 +00:00
wiz 37e458fa45 strategy should have an 'r'. Inspired by similar change in OpenBSD. 2002-02-19 17:09:40 +00:00
simonb 2d8577fb83 Clean up some rampant code duplication wrt ieee number handling:
- Add alignment-safe double and float unions.
 - Use the above for the __infinity and __nan constants on all
   architectures that use the standard ieee754 representation of
   those constants.
 - Add a single copy of various ieee754 math functions (frexp, isinf,
   isnan, ldexp and modf) that had numerous duplicates among the
   arch-specific directories.
 - Use the above functions on all architectures where the generic C
   versions where used.  Architectures that had local assembly
   routines are untouched (for those functions only).
2002-02-19 13:08:12 +00:00
bjh21 ff94cc2ad5 Add prototype for getkey_polled(). 2002-02-18 19:05:35 +00:00
bjh21 d4d3aa6468 Add internal prototype for cmd_mouse().
Also __RCSID() while I'm here.
2002-02-18 18:58:47 +00:00
bjh21 eb821c3860 Add a prototype for qms_console_freeze(). 2002-02-18 18:43:55 +00:00
bjh21 1e6835687e Rename prototype from sysbeep_vidc() to sysbeep() to match definition.
Pull in beepvar.h and vidcaudiovar.h for beep_generate() and
vidcaudio_beep_generate() prototypes.
__RCSID().
2002-02-18 16:23:54 +00:00
bjh21 2712a10c7c Add a prototype for vidcvideo_config_wscons(). 2002-02-18 14:30:20 +00:00
bjh21 761157905a Add prototypes to all declarations of function pointers.
Include <arch/arm/iomd/vidcaudiovar.h> for vidcaudio_beep_generate() prototype.
Add in-core RCSID.
2002-02-18 12:55:47 +00:00
bjh21 a06b71e864 Add a vidcaudiovar.h to contain a prototype for vidcaudio_beep_generate(). 2002-02-18 12:52:09 +00:00
bjh21 2aa99b4f12 Include <arch/arm/iomd/beepvar.h> for beep_generate() prototype.
Include <machine/conf.h> for cdevsw function prototypes.
Correct argument types of beepioctl().
Add in-core RCSID.
2002-02-18 12:36:27 +00:00
bjh21 668fc0d2b7 Add beepvar.h, to hold a prototype for beep_generate(). 2002-02-18 12:34:11 +00:00
bjh21 c1f8e3aa21 Comment out vidcvideo_setbase() (it's unused).
Remove vidcvideo_mmap() (it's redundant).
Add in-core RCSID.
2002-02-18 12:23:24 +00:00
bjh21 1a140d2090 Add prototypes for clockhandler() and statclockhandler(), and adjust their
argument types to match other interrupt handlers.
Also minor KNF (add in-core RCSID).
2002-02-18 12:18:26 +00:00
bjh21 40933bf05e Add prototype for yeartoday(). 2002-02-18 12:03:38 +00:00
bjh21 57a6aecd77 Include <machine/conf.h> for cdevsw function prototypes.
Add internal prototypes for hexdectodec(), dectohexdec() and twodigits().
Correct signature of rtcioctl().
2002-02-18 11:59:16 +00:00
bjh21 b5c13de9bf Pull in <machine/conf.h> to get prototypes for cdevsw functions, and correct
the signature of iicioctl() appropriately.
2002-02-18 11:51:57 +00:00
bjh21 216b4f1c81 Add prototypes for dma_reset(), dma_setup(), dma_isactive(), dma_isintr() and
dma_intr().
2002-02-18 11:41:18 +00:00
bjh21 dbc5effbc8 Change signature of dma_intr() to match other interrupt handlers. 2002-02-18 11:40:42 +00:00
bjh21 ca677d0d06 Add a prototype for linux_syscall(). It should be in a header file, but
other files that refer to it don't know its argument types anyway.
2002-02-17 23:37:18 +00:00
bjh21 e6e848ef6d Our assembler handles FPA instructions fine, so don't use .word for them. 2002-02-17 20:41:02 +00:00
bjh21 cb7a3d0674 ANSIfy, and othe KNF cleanup. 2002-02-17 19:53:44 +00:00
bjh21 561984015b Undo part of rev 1.8: SWP intructions really do both read and write
the referenced address.
2002-02-14 11:59:26 +00:00
chs b744097a5f allow writing to write-only mappings. fixes PR 3493. 2002-02-14 07:08:02 +00:00
briggs b72d845476 Actually set the i80312_softc global. 2002-02-14 02:38:22 +00:00
rjs 9134bf2610 Add Cotulla CPU IDs. 2002-02-14 01:37:20 +00:00
thorpej cd98cbf7fb * For platforms which are already ELF, remove the definition of
MACHINE_ARCH since <arm/param.h> already sets it correctly to "arm".
* For platforms which are not yet ELF, defined MACHINE_ARCH to "arm32"
  if __ELF__ is not defined by the C preprocessor.
* In <arm/param.h>, clarify the rules about when MACHINE and
  MACHINE_ARCH are defined, and to what.  Also, for ELF platforms,
  int the non-_KERNEL case, force both MACHINE and MACHINE_ARCH to "arm",
  rather than allowing platform-specifc code to define either.
2002-02-12 06:58:18 +00:00
reinoud a74d22be50 Add some extra comments for the `booted_kernel' variable. 2002-02-10 13:20:26 +00:00
chris a73dabb4b1 Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
2002-02-10 12:26:00 +00:00
reinoud 8843d04234 Please only return errno values !!! ... also doing a bit of KNF'ing 2002-02-10 00:53:28 +00:00
chris 2ba81d8c9c Update elf2aout to cope with infile and outfile being the same.
Make the cats a.out kernel be called netbsd.  This means that make install installs the correct kernel
2002-02-09 11:53:58 +00:00
thorpej d17cc4f043 * Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
  renaming to arch/shark.
2002-02-06 21:30:25 +00:00
thorpej 5113cbfb17 A slightly cleaned up version of chris/nick's elf2aout.sh for ARM
platforms.
2002-02-06 19:54:47 +00:00
thorpej da13cb2fb5 Back out all the vm_page_md changes. They are causing some
mysterious problems (a similar change to the i386 pmap causes
mysterious problems there, as well), and the issue needs to
be investigated more.
2002-02-06 17:41:42 +00:00
thorpej 4611193917 Efficiency tweaks, some made possible by vm_page_md. 2002-02-06 17:32:35 +00:00
thorpej 58eebd58b3 Use vm_page_md rather than pmap_physseg. Saves lots of cycles in
common operations.
2002-02-05 21:14:36 +00:00
thorpej 9485327397 Allow platforms to use an extra level of indirection for FIQs,
enabled by definining __ARM_FIQ_INDIRECT in <machine/types.h>.
This is needed for OpenFirmware systems (like the Shark), where
the OFW vector page is used, and kernel entries merely patched
into it.
2002-02-05 18:26:07 +00:00
reinoud fe0ecbaede At last enable the real time clock again on acorn32 !! thanks a lot to Mike
Pumford for the patches.
2002-02-05 14:36:35 +00:00
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
bjh21 2b44bd85c5 On arm26, vectors.S needs to be at the start of the kernel text, so that it's
on a page boundary and can be mapped straight into zero page.  This means it
has to be in MD_SFILES on arm26, and not in SFILES.

This probably leaves kernel_text in the wrong place, but it at least leaves the system bootable.
2002-01-07 21:15:50 +00:00
chris e3a3a9f56f Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set. 2002-01-05 22:41:46 +00:00
chris 826b7655cf include <arm/conf.h> for prototypes.
Correct args to mmopen and mmclose.
Add RCSID line.
2002-01-05 17:02:22 +00:00
chris b51b9e9e63 Update with radio, cir and irframe. also add block device for ld. Update other tables in file as appropriate. 2002-01-05 00:51:30 +00:00
chris 9b812a6774 Update mem device to bring it into line with a change in version 1.32 of i386/mem.c. Appears that we may move uio twice.
Original i386 log message:
Optimize the case of writing to /dev/zero, and clean up the
surrounding code a bit.  Partly suggested by gwr.

I think this needs to be applied to arm26 as well.
2002-01-05 00:46:33 +00:00
briggs e984bd475c Initialize pba_intrswiz and pba_intrtag before configuring PCI bus. 2002-01-04 22:39:47 +00:00
skrll e25a471c87 Fix typo in comment. 2002-01-01 16:24:33 +00:00
thorpej d2453f69b1 Remove the call to abort(). We don't pull in a prototype for it,
and there's no sane way to do so.
2002-01-01 01:58:01 +00:00
bjh21 00bd2cbdac Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
2001-12-21 22:56:16 +00:00
thorpej a6a5d9fa2b Use the correct version of va_arg() for _STANDALONE. 2001-12-20 20:29:09 +00:00
bjh21 a938f3a7ee Remove some outdated comments: arm26 kernels use APCS-32 now, which
means they don't do silly things like restoring IRQ/FIQ disable bits
on function return.
2001-12-20 16:12:10 +00:00
thorpej 014157862c * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
  between arm26 and arm32.
2001-12-20 01:20:21 +00:00
thorpej 631447bb4a Change some #if 0 to #ifdef VERBOSE_INIT_ARM. 2001-12-18 02:52:00 +00:00
bjh21 f2ebadcc6f Ensure that vidc.h gets installed somewhere -- Xarm32vidc needs it to compile. 2001-12-17 15:07:37 +00:00
bjh21 7bc474a92b mod() was unused. g/c it. New code should use abs() anyway. 2001-12-15 22:41:44 +00:00
bjh21 eefdf030c9 Simplify the pixel-clock-rate-setting code, so it always works out the
parameters from first principles rather than using a static table for some
rates.  This makes it work correctly on ARM7500, for which the table was
bogus (ARM7500 has a different refclk from VIDC20).
2001-12-15 22:21:46 +00:00
chris 80e667c6ab Add clockctl device.
Note that someone needs to tidy this up, we've got 92 block devices, which just ain't true.  Also appears we're actually missing some, eg the ld block device.
2001-12-11 00:34:50 +00:00
thorpej 51535d4bf5 Add support for dumping ELF-cormat core files. 2001-12-09 23:05:56 +00:00
atatat b45c51b1fc Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
2001-12-09 05:00:40 +00:00
chris 3831bfec98 Improve comment on the clockswitching asm code, it doesn't use r0 at all, it just needs it to make valid asm. 2001-12-08 21:30:04 +00:00
chris ce689bde4d Fix the asm macros
The tmpx registers are now outputs, this makes them all unique.
Add the fact that cc is changed by the asm (not believed to be used but rather be correct)
Correctly specify w as an input and output register, I think this was hiding the bug below!
Allow sum to be in a different input and output register.

Correct bug in psuedo header handling for in4_cksum.  Seems that the new macros turned up a latent bug in the psuedo header handling, the code was moving a pointer forward 16 bytes twice, not found before as the ADD16 macro wasn't 100% accurate, as it didn't output w, even though it modified it.
2001-12-08 21:18:50 +00:00
thorpej 72dee19a8c Reset the i80200 ICU and PMU to a pristine state very early. 2001-12-01 23:06:45 +00:00
bjh21 e4dac015cd Don't define get_cachetype() unless it's going to be used. 2001-12-01 14:21:18 +00:00
thorpej 3fd0a58e9d On the i80200, disable ECC in the Bus Controller Unit early on; we
don't really have code to deal with ECC errors yet.
2001-12-01 06:33:40 +00:00
thorpej 5936a89bf5 Add register definitions for the i80200 Interrupt Controller Unit,
Bus Controller Unit, and Performance Monitoring Unit.
2001-12-01 05:46:19 +00:00
thorpej 2b08dcc43b Clarify a comment to state that it is intentional that we attach
only the Secondary PCI bus (it's the only bus which can have a
device space hidden from any PCI host on the Primary bus).

Also, use the bus number from the PPB businfo register seecondary bus
field rather than hard-coding "1".
2001-11-30 19:29:44 +00:00
thorpej e90eccc52c Clarify a comment. 2001-11-30 19:26:03 +00:00
thorpej a2c8fc94fe Provide a way for platforms to move away from the old RiscPC-centric
interrupt code.  Garbage-collect some unused stuff.
2001-11-29 17:14:02 +00:00
thorpej a93f7ef419 Provide a hook for platform-specific interrupt code to specify
the "spl" cookie in the switch frame.
2001-11-29 17:12:22 +00:00
thorpej b0f775a467 Remove some overly-paranoid debug code that grovels too much
platform-specific internals.
2001-11-29 17:10:31 +00:00
thorpej 8ae5055ed9 Add routines for accessing the general purpose I/O facility of
the i80312 Companion I/O chip.
2001-11-29 08:27:11 +00:00
thorpej 574dba96b1 Update copyright. 2001-11-29 08:26:18 +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 959181a8b2 Fetch cache info from the Cache Type register on ARM7TDMI and "greater"
processors.  Report this when the processor is attached.
2001-11-29 02:24:58 +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 85a1db0fda Disable MRL, MRM, and MWI for now. 2001-11-28 22:39:09 +00:00
thorpej bd3e75a9df Oops, make sure to add in the physical base of the PCI memory
window when mapping PCI mem space.  (Whee, I can take out my
local hack, now).
2001-11-28 21:08:47 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
thorpej 379948c31f - Garbage-collect some unused cruft.
- When processing ASTs, restore interrupts *after* clearing astpending.
2001-11-28 01:06:19 +00:00
thorpej b9caa4cbc7 Don't grovel interrupt-related info here; if a platform wants to
do that, let it do that in a way it can control.
2001-11-28 00:19:53 +00:00
thorpej a2fa0b1029 Add prototypes for new XScale write-through cache routines. 2001-11-28 00:18:46 +00:00
thorpej 8e96318c12 Don't define interrupt handler-related offsets here. 2001-11-28 00:18:13 +00:00
thorpej 28466919a2 Use <machine/intr.h> rather than <machine/irqhandler.h> 2001-11-27 01:03:52 +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 ed112809c9 Allow port-specific Makefile fragments to specify a list of additional
genassym.cf fragments, if desired.
2001-11-26 23:44:58 +00:00
thorpej 2d89f9075b Move interrupt-related stuff out of stubs.c into intr.c. 2001-11-26 23:19:04 +00:00
thorpej bb706190b3 Add code to run the XScale cache in write-though mode, and do so
for now...
2001-11-26 22:26:44 +00:00
thorpej 0ca43a5fde Use <arm/arm32/psl.h>, not <machine/psl.h>. 2001-11-26 20:51:57 +00:00
thorpej c8c624e4aa Don't include <machine/psl.h> directly. 2001-11-26 20:49:04 +00:00
thorpej 534b950d29 Move the interrupt-related file declarations into port-specific
config descriptions so that each port choose whether or not to
use it.
2001-11-26 20:33:43 +00:00
thorpej 8ec81cf263 Sprinkle CPWAIT around to enforce some barriers. Also deal with some
pre-B-step errata: must clean-dcache-line to an address before
invalidate-dcache-line to that address, or the dirty bits will not
get cleanred in the dcache array for that line.
2001-11-26 18:09:08 +00:00
thorpej 3b97bd4996 Remove dummy includes. 2001-11-26 01:03:58 +00:00
thorpej da03707c2f Moved to <sys/disklabel_acorn.h> 2001-11-26 01:03:23 +00:00
thorpej e4b45721eb Remove Shark-specific header file. 2001-11-26 01:03:00 +00:00
thorpej dc19fe137e Don't install includes which userland doesn't need. 2001-11-26 01:02:28 +00:00
thorpej 013b705fdc G/c the unused (and #if 0'd) bits of cpu_disklabel. Fetch disklabel_acorn.h
from the correct place.
2001-11-25 19:02:03 +00:00
thorpej 2b74082b7b End the "new ARM includes strategy" experiment. The new strategy
broke too many assumptions makde by other parts of the source tree,
and the strategy and how it was supposed to work was never discussed
on tech-userlevel, nor was it applied consistently (to all ARM ports
and to other ports which have common MACHINE_ARCH code, such as MIPS,
m68k, powerpc).

Verified to complete a full "make build" on cats, dnard, evbarm,
and netwinder.
2001-11-25 15:55:53 +00:00
thorpej c5269c1608 Make the ARM, Ltd. floating point emulator work w/ ELF. 2001-11-24 03:39:17 +00:00
thorpej 87fe867c21 Move the ARM, Ltd. floating point emulator to arch/arm. 2001-11-24 01:26:23 +00:00
thorpej fc019be5fd Use <arm/undefined.h> instead of <machine/undefined.h>. 2001-11-23 21:18:29 +00:00
thorpej 0c57d87232 Use <arm/cpufunc.h>, not <machine/cpufunc.h>. 2001-11-23 19:21:47 +00:00
thorpej d60ef922be Disable the BTB by default on the XScale again; there's some early
stepping errata to deal with before we can safely do this.
2001-11-23 19:17:04 +00:00
thorpej 5101f01dff Move even more constants into the shared 32-bit vmparam.h header.
Cleanup elsewhere will have to be done before we can sanitize this
header any further.
2001-11-23 18:16:10 +00:00
thorpej 15c76e3c84 - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
  implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
  that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
  than PT_CACHEABLE, since the latter expands to a variable these days).
2001-11-23 17:39:03 +00:00
thorpej fec02f1259 No need to pull in <machine/pte.h> directly. 2001-11-23 17:23:40 +00:00
thorpej 299362f0ff Pull in assym.h for __PROG32 (needed for IRQenable/IRQdisable macros,
which should probably be pulled out of cpu.h anyway...)
2001-11-23 16:53:07 +00:00
thorpej 926df47ec4 Provide __PROG32 to assembly code. 2001-11-23 16:50:48 +00:00
thorpej b393d0d3f7 Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
2001-11-22 18:34:30 +00:00
thorpej 88bba2e5a4 Add cpu_cpwait() calls after TLB updates that are not expected to
be followed up by a pmap_update().
2001-11-22 18:24:43 +00:00
thorpej 67fd41ddbf Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>.  Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate.  Change all references to PROG26
and PROG32 to __PROG26 and __PROG32.  Eliminate the opt_progmode.h
header file.
2001-11-22 17:59:57 +00:00
lukem 03aef4723c cleanup:
options SPACE TAB
	makeoptions TAB
	psuedo-device TAB
	remove trailing whitespace
	replace multiple spaces -> tabs
	options "FOO" -> options FOO
	options "FOO=bar" -> options FOO=bar
	options "FOO=\"bar\"" -> options FOO="\"bar\""
2001-11-20 12:56:17 +00:00
lukem 99bccc3cab - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
	KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
	DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for  options KGDB_DEVNAME="\"com\""
- use correct quotes for  options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
2001-11-20 08:43:19 +00:00
chris 04d6054972 Correct comment to avoid confusion, it really means 32 bits not 32 bites. 2001-11-20 00:22:33 +00:00
chris 165b023373 Give the idle loop a non-profiled entry, means it appears in profile info correctly (rather than all it's time being under remrunqueue)
switch_exit only needs to take 1 parameter, it loads the value of proc0 into R1 itself
Fixup some comments to reflect the real state of things.
Tweak a couple of bits of asm to avoid a load delay.
remove excess code for setting curpcb and curproc.
2001-11-19 20:38:58 +00:00
thorpej 2d7fd0a8b8 Implement pmap_update(). Currently it just calls cpu_cpwait(),
which ensures that TLB/cache operations have completed.
2001-11-19 18:41:32 +00:00
thorpej 887bcc078e Add a "cpwait" cpufunc, currently a nullop on all but XScale.
"cpwait" ensures that all coprocessor operations have completed
before returning.
2001-11-19 18:40:15 +00:00
bjh21 6b12ec55b2 Add prototypes for undefinedinstruction() and resethandler(). 2001-11-16 13:12:06 +00:00
thorpej 0b6370bfee Implement __cpu_simple_lock*() primitives using the SWP insn. Note
this insn is available only on ARM arch v3 and later (and 2a).  We
don't expect to be using these ops in the kernel on processors too
old to have SWP, and for userland uses (in e.g. a pthread library),
the kernel will simply have to trap and emulate the insn (it needs
to be "atomic", so a kernel trap of some sort will be necessary on
such platforms anyway).
2001-11-15 19:22:32 +00:00
thorpej be13b85887 * Give the XScale its own cpu_control() entry point; we have to flush
the Branch Target Buffer of the BPRD bit changes.
* Enable Branch Prediction on the XScale by default.
* Don't invalidate the Branch Target Buffer explicitly. the i80200
  manual (section 5.1, Branch Target Buffer Operation) notes that
  manual software management of the BTB is unnecessary; it is flushed
  implicitly when:
     * processor resets
     * FCSE process ID is written
     * I-cache is invalidated
2001-11-14 01:00:05 +00:00
thorpej 91f49d269d Eliminate some duplicated code here (similar to XScale code):
* sa110_cache_purgeD() is the same as sa110_cache_cleanD() on the
  SA-1 -- make it an alias.
* sa110_cache_syncI() and sa110_cache_purgeID() are identical to
  sa110_cache_cleanD() on the SA-1, with the exception that the
  I-cache must also be flushed.  Save code duplication by moving
  the I-cache flush before the D-cache clean and letting it fall
  through.
2001-11-14 00:08:05 +00:00
chris 8298c55eab Correct comments for ffs algoritm (it isn't using register r0) 2001-11-11 22:07:41 +00:00
thorpej b75edaf367 Some fixes/cleanup to the XScale cache clean code:
* Define a CPWAIT macro as described in the i80200 manual and use it,
  rather than replicating the code in a few places.
* The i80200 manual notes that the line-allocate operation used to
  do global D$ clean does not actually perform a load/fill request
  from external memory, and thus does not actually place valid data
  in the cache lines allocated.  Require that machine-dependent code
  allocate an appropriately-sized chunk of unmapped VA space for the
  global clean operation in order to avoid unpredictable results.
* The i80200 manual notes that the VA range for the Mini-Data global
  clean (which *must* be mapped to physical memory) must be reserved
  exclusively for cleaning the Mini-Data cache.  Require that machine-
  dependent code allocate an appropriately-sized chunk of memory for
  this purpose.
2001-11-11 17:18:27 +00:00
thorpej c653a0ee51 Even though the ARM architecture defines large, standard, and small
pages, we use the standard (4K) page size as PAGE_SIZE.  Make the
PAGE_SIZE related variables compile-time constants that reflect this.

Results in a bit over 2K worth of .text savings, and visibly better
code in the places that use PAGE_SIZE, etc.
2001-11-11 16:40:36 +00:00
thorpej 2ea8a793d0 * Define prologue/epilogue macros for the cache clean functions,
and use them, like we do in the SA-1 code.
* Use numbered labels for loops.
2001-11-11 01:05:11 +00:00
thorpej 3492e0ce0b Fix a missing-whitespace typo. 2001-11-11 01:02:58 +00:00
thorpej eb8206f223 Use numeric labels for loops. 2001-11-11 00:47:49 +00:00
thorpej de8e924e4c * Define prologue/epilogue macros for the cache clean functions,
and use them, rather than replicating the code several times.
* Use numbered labels for loops.
2001-11-11 00:41:48 +00:00
thorpej fe9e809208 Add a comment explaining that we expect the memory controller
registers to already be subregion'd off, and actually init
the PCI DMA tag.
2001-11-10 23:14:51 +00:00
thorpej 9e1b785626 Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
2001-11-10 23:14:08 +00:00
thorpej a27687fb2f Fix some whitespace. 2001-11-10 23:12:41 +00:00
thorpej fa6ae96384 This file is not used. 2001-11-10 00:13:58 +00:00
thorpej d1f4bf74ca Add support for PCI DMA on the i80312. We currently just do
DMA via the Secondary Inbound window, for now.  Will probably
need to revisit this at some point.

Require that the board-specific i80312 front-end slice off a
subregion for the memory controller before calling i80312_attach(),
and fix a bug in the IQ80310 front-end that caused the Secondary
Inbound window to be configured incorrectly.
2001-11-09 23:15:52 +00:00
thorpej d32191e3da Add support for configuring the PCI bus (starting with the Secondary
bus only, for now).

XXX Some cleanup wrt. pci_conf_interrupt() needs to happen.
2001-11-09 19:48:35 +00:00
thorpej 671a1b111f Print the fault PC for non-USR Prefetch Aborts. 2001-11-09 19:04:23 +00:00
thorpej 82c11eec1c Clear the Master Abort after reading config space for a non-existent
PCI device.  Disable debugging messages, as PCI config space works now.
2001-11-09 18:04:10 +00:00
thorpej 42a10f6cd4 Implement a badaddr_read() routine which performs a load of the
specified size for the caller, and returns true or false indicating
whether or not a Data Abort occurred (i.e. the address was "bad").
2001-11-09 17:58:00 +00:00
thorpej d16c00cfb2 Disable the ATU interrupt sources (i.e. interrupts that occur when
we get Master or Target aborts).
2001-11-09 17:44:43 +00:00
thorpej 10392361f8 Make the DDB trace output a lot easier to look at. 2001-11-09 16:49:29 +00:00
thorpej 147b1bdc1c Add some rudimentary support for ELF symbols in DDB on the ARM ports.
On platforms which load the kernel sans symbols directly from firmware
(possibly in e.g. S-Record format), call ddb_init() with empty arguments,
so that it will search any compiled in SYMTAB_SPACE.  On all other platforms,
if __ELF__, also call ddb_init() with empty arguments until ELF bootloaders
which pass symbol information are ready.
2001-11-09 07:21:37 +00:00
thorpej 660b98b7dc Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
2001-11-09 03:27:51 +00:00
thorpej 64f23a2423 Adjust the way the PMMRs are defined -- offsets from a base, not
absolutes.  Also, add PPB and more ATU registers.
2001-11-08 03:20:36 +00:00
thorpej b9364bb468 First cut at XScale setup code. Needs more work. 2001-11-07 00:17:36 +00:00
thorpej 46309d6bc6 Const poisoning of cpu/class names. 2001-11-06 20:39:13 +00:00
thorpej 5b3f78d953 "i80200", not "80200". 2001-11-06 20:02:13 +00:00
thorpej f12c8ee306 "XScale", not "Xscale". 2001-11-06 19:59:43 +00:00
thorpej e8982cb969 Make it possible for Makefile.${MACHINE}.inc to provide extra
stuff at the end of SYSTEM_LD_TAIL.
2001-11-06 19:52:21 +00:00
thorpej af0d2bf570 Config info for the i80312 XScale companion I/O chip. 2001-11-05 23:38:55 +00:00
thorpej 20b742fd48 RCS ID. 2001-11-05 23:38:05 +00:00
thorpej 49951f6d12 Prototypes for i80312 routines. 2001-11-05 23:37:41 +00:00
thorpej 22514e4c7d Routines for handling the i80312 memory controller for XScale.
Currently includes a routine to determine memory size from the
SDRAM configuration registers.
2001-11-05 23:37:01 +00:00
thorpej fe988b60bb Add PCI window addresses. 2001-11-04 19:32:32 +00:00
thorpej 95a9886f49 Add a comment describing what this file is. 2001-11-04 01:23:49 +00:00
thorpej 8f626436b6 Add missing RCS ID, add missing name. 2001-11-04 01:16:01 +00:00
rearnsha e4fff4a560 Replace most uses of pmap_pde_p with pmap_pde_page, since that is what
we need later in the code.  This fixes a fatal kernel fault in
pmap_modified_emulation if a user application tries to access a kernel
address that is section-mapped.

Add a diagnostic that detects attempts to call pmap_kenter_pa with a
va that is section-mapped.
2001-11-03 00:06:02 +00:00
rearnsha 64c191c269 Define boolean predicates pmap_pde_page, pmap_pde_section & pmap_pde_fpage,
which return true if their pde argument is a coarse page, section or
fine page respectively.
2001-11-03 00:01:23 +00:00
rearnsha 6dcc9636dc Define L1_FPAGE for fine page entries in L1 page table. 2001-11-02 23:58:46 +00:00
rearnsha 87cb8af648 When clearing the modified bit for modified emulation, don't turn
caching on for a page just because we are clearing the writable bit in
the PTE: this is incompatible with the way pmap_vac_me_harder works,
and the code in the modified emulation handler doesn't know about
recalculating the cachable attributes (nor should it, IMO).

Also, if we are invalidating a page, flush its TLB entry; for some
reason we were only doing this when clearing the Write or modified
bits.

These patches together seem to solve the random seg-faults that were
still occuring occasionally under heavy paging.
2001-11-01 15:49:16 +00:00
rearnsha 839525d027 When creating section maps, use pte_cache_mode for setting the
page attributes of cacheable pages.
2001-10-27 16:51:44 +00:00
rearnsha b044d8f60c Add a couple more diagnostics. 2001-10-27 16:48:50 +00:00
rearnsha e185c586c3 Export pte_cache_mode. Define PT_CACHEABLE in terms of it. 2001-10-27 16:45:35 +00:00
rearnsha 3fd2995a76 Declare the plcom device. 2001-10-27 16:42:37 +00:00
rearnsha 9a322ae54f Set initial spl level to SPL_SERIAL, which for some strange reason
is higher than SPL_HIGH (maybe we should be fixing SPL_HIGH).

If IPL_STATCLOCK is defined, initialize spl_masks[_SPL_STATCLOCK] from
it; otherwise initialize use IPL_CLOCK.
2001-10-27 16:41:00 +00:00
rearnsha 85123cf6bf Add new spl level -- _SPL_STATCLOCK. 2001-10-27 16:37:24 +00:00
rearnsha 8a92dcdaa8 Pull in machine/conf.h to find out if we have the plcom serial driver.
If so, then call plcomsoft when appropriate.
2001-10-27 16:34:12 +00:00
rearnsha 4487810503 Add the IFPGA console device. 2001-10-27 16:29:23 +00:00
jmc 6d536163de Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
2001-10-26 06:45:33 +00:00
thorpej 2c5ebcddfb Use MACHINE, not TARGET_MACHINE. 2001-10-23 18:57:32 +00:00
thorpej a2bf3bc31b Pull in <bsd.own.mk> to get the correct toolchain definitions for
the USE_NEW_TOOLCHAIN case.
2001-10-23 17:32:35 +00:00
bjh21 3506931511 Make sure that PT_STEP is defined for userland, even though we don't
support it in the kernel yet.  If we don't do this, GDB arbitrarily
assumes we wanted it to be 9, which is silly.

In the kernel, leave it undefined so that sys_process.c doesn't
generate code for it.
2001-10-19 00:18:20 +00:00
bjh21 d3d2d8bdd7 Recognize GDB's default breakpoint instruction (as of GDB 5.0), in addition to
the instruction we used with GDB 4.x.  The new instruction has the advantage
of fitting the pattern that ARM recommend using for instructions that need to
stay undefined.
2001-10-18 21:26:21 +00:00
rearnsha 81fc80144a Add a comment describing the logic implemented by pmap_vac_me_harder. 2001-10-18 18:15:56 +00:00
rearnsha b5a8c6922a On processors that support both write-through and write-back cacheing
(eg ARM920), the mode in which the processor operates is governed by
the use of both the PT_C and PT_B bits:

	PT_C=1,PT_B=1 -> Write-back
	PT_C=1,PT_B=0 -> Write-through

To support this define pte_cache_mode (initialized to PT_C|PT_B) and
use that when enabling cacheing for a page.
2001-10-18 17:06:14 +00:00
rearnsha 7de86d9ccd With a diagnostic kernel, printing out a message each time we fail
to allocate a L1 pt is often enough to bring the system to its knees:
so make the messages PDEBUG(0,...).

However, even with this step having more than a small number of
processes searching for a L1 pt can still be enough to bring the system
down, since they all run at high priority and sleep for very little time,
thus blocking out user code from completing.  So implement an exponential
backoff when waiting for a page table, so that we don't hog the CPU when
memory is scarce.

Tested by running a make of the C compiler with "gnumake -j30" (and plenty
of swap space).
2001-10-18 16:50:30 +00:00
rearnsha d447073383 Fix pmap_vac_me_harder to take into account pages that are mapped
into both kernel and user space.

Fixes port-arm32/13998.
2001-10-18 16:32:40 +00:00
rearnsha bc8cd3375d Support for ARM9. 2001-10-18 15:19:58 +00:00
rearnsha c14090e8fa Add support calls for ARM9.
Where ARM9, StrongARM and XScale share the same function, rename it
as armv4_XXX.
2001-10-18 14:10:07 +00:00
rearnsha 0dbc5bbfab Add CPU_ARM9 to opt_cputypes.h 2001-10-18 14:03:43 +00:00
rearnsha 520fd8e5d8 Use 'p15' consistently in all mcr and mrc instructions.
Fix warnings in stm/ldm instructions of get_pc_str_offset.
2001-10-18 10:30:34 +00:00
rearnsha 2c48187673 Don't unmap page 0 when preparing to swap out a process. If the pmap
is shared with another process (as can happen if vfork is being used),
then that other process will end up not having a page 0, which is bad
news indeed, since then there is no way back into the kernel.

Found this using a multi-ice box, so they are useful after all!

This seems to fix pr port-arm32/11921 and (possibly) kern/9859.
2001-10-18 09:26:08 +00:00
reinoud be3168ab71 Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
2001-10-17 23:28:19 +00:00
matt 747d79ef47 Workaround "../../../.." 2001-10-17 23:21:44 +00:00
bjh21 07b63ac97a On ELF systems, make intptr_t and uintptr_t long, because Matt says so.
This makes regress/lib/libc/int_fmtio compile.
2001-10-16 20:40:45 +00:00
bjh21 83d5fd8043 Make the declaration of get_pc_str_offset() into a prototype. 2001-10-14 00:17:26 +00:00
reinoud 7d4a1addde Initial commit of the splitting off of arch/acorn32 from arch/arm32.
The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
2001-10-05 22:27:40 +00:00
chris 5f0c745782 Add a couple of simplelocks to make sure we call pagealloc with the uvm_object locked. Found while running a LOCKDEBUG kernel on cats. 2001-09-29 09:39:12 +00:00
chris fa742cde19 Tweak spl functions a little, try to do something between an ldr and it's use. Not the greatest of gains but spl is called a lot it might add up.
Also add comments stating alignment of stack.
2001-09-28 10:01:02 +00:00
chris 38f962d504 Note the alignment state of the stack. This is part of the work to get the stack 8byte aligned for ELF 2001-09-28 09:56:03 +00:00
chris 79f5d977e0 Add extra arg to fpa_test as it should have 4 args. Also add prototypes for fpa_test and fpa_handler. 2001-09-28 09:53:41 +00:00
takemura ca59965026 Renamed platid_search() to platid_search_data() and added new platid_search().
Platid_name() was re-implemented using platid_search().
2001-09-24 14:29:30 +00:00
chris 8fd1ceb7bf Fix bug in vmapbuf, was using len before it had been adjusted. Found by Frank while Luke was tracking down a bug. 2001-09-20 23:32:23 +00:00
matt 544880621b Add cdev_decl for new devices in conf.c 2001-09-16 17:41:28 +00:00
matt ec78dd0fce Add missing devices (IOP,MLX,MLY,LD), PCI, stub AGP, ... 2001-09-16 17:40:40 +00:00
matt d75fe4fc1e Fix .type which uses wrong symbol name. 2001-09-16 17:38:08 +00:00
chris 244c9d9d95 Add the first tweak from PR 12364. Don't switch the flush block on an SA, as it makes second and subsequent flushes less efficient. The other tweaks are already committed. 2001-09-16 08:51:17 +00:00
chs 64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
chris 5cb5484ce3 Sprinkle some static and inline into a couple of functions. Remove dead entries from pmap.h. 2001-09-13 23:56:01 +00:00
chris 5695ad388d Update pmap_clearbit to flush the cache if the area is being made readonly. Also only do this and the tlb flush if the pmap is the current pmap. 2001-09-13 22:45:23 +00:00
rjs fcd39c5f2e Add bs_notimpl_bs_mmap to bus space struct. 2001-09-12 12:32:16 +00:00
rearnsha 9358e3ecc3 Fix warning errors for printing size_t types when compiling with
DEBUG_DMA (uses casts due to a.out and ELF having different base
types for size_t).
2001-09-12 09:41:50 +00:00