Commit Graph

81 Commits

Author SHA1 Message Date
thorpej fd53a1c386 Use PAGE_SIZE rather than NBPG. 2003-04-02 03:51:33 +00:00
scw d4f824014d A bunch of things:
- Clean up the way cpu-specific tlb/cache functions are configured
    and used.
  - Add a workaround for a problem whereby cpu* at superhyway? fails
    to probe.
  - Print more info about the cpu/cache.
  - Move the RESVEC handlers back into generic sh5 code and ditch
    the panic stack hack.
  - Make the on-chip SCIF device the default console on Cayman.
  - Add experimental support for booting via a standalone bootstrap
    program (not yet committed) and using the boot parameters passed
    in by it.
  - Add a few more SH elf constants.
  - Tick a couple of items off the TODO list.
2003-03-13 13:44:16 +00:00
scw 80284bdc34 Arrange for non-panic debug sync/async exceptions to re-vector through the
real sync/async exception handler instead of always calling panic_trap().
Otherwise, userland BRK instructions can halt the system.
2003-01-20 22:25:09 +00:00
scw c64b785002 Add sh5 kernel support for SAs.
This gets the Cayman to multi-user with a non-SA aware userland.
2003-01-19 19:49:47 +00:00
scw b8b3ddc479 Add a "kernel_text" label.
Pointed out by Andrew Brown.
2003-01-16 15:52:53 +00:00
lukem 4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
thorpej 1132348b98 Use aprint_normal() for cfprint routines. 2003-01-01 01:24:19 +00:00
scw 04fd530ec5 Avoid strict-alias warnings. 2002-12-06 10:07:10 +00:00
scw 381d46a4d1 Hard-code the simulated cpu speed to some fictional value. 2002-12-06 10:06:27 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
scw 46a9e7ed35 Quell uninitialised variable warnings. 2002-11-24 12:12:01 +00:00
scw 009e79b59b Remove some accidentally committed debug code. 2002-11-24 10:43:15 +00:00
scw a3885e9bdd - Change VM_MIN_KERNEL_ADDRESS to start at KSEG1 instead of KSEG0.
- Overhaul the TLB management code such that we now keep track of
   the exact TLB slot at which a mapping was inserted, both for user-
   space and kernel mappings. This addresses #2 on the TODO list.
2002-11-23 09:25:54 +00:00
scw 7e40fdd6f9 Keep evbsh5-specific major device declarations separate from the shared
sh5 devices.
2002-11-23 09:13:18 +00:00
scw 5f18a49912 Add alphaledio.h 2002-11-23 09:05:27 +00:00
scw a354470bbf Support for the alphanumeric LED display on the SuperH Cayman board. 2002-11-23 09:05:03 +00:00
scw f8647e7e3c Make interrupt routing work for PCI slots 2 and 3. 2002-10-31 14:54:37 +00:00
scw 590d641525 A 64-bit config file for the Cayman. 2002-10-23 13:28:01 +00:00
scw c774ffbae4 MD glue for COMPAT_NETBSD32 on SH-5. 2002-10-23 13:26:35 +00:00
scw 1ad6189f11 No, really attach sm(4) at sysfpga... 2002-10-22 15:35:25 +00:00
scw b604625664 - sm at sysfpga,
- gsip at pci (and its phy)
2002-10-22 15:21:24 +00:00
scw 8477927799 - Attach sm(4) at sysfpga instead of at superio. The latter was a relic
of when we used to attach sm(4) to the isabus.
- Re-work sysfpga's interrupt naming scheme to reflect that used in the docs.
2002-10-22 15:19:06 +00:00
scw b12d613c40 Enable the NMI only if DDB is defined, instead of DEBUG. 2002-10-22 14:38:26 +00:00
scw bce8874166 Make this compile when DEBUG is not defined. 2002-10-22 14:17:34 +00:00
scw 6a2132797e - Simplify early initialisation so we do most of it in C.
- Call allocsys() much earlier so we can use uvm_pageboot_alloc() to
  steal KSEG0 pages for system tables.
