Commit Graph

155 Commits

Author SHA1 Message Date
thorpej e0ea696615 * Add support for running the IQ80310 kernel where KERNEL_BASE !=
physical memory start.  Garbage-collect some cruft while here.
* Move the kernel up to 0xc0000000, giving a 1G/3G kernel/user split.
* Adjust the Integrator startup code accordingly.
2002-03-03 21:22:15 +00:00
thorpej e23381908a inittodr(): Actually initialize time from the file system time. 2002-03-03 21:10:40 +00:00
chris 1181e367e0 Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
2002-03-03 11:22:58 +00:00
thorpej 20dd585980 Add RCS ID. 2002-03-02 22:29:40 +00:00
thorpej ebcb5cdd36 Move the DBSYM bits up in the file. 2002-03-02 22:23:10 +00:00
simonb 4324f37586 Use "#define<tab>". 2002-02-28 03:17:23 +00:00
thorpej c92241b420 Correct a comment. 2002-02-24 20:51:56 +00:00
thorpej 4af7d26f26 Fix a couple of comments. 2002-02-24 20:44:28 +00:00
thorpej 0a4bc3ccd5 This file is obsolete. 2002-02-24 20:32:40 +00:00
thorpej 39c165f331 Add support for relocating gzboot's .text out of flash and into
RAM (while still decompressing the image directly from flash).

This makes gzboot run a LOT faster.
2002-02-24 20:29:44 +00:00
thorpej d819468d64 Improve zlib error reporting. 2002-02-24 18:36:29 +00:00
thorpej 0780eaaa32 Use bcopy() and bzero(), since the rest of libsa does. This means
we don't have to pull in memset() and memcpy() from libsa.
2002-02-23 20:48:14 +00:00
thorpej 59f1dfe1c2 Don't need to provide zcalloc() and zcfree(); there are such routines
in libz.
2002-02-23 20:34:41 +00:00
thorpej 524d248b59 Fix the -DRELOC=... CPP flag. Add -DDYNAMIC_CRC_TABLE to shrink
the text (and, thus, the space taken up in flash) a bit.
2002-02-23 20:19:52 +00:00
briggs caaef6d0d0 Implement obio_bs_rr_1. 2002-02-23 19:55:34 +00:00
thorpej a91d5a1a99 Example Makefile and linker script for building a run-from-flash
gzboot image for the IQ80310 with room for 2M of compressed data.
2002-02-23 19:16:54 +00:00
thorpej c39065eb62 Add support for running directly out of flash:
* Require that the builder Makefile provide a linker script.
* After making sure the MMU is disabled, check to see if
  _etext == __data_start.  If not, then copy the .data contents
  into RAM.
