Commit Graph

778 Commits

Author SHA1 Message Date
sekiya
d12d5dc3e0 Add a table mapping IPxy to ABI and load address. 2004-09-29 04:27:41 +00:00
sekiya
551d2b9aa9 Use ANSI function declarations. 2004-09-29 04:06:51 +00:00
sekiya
6f2cb625f4 Use C-style comments. 2004-09-29 03:21:14 +00:00
sekiya
8c64b0776c Various fixes:
* clean up EISA detection logic,
* really fix config_found_ia() usage (from drochner@),
* sprinkle a bit of KNF.
2004-09-29 03:11:28 +00:00
sekiya
6a4c72d1af Add COMPAT_20 2004-09-29 02:50:42 +00:00
tsutsui
ef820af6db Rename if_mec_mace.c -> if_mec.c.
This file contains not only an attachment but whole driver functions.
2004-09-23 14:45:20 +00:00
rumble
b1a9752c01 Correct a few comment typos that have propagated through the
tree.
2004-09-16 03:57:10 +00:00
sekiya
8590eac465 Use the mace interrupt handler for PCI interrupts.
From KIYOHARA Takashi
2004-09-06 07:24:06 +00:00
sekiya
7e244e5e53 Oooops, iaa.iaa_name must be initialized. 2004-09-05 13:32:10 +00:00
sekiya
847a930d95 Use config_found_ia() rather than config_found(). 2004-09-05 11:48:34 +00:00
manu
6e3c639957 IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
2004-09-04 23:29:44 +00:00
drochner
46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
tsutsui
efa3e6b66b Remove bogus TABs. (from OpenBSD) 2004-08-18 14:47:25 +00:00
rumble
d15d05328d Add some infrastructure to support HPC-based ethernet adapters
(E++):
 o The static configuration table now identifies by HPC offset.
 o Added sq(4) entries for IP12, IP20, and IP24.
 o Accomodated HPC revision forcing based on kernel config flags.
2004-08-17 00:57:42 +00:00
rumble
38bbaabc37 Add defines for the four possible HPC GIO bus addresses. 2004-08-17 00:48:08 +00:00
rumble
d023bcf042 Implement several changes that get my E++ (HPC1.5 GIO ethernet
adapter) to work on IP24:
 o Force HPC and GIO slot endianness.
 o Allow slots one and two to be masters and configure for
   realtime mode.

Also, while we're here move IP22 invariants into the IP22 case.

I suspect that IP20 will work as well since it exhibited the same
broken DMA that IP24 did before I flipped the master bit.
2004-08-17 00:44:39 +00:00
sekiya
1a682ebd64 Add 64-bit ABI bootloader (for IP30). Needs a slightly modified toolchain
and a 64-bit-clean libkern.a; once those bits are committed, this should be
100% good to go.
2004-08-11 11:45:26 +00:00
sekiya
8a3d53f346 Start routine for 64-bit ABI. 2004-08-11 11:41:19 +00:00
tsutsui
9df92e5adc - It turns out alignment restriction for TX descs is 8kbytes, not 64kbytes.
- Use MEC_TX_ALIAS register to set/clear TX interrupt enable bit.
2004-08-01 06:36:36 +00:00
drochner
a5a5473c25 remove now unnecessary "pci_enumerate_bus" definitions 2004-07-29 16:55:25 +00:00
sekiya
c830efd52f Properly detect the EISA bus for IP22-class machines. 2004-07-25 10:28:28 +00:00
rumble
44f3c135e7 KNF and consistency 2004-07-20 05:19:23 +00:00
rumble
5189fbb0b4 Allow for console attachment by statically allocating a softc
extension. Tweak cs_softreq when appending the transmit queue.
Finally, add a bit of debugging.
2004-07-20 04:55:21 +00:00
rumble
ae62a41f43 Properly initialise the tx and rx queue head and tail positions. 2004-07-20 04:43:44 +00:00
atatat
f68a9f1ff2 Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
2004-07-15 03:53:44 +00:00
tsutsui
3edbd6052a Add device-major for lpt. 2004-07-14 14:13:24 +00:00
tsutsui
7565fb7456 Now multicast on mec0 is confirmed working, so remove XXX comment
in mec_setfilter() function.

Thanks to Gerald Heinig for providing multicast test programs.
2004-07-14 09:45:47 +00:00
tsutsui
c2de425692 Reenable lpt at mace since shared interrupt code was fixed in mace.c rev 1.2. 2004-07-12 13:45:40 +00:00
tsutsui
204f5095a2 Enable mec Ethernet at mace. 2004-07-12 13:16:14 +00:00
tsutsui
fff3ff1b2c Add a working driver for O2 (IP32) on-board MACE MAC-110 Ethernet.
Note:
- I don't have any hardware docments for this device, so this driver might
  have some odd descriptions guessed by results of try-and-errors.
  (the only info I have is the Linux driver, but I think it doesn't describe
   the hardware specifications very well anyway)
