Commit Graph

132 Commits

Author SHA1 Message Date
scw b303a9412d Fix an include file botch when there is no vmetwo device in the
kernel config.
2002-03-17 10:04:47 +00:00
scw f39f46188c G/C. These should have been deleted as part of the move to sys/dev/mvme. 2002-03-17 10:04:07 +00:00
scw c4dbe1a160 Allow MD code to provide functions for reading/writing NVRAM/RTC
locations. If passed NULL, the old behaviour using bus_space_{read,write}_1()
is used. Otherwise, all access to the chip goes via the MD functions.

This is necessary for mvmeppc boards where the mk48txx NVRAM/RTC is not
directly addressable.
2002-02-23 17:18:54 +00:00
scw 5bd17a1271 Separate out devices common to many Motorola mvme boards (68k, 88k and ppc)
in preparation for future mvmeppc and mvme88k ports.

This needs a bit if tidying up to make it trully shareable, which will
happen as the new mvme ports are added.
2002-02-12 20:38:09 +00:00
fredette f0002ba642 Added macros for the bits in the SYSBUS byte, and macros
for the i82596 PORT access interface, from the documentation
for that chip.  These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
2001-11-26 23:30:59 +00:00
scw 79abe4afda Fix the clock device offset. (Overlooked in last commit) 2001-08-12 19:16:18 +00:00
scw e9261b9f13 Time Keeper NVRAM driver. 2001-08-12 18:34:25 +00:00
scw bb210bda7e Split the nvram/rtc functionality away from the clock interrupt code
and attach it as `timekeeper0 at mainbus0'.
Use the MI mk48txx nvram/rtc access functions instead of home-grown
versions.

It should now be very easy to add a character device for the benefit
of userland access to NVRAM.
2001-08-12 18:33:12 +00:00
scw e8ba963ae7 Change a post-decrement to a pre-decrement. 2001-08-07 17:25:19 +00:00
chs 0d8e804191 fix typo in previous. 2001-07-31 02:17:27 +00:00
scw d750508a87 Hook the error interrupt only once, otherwise we'd fail when hooking
the interrupt for the 2nd DRAM board where two boards are present.
2001-07-28 08:30:23 +00:00
scw 27ae3aab7c Blah, yet another nit: s/irq/ipl/ 2001-07-27 21:56:10 +00:00
scw ea00e7cda2 Don't bother trying to initiate a DRAM scrub on startup as it requires
frobbing with registers which are marked as "For Test Purposes [only]".
2001-07-27 21:54:07 +00:00
scw c184f03348 Remove Mistakenly Left In comments around some `#ifdef DIAGNOSTIC' tests. 2001-07-27 20:48:58 +00:00
scw 8343a1492f Forgot to shift the DRAM Bank identifiers by four. 2001-07-27 20:33:35 +00:00
scw 7e2f2acb8e Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
2001-07-27 18:38:54 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
scw ff267f1e06 bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
2001-07-07 07:51:37 +00:00
scw 35110949ce Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
2001-07-06 19:00:12 +00:00
scw 59ba4788ce Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface. 2001-05-31 18:46:07 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
scw 4d440b4035 G/C a printf which has moved to the MI code. 2001-05-03 19:03:53 +00:00
scw 6d231d4107 Attach `osiop' at pcctwo instead of `ncrsc'. 2001-05-03 17:54:30 +00:00
scw adf7013d7f Match `osiop' instead of `ncrsc' now. 2001-05-01 07:33:29 +00:00
scw ff4a29679f Switch to the MI 53c710 driver recently committed by Izumi Tsutsui. 2001-04-30 09:05:58 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
scw dd8c947561 Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
2001-04-14 13:53:05 +00:00
scw e4a4f09fa8 Make this compile again; chan_attn() prototype has changed. 2001-03-11 20:24:52 +00:00
bjh21 fe3273fbb4 Patch from PR kern/8001, submitted by Rafal Boni.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards.  This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver.  I've tested it (briefly) with 'ei' on arm26
as well.  In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
2001-01-22 22:28:43 +00:00
scw 53323bf36d Revert the previous change, after discussion with thorpej and cgd. 2000-12-03 15:37:46 +00:00
scw bd8955b9b6 Only try to attach those devices which have been configured
in the kernel config file.
2000-11-30 22:54:31 +00:00
scw c4a189ad74 Print some more details of the memory managed by each ASIC. 2000-11-30 22:51:35 +00:00
scw dcd1f30fb8 First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
2000-11-24 09:42:09 +00:00
scw 7d191ffe77 Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
 . add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
 . fix a few drivers which have dependencies on the implementation.
2000-11-24 09:36:40 +00:00
scw a70c48655b Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
2000-11-24 09:27:42 +00:00
scw 7bd36d34a1 Use the MI md_root.c. 2000-11-24 08:54:08 +00:00
scw f33cb83f53 Call zs_set_speed() to calculate the initial timing constants. 2000-11-21 11:41:37 +00:00
scw b6f0a678dd Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
2000-11-20 19:35:28 +00:00
scw a29dff3290 Fix a braino in the last commit. 2000-11-18 22:46:07 +00:00
scw 4b0eb0e2dd Allow a degree of tolerance when calculating the baudrate timing constant. 2000-11-18 22:34:25 +00:00
scw 598ce19336 Doh! Revert all but the baudrate clock changes from that last commit;
a bunch of local stuff crept in.
2000-11-15 21:32:03 +00:00
scw 096c3068dd The ZS chips are actually clocked at 5MHz and 10MHz on mvme147 and
mvme162 respectively. Thanks to Neil Lubdan and a frequency counter. :-)
2000-11-09 19:51:57 +00:00
scw 0161d6a880 Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
2000-09-19 19:35:52 +00:00
scw 53d57897d0 Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
2000-09-15 08:50:24 +00:00
scw 7f3786d36a Add preliminary support for the MVME162-LX 200/300 series of boards.
Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

	o Real floating point hardware (the 68LC040 model isn't tested),
	o The VMEchip2 must be present,
	o If offboard VMEbus RAM is not present, at least 8MB of onboard
	  RAM is required.
	o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
	  RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
	  supported with offboard RAM, but not without some funky values in
	  the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
2000-09-06 19:51:42 +00:00
scw da7dfaefcc Though the VMEchip2 documentation is not explicit on the subject, a
VMEbus analyser confirms that D8 transfers are possible on all the
master ranges.
2000-08-23 08:13:14 +00:00
scw 72f826d727 A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
2000-08-21 20:50:13 +00:00
scw 3cac59ee4f Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
2000-08-20 21:51:31 +00:00
scw 3f2adcb2b0 Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
	. Get VMEbus slave mode going on mvme147. This should be easy.
	. Fix up the A16 slave mappings.
	. Bounce buffer support. (Messy, but pretty much a `must have'.)
	. Figure out how to deal with `location monitor' interrupts
	  within the framework. (Useful for Busnet, among other things.)
	. It would be nice to make use of the VMEchip2's DMA facilities...
2000-08-20 17:07:41 +00:00
scw b77bc217e1 Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
2000-08-13 17:00:51 +00:00