2002-10-22 09:30:26 +00:00
scw c01b319dcc There seem to be some stability problems with the scif serial port driver
at the moment, possibly as a side-effect of some yet-to-be-committed SH5
speed-ups.

Work-around it for now by using com0 as the console.
2002-10-19 08:43:32 +00:00
scw 472a1ad6b2 When setting up to probe a com(4) port for use as the console, make sure
the port is powered up and configured correctly.
2002-10-19 08:39:50 +00:00
scw a92b12e63a Enable the early bus_space_map() of the sysfpga's registers. 2002-10-14 14:21:35 +00:00
scw 89612efe30 Interrupt overhaul:
- Allocate interrupt handles dynamically from a pool(9) to reduce the
   number of TLB misses during interrupt dispatch.
 - Fully support evcnt(9) in all interrupt dispatchers.
2002-10-14 14:19:27 +00:00
scw f07358cb66 - Make sure not to sign-extend the PA of KSEG0, particulary in 64-bit mode,
- Moved intrnames/eintrnames here, since they're pretty much board-specific.
2002-10-08 15:52:02 +00:00
scw 199e165526 Add a cacheop for purging/invalidating the whole operand/insn caches.
This is currently not used (actually, it was used locally for a short time
while tracking down a pmap bug), but is here in case it's needed later.
2002-10-07 14:48:14 +00:00
scw c3ed42912c Simplify the scsibus attatchment as pointed out by Simon Burge. 2002-10-07 08:20:07 +00:00
scw c784454024 Use a more aesthetically pleasing 10% duty-cycle for the heartbeat LED. 2002-10-05 12:18:58 +00:00
scw a7330033a9 Add ex(4), ahc(4), scsibus(4), and sd(4). 2002-10-05 11:43:23 +00:00
scw 1b3c8f3be0 Flesh out cpu_reboot(). 2002-10-05 11:01:13 +00:00
scw fa307a78a6 A couple of additions:
- sysfpga_sreset()
   Hit the soft-reset register to reset the board.

 - sysfpga_twinkle_led()
   Might as well put the blinkenlight on the Cayman to good use as
   a "heartbeat" indicator.
2002-10-05 10:59:10 +00:00
scw db80ebe781 Add needs-flag to sysfpga, and check it before calling sysfpga_nmi_clear(). 2002-10-04 09:24:52 +00:00
scw d4c3160197 pmap_bootstrap() needs to know the physical address of KSEG0. 2002-10-04 09:23:27 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
scw 9d94c9899c Check if an interrupt is already claimed _after_ locating the
right interrupt handle.
2002-10-01 07:58:54 +00:00
scw a7be636d26 Rename the SH5 PCI attachment to "sh5pci" instead of abusing the "pcibus"
config definition. The new config world order is more picky about such things.
2002-09-28 13:08:22 +00:00
scw f5138efc2e Fix things so the com(4) probe in consinit() works. 2002-09-28 12:50:27 +00:00
scw 5868dbcbf6 Make this work following the gehenna_devsw merge. 2002-09-28 12:49:17 +00:00
scw 251ba05b3f Support for the SH5 on-chip PCI bridge, and support for its deployment
in the Cayman board.
2002-09-28 11:16:36 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +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 d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
thorpej c12a2960bb In sysfpgamatch(), the expression "cf->cf_driver == &sysfpga_cd" is
always true, so just return the constant 1.
2002-09-26 20:25:41 +00:00
scw d942ee4018 - Setup the cpu-specific cache manipulation function pointers.
- Add sh5_nmi_clear().
2002-09-22 20:52:12 +00:00
scw f1780fd0ae Add sysfpga_nmi_clear(). This resets the NMI one-shot in Cayman's
System FPGA chip.
2002-09-22 20:51:09 +00:00