- All RX packets and most TX packets are copied from/to buffers in the driver
  due to hardware restriction, so performance is not so good for now.
  Maybe RX packets can be directly DMA'ed to mbufs by the same method used
  of fxp(4), but the hardware seems to require 4kbyte aligned RX buffers.
- Multicast filter setup function is not tested yet (no info).
- Currently only tested on R5000 O2 with disabled L2 cache, so needs
  more tests on other CPU (i.e. RM5200/R10000/R12000) models.
- Currently BUS_DMA_COHERENT is not used for the device control data DMA
  to avoid performance issue on memcpy() against RX buffers, but it might be
  problematic when L2 cache is enabled or on R10000 models.
2004-07-11 03:13:04 +00:00
tsutsui
43f42bdb21 Count mace interrupts by evcnt(9). 2004-07-10 08:47:33 +00:00
tsutsui
9864035c97 Remove a debug printf. 2004-07-10 08:44:42 +00:00
tsutsui
0d31ac4463 Make sure shared interrupts properly handled. 2004-07-10 07:39:13 +00:00
sekiya
ce13caf073 Add wsmouse* at zsms* 2004-07-08 22:43:30 +00:00
sekiya
c1036b3eff Uncomment keyboard/mouse at zs* 2004-07-08 22:32:34 +00:00
sekiya
5110af7a8b Add support for keyboard and mouse attachments at zs*, used on IP12 and IP20.
Code written by Steve Rumble; committed with his blessing.

Using a glass TTY as a console on IP20 (IP12 untested) should now be possible.
2004-07-08 22:30:53 +00:00
sekiya
9a82e9035c Uncomment grtwo* attachment and its corresponding wsdisplay* 2004-07-08 10:12:27 +00:00
sekiya
ae7e3d69b0 Fake a FIFO interrupt iff the FIFO interrupt is unmasked. Should eliminate
the "spurious interrupt" messages on machines without grtwo displays.
2004-07-08 10:10:49 +00:00
sekiya
9c289db87a Remove unnecessary variables from grtwo_cnattach(). 2004-07-08 10:02:10 +00:00
sekiya
ead6809450 Call gio_video_init() for IP12 and IP20. Neither model uses the same keyboard
glue as the IP22, so add conditionals in the keyboard connection logic.
2004-07-08 10:00:30 +00:00
rumble
84931191d5 Fix a typo in zsms0's parent. 2004-07-07 00:58:43 +00:00
sekiya
c279001857 Oops. Remove reference to phantom variable. 2004-07-07 00:11:11 +00:00
sekiya
79fdbacde6 Add ih_next to the data structure. Part of Steve Rumble's interrupt-sharing
scheme.
2004-07-07 00:08:43 +00:00
sekiya
eadba4d41f Add commented-out entries for grtwo wscons support (and fix the entries for
serial keyboard/mouse).
2004-07-06 23:59:48 +00:00
sekiya
432805bb11 Add the following to the int driver:
* if the driver hasn't been properly initialized, spin for a bit in wait_fifo()
  rather than try to access the local0 status register.
* allow interrupt sharing (from Steve Rumble; necessary for IP20 glass TTY
  support).
2004-07-06 23:56:13 +00:00
sekiya
9c873da232 Many fixes to the grtwo wscons driver:
* fills seem to be broken.  Avoid filling large vertical regions; instead,
  attempt to break it up into managable chunks.  This doesn't work perfectly
  either, so clear the screen row-by-row (which does work).
* Characters are now right-side-up
* the driver now uses screen coordinates properly.

With the exception of column erases (which fall prey to the fill issue), the
driver is now usable.
2004-07-06 23:51:40 +00:00
bouyer
21e9a36edc Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
2004-06-28 21:07:47 +00:00
abs
bd8eb3b5ed Add (commented out) ALTQ options to all GENERIC-like files 2004-06-26 07:32:05 +00:00
christos
c22e4ed8cd ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM 2004-06-18 15:02:29 +00:00
christos
0399e839cf Add pseudo-device ptm on all the generic flavored kernels. 2004-06-16 15:07:39 +00:00
rumble
875866073a sekiya-san's platform abstraction allows us to keep these
functions static.
2004-06-13 18:30:11 +00:00
rumble
0f58ff497d General cleanup to improve style consistency and KNF adherence.
Updated comments and removed superfluous code. No functional
change intended.