* Put the stack in .bss.
2002-02-23 18:19:09 +00:00
thorpej 87de164ab4 Fix a silly bug in the propellor spinning code. 2002-02-23 17:25:32 +00:00
thorpej d114b32f24 Add some nops after we enable the MMU, for good measure (enough for
the nops to be the prefetch'd insns when the MMU switch occurs).
2002-02-23 05:58:46 +00:00
thorpej f31f6affa9 Make sure the MMU is enabled after we switch to the new kernel
page tables (gzboot disables the MMU before it does its work).
2002-02-23 05:55:26 +00:00
thorpej 0fac1c42e9 gzboot -- boot a gzip'd kernel image. This is useful for booting
compressed kernel images from flash.

This needs more work, but is a good first-pass.
2002-02-23 05:41:14 +00:00
thorpej 1152fa21da Add some simple standalone device drivers for IOP310-based boards. 2002-02-23 05:12:01 +00:00
thorpej ac5d6ab89f Fix the "va" argument to pmap_map_entry() when mapping kernel_ptpt. 2002-02-22 17:26:36 +00:00
thorpej 37595cfcf8 Fix the "va" argument to pmap_map_entry() when mapping kernel_ptpt.
This happened to work in the IOP310 because the kernel runs VA==PA.
2002-02-22 17:23:13 +00:00
thorpej 5164bca298 Also generate flat binary kernels for the IQ80310. 2002-02-22 05:07:46 +00:00
thorpej bb84e85802 Change pmap_map_entry() to work like pmap_map_chunk(): take a pointer
to the L1 table and a virtual address, and no pointer to the L2 table.
The L2 table will be looked up by pmap_map_entry(), which will panic
if the there is no L2 table for the requested VA.

NOTE: IT IS EXTREMELY IMPORTANT THAT THE CORRECT VIRTUAL ADDRESS
BE PROVIDED TO pmap_map_entry()!  Notably, the code that mapped
the kernel L2 tables into the kernel PT mapping L2 table were not
passing actual virtual addresses, but rather offsets into the range
mapped by the L2 table.  I have fixed up all of these call sites,
and tested the resulting kernel on both an IQ80310 and a Shark.
Other portmasters should examine their pmap_map_entry() calls if
their new kernels fail.
2002-02-22 04:49:19 +00:00
thorpej 79738a99e9 Keep track of which kernel PTs are available during bootstrap,
and let pmap_map_chunk() lookup the correct one to use for the
current VA.  Eliminate the "l2table" argument to pmap_map_chunk().

Add a second L2 table for mapping kernel text/data/bss on the
IQ80310 (fixes booting kernels with ramdisks).
2002-02-21 21:58:00 +00:00
thorpej 15e0450397 Always pass the L1 table to pmap_map_chunk(). This allows pmap_map_chunk()
to perform some error checking.
2002-02-21 05:25:23 +00:00
thorpej 454e106a48 map_chunk() -> pmap_map_chunk(), and move it to pmap.c 2002-02-21 02:52:19 +00:00
skrll 2de2e35201 Fix typo in comment. 2002-02-20 20:47:40 +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
briggs acf12a854d Use the MI md_root 2002-02-19 17:41:15 +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
thorpej e01bd95698 * The Npwr only has 5 interrupt sources, all in XINT3, so don't bother
reading XINT0 (which isn't even implemented by the CPLD on Npwr).
* Adjust the mask of valid IRQ bits for the Npwr.
2002-02-09 03:52:31 +00:00
thorpej 727b4699ce The Npwr has a 19-bit timer. Make sure values programmed into
the counter fit.
2002-02-08 23:50:53 +00:00
thorpej 9716a068b6 * No need to specify the console speed anymore; it defaults to the
correct speed if IOP310_TEAMASA_NPWR is defined.
* Just wildcard the "wm" and "siop" devices.
* Comment out raid and ccd for now.
2002-02-08 03:43:41 +00:00
thorpej 66c81951ae Default the console to the correct speed on the Npwr (so that
it doesn't have to be set in the kernel config file).
2002-02-08 03:41:56 +00:00
briggs efca4d520d Wire the internal devices to the right interrupts on NPWR. 2002-02-08 03:28:24 +00:00
thorpej 987cb42a95 No point in setting the ATU Subsys vendor/dev ID on boards that
can't plug into a PCI host.
2002-02-08 02:31:12 +00:00
thorpej 367a9543a7 The Npwr doesn't have the board_rev/cpld_rev/backplane_det registers,
do don't bother reading them.
2002-02-08 02:30:12 +00:00
briggs 6331bb5b24 Let this compile with the IOP310_TEAMASA_NPWR option. 2002-02-08 01:42:41 +00:00
briggs 07ec97aeba finish conversion from TEAMASA_NPWR to IOP310_TEAMASA_NPWR 2002-02-08 01:41:48 +00:00
thorpej 140c8fe847 Don't hard-code the console address in error messages. 2002-02-07 23:53:01 +00:00
thorpej 2b9837b4d9 Add support for the Team ASA Npwr IOP310-based server appliance. 2002-02-07 21:34:23 +00:00
thorpej 9265cef48c irq_init() -> iq80310_intr_init() 2002-01-30 04:01:36 +00:00
thorpej 48499c673e Pull in <evbarm/ifpga/irqhandler.h> for now. 2002-01-30 04:00:47 +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 558b6aece0 Move the generic ARM soft interrupt code into a generic place. 2002-01-29 22:54:14 +00:00