ok'd by pooka and sekiya
2004-06-13 18:28:35 +00:00
rumble
533084bbc7 Refactor consinit() for readability by pulling out mach_type
specific code into their own functions. No functional change is
intended.

ok'd by pooka and sekiya
2004-06-09 23:01:01 +00:00
rumble
df731a5f0f Use global static prom vectors within the module instead of
creating them on the fly. Simplify arcemu_ip12_putc() since the
printf vector behaves as expected.
2004-06-08 22:51:21 +00:00
kleink
7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
pooka
88d0b8e68e Return "video()" instead of "graphics(0)" for a graphics console,
since that's what even our code expects.

suggested by Steve Rumble
2004-04-14 10:29:26 +00:00
sekiya
7af65e354b Back out portions of previous commit -- the mips/bus_dma.c code is less
correct than the sgimips-specific code.
2004-04-13 08:12:03 +00:00
sekiya
8af58b1851 Merge fixes from arch/mips/mips/bus_dma.c -- a curproc->lwp fix, and streamline
the cache magic for BUS_DMASYNC_PREREAD in _bus_dmamap_sync_mips3().

(Note to self: investigate feasibility of replacing MD bus.c with MI bus_dma.c)
2004-04-12 14:30:47 +00:00
pooka
0d197bf832 KNF some and make printf output a bit nicer. 2004-04-11 12:17:10 +00:00
pooka
34bd15648e Add IP12 stuff. Most bits included are from Steve Rumble.
After this change it is possible to run IP12.
2004-04-11 12:13:20 +00:00
pooka
0e36d54eba Fix base address for i8254 calibration code. This has the effect of
us writing to the correct addresses and the thing actually working.
2004-04-11 12:05:37 +00:00
pooka
95d984a2eb Don't report page 0 as free memory, it makes bad things happen. 2004-04-11 11:34:13 +00:00
pooka
817b0a57d8 Make das blinkenlights, well, blink on IP12 also. 2004-04-11 10:29:20 +00:00
pooka
451031bddf RCS Id police 2004-04-11 00:44:47 +00:00
pooka
4b60b79ce8 build arcemu 2004-04-10 22:48:44 +00:00
pooka
bc32b3ffbe Clock interrupt routine for mips1 (ip12) from Steve Rumble. 2004-04-10 22:48:12 +00:00
pooka
03e520f443 * The HPC endianness register isn't mapped on my IP12, so don't try to
unconditionally read it
* IP12 glue from Steve Rumble
2004-04-10 21:59:42 +00:00
pooka
0df6470670 don't attempt to init pckbd console on IP20 2004-04-10 21:47:33 +00:00
pooka
3f96344b80 Don't unconditionally initialize seeprom chip type after we've
conditionally initialized it to the correct type.

spotted by Steve Rumble
2004-04-10 20:23:05 +00:00
pooka
9b2f4efe28 Rework conditional statement a bit to print bit about using ARCS for
console I/O if nothing really attached, not if we just called consinit()
with an invalid IPxy mach_type.

inpired by Steve Rumble
2004-04-10 20:15:12 +00:00
pooka
737a72e779 attach zs console on IP12
from Steve Rumble
2004-04-10 20:03:11 +00:00
pooka
cafa4ad8f9 ARCBIOS emulation code to be used on machines without ARCBIOS
Currently supports only IP12, but can be made to support others.

includes effort from Steve Rumble and myself
2004-04-10 19:53:48 +00:00
pooka
a7250523da At least my IP12 works better without the port-flipping glue,
so un-glueify IP12 for the time being.
2004-04-10 19:20:19 +00:00
pooka
a674ac1bc3 and finally, the big moment you've all been waiting for:
make it actually compile
2004-04-10 19:07:58 +00:00
pooka
89a2f53d77 fix off-by-one in revision print 2004-04-10 19:07:06 +00:00
pooka
88764f7031 add watchdog enable and disable
from Steve Rumble
2004-04-10 19:06:33 +00:00
pooka
f59c5e58e8 Add physical offsets for memory configuration registers to be used
outside bus_space.
2004-04-10 19:02:39 +00:00
pooka
ade6841fe5 If argv[1] doesn't exist, don't try to use it. 2004-04-09 16:41:23 +00:00
pooka
b11a60fb35 apply wide-angle KNFication beam 2004-04-08 14:45:13 +00:00
tsutsui
646b733fd4 Tidy up total/avail memory message as well as other ports.
As per discussion on port-sgimips.
2004-04-05 16:01:43 +00:00
sekiya
49ecfdf2e4 Hook the IMC bus error handler into the ISR, otherwise bus error conditions
won't be properly dealt with.
2004-04-03 11:33:29 +00:00
pooka
3b19c32c1a KNF 2004-03-25 15:16:11 +00:00
pooka
75033bc71e replace terms ip1x and ip2x in comment 2004-03-25 15:08:57 +00:00
pooka
39a22bd417 Sprinkle some #ifdef MIPS3 to be able to compile the port without
including MIPS3 code.

for upcoming IP12
2004-03-25 15:06:37 +00:00
sekiya
e594b2f3d9 The lpt driver doesn't play nicely with the serial ports -- they share the
same interrupt, and something isn't quite right with the mace interrupt
dispatcher.  Disable for now.

Pointed out by Tillman Hodgson and confirmed by ozone on port-sgimips.
2004-03-25 00:53:58 +00:00
drochner
cf8b697c65 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:06:57 +00:00
sekiya
27be14d39c Checkpoint the GR2 wscons driver. Heavily derived from lonewolf@'s newport
driver.  Still some issues:

* framebuffer setup seems incomplete.  Some drawing primitives work 100%
  of the time, while others fail one in ten tries.  Perhaps my board is
  slightly broken, as the exact model as probed by ARCS seems to shift
  between Elan and XS24 from time to time.
* characters are drawn bottom-up rather than top-down (as the wsfont
  definitions expect).
2004-03-18 08:52:04 +00:00
sekiya
0ee588cc1c Add GR2. 2004-03-18 08:40:46 +00:00
sekiya
bf7ef66f3b Add console attach glue for GR2. 2004-03-18 08:40:24 +00:00
sekiya
a924cfbf24 Add register definitions and console prototype header for the SGI GR2 family
of framebuffers.
2004-03-18 08:39:17 +00:00
bjh21
dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
sekiya
4a4eccf833 Add int2_wait_fifo(), which will idle while awaiting a flag in the interrupt
controller to deassert.  Needed for the more interesting features of various
SGI framebuffers.
2004-03-09 14:05:09 +00:00
sekiya
64732fc9ae Print an informative message when unimpl_intr() is invoked, rather than panic(). 2004-03-06 07:50:56 +00:00
sekiya
d289507533 Blinkenlitzen for IP20 (Indigo). 2004-02-28 00:53:56 +00:00
wiz
f05e6f1a3a occured -> occurred. From Peter Postma. 2004-02-24 15:12:51 +00:00
sekiya
bb60b4d04f Correct descriptive comment (these routines are not used for r5ksc). 2004-02-22 03:23:54 +00:00
bjh21
fb330ce71b Remove pckbc_machdep_cnattach() -- it's no longer needed. 2004-02-19 01:03:45 +00:00
bjh21
5aca86918f Add a new MI attribute, pckbc_machdep_cnattach, and change pckbc_cnattach()
to only call pckbc_machdep_cnattach() if this is present.  This allows
pckbc_machdep_cnattach() to be omitted entirely on most ports, where it only
returns ENXIO anyway.

The devices with this attribute at the moment are pc(4) on i386 and bebox, and
pckbc on sparc, where pckbc_machdep_cnattach() mysteriously returns 0 rather
than ENXIO.
2004-02-14 14:33:28 +00:00
sekiya
ad76afdc86 de-__P. 2004-02-08 13:15:42 +00:00
sekiya
e03691c03d More newport driver tweaks:
* detect and store vc2 revision.  This is (likely) the important factor in
  determining the proper cursor offset, so add a bit of logic that does the
  right thing on my revision 0 vc2.  This will have to be determined
  empirically, revision by revision.
* take a stab at detecting framebuffer depth.  SGI does it quite differently,
  but their algorithm doesn't work, so we'll do it along the same lines as
  linux.
* implement newport_mmap() for use by X.  The necessary xsrc commits have been
  made (with the notable exception of the config/cf changes, which probably
  shouldn't go in until 4.4.0 has been imported).
2004-02-07 04:34:34 +00:00
lonewolf
8ecc24789a Remove unused dc_screens from the softc, the driver does not support multiple
screens.
2004-01-26 11:00:47 +00:00
sekiya
6595b5b178 Slight modifications to newport driver:
* Add resolution and depth variables to softc (for use in X driver, although
  depth detection is currently problematic),
* Store more information about various chip revisions,
* Implement ioctls to help the X driver detect device presence and geometry.
2004-01-26 07:12:33 +00:00
lonewolf
20f66016c1 Correctly read the board revision. 2004-01-22 14:15:51 +00:00
jdolecek
6c14651ea0 cleanup old lpt(4) attachment, and glue ppbus in so that they can coexist:
* lpt device is defined in MI place (dev/ppbus/files.ppbus), dev/ic/lpt.c
  is included there too; dev/ic/lpt.c is not included if ppbus is
  configured or if there is alternative platform lpt (like for pc532)
* g/c MD lpt definitions and custom puc/upc attachments,
  glue moved to conf/files and dev/pci/files.pci respectively; remove
  device lpt definition from dev/isa/files.isa
* add ppbus parport attribute, atppc device attachments, adjust plip and lpt
  glue
2004-01-20 19:58:00 +00:00
sekiya
bdf3df3127 Checking for IP32 in each driver is redundant -- they're attached as children
of mace, so it is sufficient to perform the check in mace_match().  Pointed
out by soren@.
2004-01-19 10:28:28 +00:00
sekiya
d0207690f0 opt_machtype.h no longer exists. 2004-01-19 08:06:54 +00:00
sekiya
5ca2e0b59c Completely remove IP2X and IP32, which renders opt_machtype.h obsolete. 2004-01-19 03:26:14 +00:00
sekiya
cfc3bade55 Attach the com and mcclock devices only if the machine is an IP32. 2004-01-19 00:30:17 +00:00
sekiya
3791a9994b g/c obsolete function. 2004-01-19 00:19:36 +00:00
sekiya
90448f3f3f Attach int0 at mainbus (precedent being the ip32 CRIME device, which handled
interrupts and timer calibration yet is also attached at mainbus).

Introduce the INDY_R4600_CACHE config option, which more accurately describes
the code enabled by this option.

This renders #ifdef IPxx completely obsolete, thus we theoretically can unify
the GENERIC files if a workable load address relocation scheme can be found.
2004-01-19 00:12:31 +00:00
sekiya
6ce242b753 Keep chip revision and EISA information on same line as attach information. 2004-01-18 13:11:18 +00:00
sekiya
6f76c4237a ANSIfy, de-__P(), add a little glue for IP12. 2004-01-18 13:00:05 +00:00
sekiya
6feffff053 Properly disable watchdog timer. 2004-01-18 12:18:57 +00:00
sekiya
bc71fd3468 Remove another #ifdef IP32 2004-01-18 04:43:42 +00:00
sekiya
5aea276a37 Add files.dev and files.mace 2004-01-18 04:07:17 +00:00
sekiya
63b59c4db4 Following the example of the hpc/, gio/, and ioc/ directories, move the
mace devices to their own mace/ directory.  Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish().  mace devices now call cpu_intr_establish().
2004-01-18 04:06:42 +00:00
sekiya
590daf63b8 Nuke two more instances of #ifdef IP32. 2004-01-18 01:00:48 +00:00
sekiya
06419e6abe ip2x.c and ip32.c are no more. 2004-01-18 00:55:26 +00:00
sekiya
23020fc3cf Finish moving code between ip2x.c and ip3x.c to imc.c and crime.c. 2004-01-18 00:54:55 +00:00
sekiya
90ed8dc85b Add more platform hooks in platform struct. 2004-01-18 00:53:49 +00:00
sekiya
f754464233 Do not directly reference crime_*() routines, go through the platform
struct pointers instead.
2004-01-18 00:50:08 +00:00
sekiya
7f7429081d Large rototill of the lowlevel code:
* move all device-specific bitbanging to the device drivers in question --
  i.e., the ip32 init code doesn't access the CRIME registers directly but
  instead trusts the CRIME driver to DTRT.  machdep.c is cleaner thereby.
* introduce int.c, which handles the interrupt-controller goo formerly
  in ip2x.c.
* unify the CPU interrupt handler, with CRIME, INT2, and the various timer
  handlers hooked in via pointers in the platform struct.
* eliminate ip2x.c and ip32.c.  After the interrupt handler cleanup, the
  actual platform-dependent code was so minimal (rev identification, mask level
  initialization) that it made sense to move it into machdep.c
* "#ifdef DEBUG printf("foo"); #endif" becomes aprint_debug.

Tested on my ip22 and ip32.  Discussed with pooka@, rafal@.
2004-01-18 00:47:21 +00:00
pooka
6e2ad2392e Remove historic remnant that treated the O2 load address as the
sgimips standard.  Define it in the respective config file.
2004-01-15 08:53:42 +00:00
pooka
60b4d7ab8d Replace prehistoric comment "Indy" with something a bit more current 2004-01-15 08:46:31 +00:00
pooka
f78de077a8 The O2 has a PCI slot, add opencrypto.
Brush up some comments a bit while in here.
2004-01-15 08:45:12 +00:00
sekiya
58a060c797 Assign memory controller-dependent watchdog reset functions to
platform.watchdog_reset.
2004-01-13 14:31:37 +00:00
sekiya
986c9703a5 Switch DMA sync function initializer to _bus_dmamap_sync_mips3 to keep things
aligned with previous MIPS1/MIPS3 differentiation.
2004-01-13 14:30:43 +00:00
sekiya
4598391267 The watchdog timer is a function of the memory controller on all SGI platforms.
Add to the machine struct.
2004-01-13 14:18:56 +00:00
sekiya
ffc95bbe6e As the platform-specific bus reset routine varies based on the memory
controller used, set it in the memory controller driver rather than the
platform init code.
2004-01-13 13:05:17 +00:00
sekiya
e5d4293223 Call sgimips_bus_dma_init() in mach_init to set up the proper MIPS1/MIPS3
bus_dma_sync() routine.
2004-01-13 12:57:24 +00:00
sekiya
9c531ea057 Add IP12 subtypes. From Steve Rumble. 2004-01-13 12:30:23 +00:00
sekiya
8507d232d3 Add a call to ip1x_init(). 2004-01-13 05:51:07 +00:00
sekiya
a72de90260 Implement bus routines for MIPS1 processors. Originally from Steve Rumble,
massaged by pooka@.
2004-01-13 05:47:09 +00:00
sekiya
95e98b18f7 Back out hasty previous commit -- bitwise arithmetic does not always match
integer arithmetic, as demonstrated in this case.
2004-01-12 12:50:07 +00:00
sekiya
1c3c44683b Wrap more mips3_ operations in MIPS3 defines. 2004-01-12 12:32:00 +00:00
sekiya
67770bc1a4 Add pic attached at mainbus (for IP12). 2004-01-12 12:15:05 +00:00
sekiya
e0c8a0088c mips3_* functions aren't available when MIPS3 is not defined, so provide
MIPS1 workalikes (which, for the _8 routines, discard the top 32 bits).
2004-01-12 12:12:24 +00:00
sekiya
09d9a0fb59 Add pic (memory controller for IP12) driver. Originally written by
Steve Rumble, with mostly stylistic changes by myself.
2004-01-12 12:07:06 +00:00
sekiya
f04e7368ea Completely commit to bitwise operations. Instigated by simonb@ 2004-01-12 11:53:31 +00:00
sekiya
a02b828c6e Change one more multiplication to a bit shift. Pointed out by pooka@. 2004-01-12 11:30:24 +00:00
sekiya
74e150c7b1 CRIME revision 1.1 has a bug that affects PIO operations to/from the MACE.
The recommended workaround is a 5-10ms delay before and after accesses.
Therefore, move the affected bus_space_* operations from bus.h to bus.c
and special-case MACE accesses.

CRIME accesses are not affected, so introduce SGIMIPS_BUS_SPACE_CRIME and
use it as the CRIME tag.

My ip32 seems a little bit happier with this change, and my ip22 didn't
notice the change.
2004-01-12 03:30:51 +00:00
sekiya
bb9d36c069 ANSIfy, and change a multiplication operation to a bit-shift. 2004-01-12 03:26:08 +00:00
sekiya
c7e23cc3fe Checkpoint if_mec work (just in case I get hit by a bus). This driver is still
not operational.  The MII code mostly works, DMA data structures are defined
and allocated, but tx/rx logic is missing.
2004-01-11 14:01:46 +00:00
sekiya
69911c67f2 Reinstate symbolic device names -- I completely forgot about their use.
Reminder courtesy soren@
2004-01-11 01:48:46 +00:00
sekiya
f3a4be9263 Bus-spacify ip2x core logic. Eliminate magic numbers.
co
2004-01-10 05:22:09 +00:00
sekiya
aa7367bc4b Add register definitions for INT2 interrupt controller. 2004-01-10 05:16:57 +00:00
sekiya
280b50a365 Add watchdog and bus error handling functions (these features live in
IMC space, thus should be handled here rather than in ip2x.c)
2004-01-10 05:00:50 +00:00
sekiya
60573f92d1 Clean up console device selection logic. 2004-01-10 03:18:23 +00:00
sekiya
937db2de33 de-__P, sprinkle some KNF. 2004-01-10 02:55:54 +00:00
sekiya
c370623a7a Add framework for gio card identification based on product ID. devlist2h.awk
was borrowed from sys/dev/pcmcia.
2004-01-10 02:26:44 +00:00
sekiya
b8166ca397 bootinfo is problematic on ip2x under certain circumstances. Disable for now. 2004-01-03 10:29:37 +00:00
sekiya
5b343c479b Streamline bootinfo logic. 2004-01-03 10:28:18 +00:00
lonewolf
d6fda0fcbb Rework the memory detection routine to handle cases where kernel doesn't
fit inside one memory chunk.
Leave 1 page before kernel untouched as that's where our initial kernel
stack before we switch to proc0 stack is (fixes boot problems on my Indy
with small kernels).
2004-01-03 04:26:34 +00:00
sekiya
a1f8b0618b Wire down zsc/zstty mapping and add commented-out entries for
IP20 keyboard/mouse.
2004-01-02 01:39:25 +00:00
sekiya
aa9d797070 IP20 has two z8530 chips -- one at 0xd00 for keyboard/mouse, one at 0xd10
for serial ports.  Attach the former as zs1 to keep serial console goo as
simple as possible.
2004-01-02 01:04:46 +00:00
sekiya
f2bccdeea4 Add trailing newline. Noticed by Steve Rumble. 2004-01-02 00:41:23 +00:00
sekiya
f8c37f800f Don't panic when attempting to share interrupts on ip2x -- just print an
informative message and gracefully return.
2004-01-01 13:32:30 +00:00
sekiya
93f0e8c8a0 It's important to use good quality cables when working with SGI serial ports.
Enable zs console for IP20.
2004-01-01 13:29:08 +00:00
sekiya
d721fc82ce Force ARCS console for IP20 until the console-on-zs crashing problem is
fixed.  Store the board revision for future use, while we're at it.
2003-12-30 23:56:19 +00:00
sekiya
1cf4c96f39 Don't flush caches here. Fixes crash on IP20 (which apparently occurs only
with beta Blackjack boards that incorporate ARCS V1).
2003-12-30 23:50:25 +00:00
sekiya
a072684caa Adapt if_sq to HPC abstraction layer. It took both Steve Rumble and myself
to untangle the unhappiness that arises from the design differences between
HPC1 and HPC3.
2003-12-30 23:48:07 +00:00
sekiya
52063657cc Force little-endian mode on hpc1, and attach zs on IP20. 2003-12-30 23:45:25 +00:00
pk
70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
sekiya
bc5774497e Fixes to HPC abstraction layer from Steve Rumble:
- hpc1_hdd_{ctl,bufptr} and hpc3_hdd_{ctl,bufptr} are
          established in hpcreg.h. All references to these fields
          are updated with the exception of if_sq: (haltwo,
          hpcdma). This makes reading the code and spotting bugs
          easier.
        - hpcdma.c was applying EOCHAIN to the wrong descriptor
          word for the hpc1 case.
        - I added scsi_max_xfer to the abstraction layer, and it
          allows some crusty #defines in wdsc.c to be removed.
          hpc1 now doesn't waste descriptors as it once did.
        - hpcreg.h was updated to reflect the lack of XMITDONE
          bit in hpc1. HPC1_REV15 added for a test in hpc.c
        - hpc.c now verifies HPC1 revisions (1.0 vs 1.5) and
          prints the output a little prettier ;)
        - power interrupts shouldn't establish on non-IP22
          platforms.
2003-12-29 06:33:57 +00:00
sekiya
8a08952e14 Fix typo ("ARCBIOS_MEM_ExecptionBlock"). From Steve Rumble. 2003-12-29 06:26:41 +00:00
sekiya
af4ac18e50 Introduce abstraction layer for HPC registers and values, which addresses the
divergence between HPC revision 1.5 and revision 3.

The wdsc driver has been updated to reflect this layer (and may now work on
IP20).  The sq driver needs a bit more work before it can be committed.
2003-12-16 11:59:04 +00:00
sekiya
c7a0d0b9f4 iocreg.h has moved. 2003-12-16 10:20:10 +00:00
sekiya
b91ae185fb A slighly more descriptive iocreg.h now lives in ../ioc. 2003-12-16 05:27:40 +00:00
sekiya
a51a4e0a69 Part two in the Great Renaming. ip22.c becomes ip2x.c, and all generic ip2x
routines become ip2x_*.
2003-12-15 13:02:28 +00:00
sekiya
01a7cd0853 Change all IP22 preprocessor conditionals to IP2X preprocessor conditionals.
Part one of two -- part two will be renaming ip22_*() to ip2x_*().
2003-12-15 12:48:37 +00:00
sekiya
441e82538f IP20 belongs to the IP2x family, thus this should no longer exist. 2003-12-15 12:34:56 +00:00
sekiya
90e0aa001b Add ioc driver to IP2x config file, pull in ioc/files.ioc as well. Note that
IP2x now has blinkenlitzen.
2003-12-15 10:26:38 +00:00
sekiya
3568a47283 Move IOC-specific initialization code from sgimips/ip22.c to ioc/ioc.c. 2003-12-15 10:24:47 +00:00
sekiya
aa10d0203e Add dedicated IOC (I/O Controller) driver. pckbc, zstty, and lpt will each
receive *_ioc.c attachments; machines without IOC (i.e., IP20) will use *_hpc.c
stubs.
2003-12-15 10:23:52 +00:00
lonewolf
bf0b94a750 Add pckbc/wscons/newport related attachments. 2003-12-15 05:29:20 +00:00
lonewolf
280382edf9 Add support for attaching newport/pckbc as console on IP22 (Indy).
XXX Does this work on Indigo2 too?
XXX Ugly hardcoded bus_space_tags and stuff.
XXX This whole file is one damn ugly mess.
2003-12-15 05:28:14 +00:00
lonewolf
613491354d Implement direct configuration for GIO devices.
XXX Still needs a way to handle Indigo2 spurious "productid 0x04 revision 0x00"
XXX phantom devices.
2003-12-15 05:26:56 +00:00
lonewolf
3e256e53b0 Support for SGI NG1 ("newport") graphics controller. 2003-12-15 05:24:51 +00:00
sekiya
a15d89e48a Move IOC (integrated peripheral controller) init code into the IP22-specific
routine, as IP20 does not possess an IOC.  This will eventually be moved into
a dedicated IOC driver that attaches its peripherals as children, but the
changes involved are too intrusive right now.
2003-12-14 07:53:10 +00:00
sekiya
3e021de39c Uncomment dpclock, remove IP20 option. IP20 now boots as far as the
boot device selection prompt using the GENERIC kernel.
2003-12-14 07:31:02 +00:00
sekiya
fa349eb13c Allow hpc to attach on IP20. 2003-12-14 07:28:17 +00:00
sekiya
264219f697 Bus-space'ify the memory controller driver, and add IP20-specific bits. 2003-12-14 07:21:51 +00:00
sekiya
4aeb14dce4 IP20 should handle the watchdog timer in the same manner as for IP22. 2003-12-14 06:11:35 +00:00
sekiya
8302dd42e0 The serial controller on IP20 lives in a different place. Modify
zs_get_chan_addr() to reflect this.

XXX hardcoded addresses are quite distasteful.  This should be passed in
through consinit() -- to avoid conflicts with Ilpo's soon-to-be-committed
framebuffer driver, I'll hold off until his code hits the tree.
2003-12-14 05:59:50 +00:00
sekiya
6f71ce82f5 For the purposes of machdep.c, consider IP20 to be a variant of IP22. ip20.c
and #ifdef IP20 will go away (short-term), ip22_* will be renamed to ip2x_*
(slighly longer-term).
2003-12-14 05:49:14 +00:00
sekiya
f9ff3d87e9 The ARCBIOS->FlushAllCaches() vector is NULL on at least one SGI platform
(ip20) and has no actual operational effect, thus it should not be invoked here.
2003-12-14 05:33:22 +00:00
sekiya
f2b161aa21 Compile sgimips/ip[23]2.c iff the corresponding IP[23] is defined in the
config file.
2003-12-14 05:23:12 +00:00
jmc
695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
lonewolf
49e806d166 sgimips lives in the new-style wscons land. 2003-12-10 00:24:21 +00:00
lonewolf
b57c3a57f9 Make this compile and apparently work (it generates interrupts properly, at
least).
XXX The is_console test is horribly ugly but necessary for the pckbc_cnattach
XXX coming soon.
2003-12-10 00:22:29 +00:00
lonewolf
3fe422af98 Garbage collect unused file. 2003-12-10 00:18:07 +00:00
lonewolf
8d097bc535 Remove the extra call to consinit(). 2003-12-10 00:00:51 +00:00
keihan
29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
lonewolf
803a8479e6 Replace some magic numbers by symbolic constants. 2003-12-04 05:31:27 +00:00
sekiya
20d207b125 Add (commented out) dpclock for ip22 and blinkenlitzen for ip32. 2003-11-22 15:08:44 +00:00
sekiya
f93f583751 Register definitions for National Semiconductor DP8573A RTC. Code originally
from Steve Rumble, with modifications by myself.
2003-11-22 04:01:01 +00:00
sekiya
8e5c74aa34 Add dpclock driver (and minimal hpc1 goo) for ip20. 2003-11-22 03:58:52 +00:00
sekiya
a7c36d873f Add dpclock driver (and minimal hpc1 goo) for ip20. Code originally
from Steve Rumble, with modifications by myself.
2003-11-22 03:58:51 +00:00
sekiya
6cd8f56df9 Add ip20.c 2003-11-22 03:39:35 +00:00
sekiya
d11f147850 Add initial ip20 (Indigo) support. hpc1 code to follow. Code originally
from Steve Rumble, with modifications by myself.
2003-11-22 03:35:44 +00:00