Commit Graph

778 Commits

Author SHA1 Message Date
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
sekiya
53acd623c8 Add pckbc to device list. 2003-11-20 08:34:05 +00:00
sekiya
b26a57f648 Add driver for pckbc at hpc. There's an interrupt issue that still needs
to be resolved.
2003-11-20 08:31:13 +00:00
sekiya
b4a9ea3c2d ip2x can't handle four-meg ramdisks; use a three-meg ramdisk instead and
compile the kernel with -Os.
2003-11-20 05:27:07 +00:00
keihan
0714799990 www.netbsd.org -> www.NetBSD.org 2003-11-17 10:07:58 +00:00
sekiya
014a2cd0f4 Rationalize the machine-links creation mechanism. 2003-11-17 09:32:58 +00:00
sekiya
466d2c1848 libsa's iso9660 routines don't handle rockridge. Alter installation kernel
fixup routines accordingly -- we'll use "ip2x" and "ip3x" for install kernel
names rather than "netbsd-INSTALL32_IPxy".
2003-11-13 14:31:54 +00:00
sekiya
c93054ffbf typo in include directive. 2003-11-13 12:53:05 +00:00
sekiya
959569cd0c bootloader targets have changed, which confused the install rules. 2003-11-13 12:42:18 +00:00
sekiya
40c0a4c30b loadfile truth check should be >=0, not >= 1. 2003-11-13 08:06:25 +00:00
sekiya
1ba2b99e3e More bootloader changes:
* if loading from cdrom, assume we're performing an install and
	  fix up bootpath/kernel to load the proper install kernel.
	* maximum filename length in volume header is eight characters.
	  Change boot.elf to ip2xboot, boot.ip32 to ip3xboot, and boot
	  to aoutboot (which matches kernel naming scheme as well).
2003-11-13 08:01:17 +00:00
sekiya
2818624aab Include proper GENERIC32 templates (mechanical edit). 2003-11-13 02:59:37 +00:00
sekiya
28bee58d65 Rationalize config file scheme. Discussed at length with rafal@, pooka@, soren@. 2003-11-13 02:31:46 +00:00
sekiya
b3023f06a5 Rework the boot loader:
* remove dead code,
	* streamline kernel selection logic,
	* various small bugfixes.
2003-11-11 06:47:00 +00:00
sekiya
fdf5374e91 Remove unused variables. 2003-11-11 06:42:15 +00:00
sekiya
f87a5a5324 Add getopt.c 2003-11-11 06:28:15 +00:00
sekiya
0a6f939a3d Avoid namespace collision when sgivol is compiled as a native application. 2003-11-08 04:59:00 +00:00
sekiya
4f800421dd Use be*toh() and htobe*() to permit use in cross-build environments. Add -h flag to override default volume header size. 2003-11-01 06:30:44 +00:00
matt
22b4a90181 Fix another lasttx uninitialized variable 2003-10-30 23:05:56 +00:00
matt
88810a30df Fix uninitialized variable warning. 2003-10-30 23:05:07 +00:00
lukem
f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
sekiya
6daa011b5a NULL -> 0 2003-10-26 03:30:26 +00:00
chs
0e9360f160 NULL -> 0 2003-10-25 16:15:07 +00:00
simonb
916e13afc6 Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
2003-10-25 13:21:13 +00:00
jdolecek
694c204404 add major for 'ses' for archs which have the other scsi devices 2003-10-24 08:09:53 +00:00
tsutsui
3a646e9b6c Add some delay before calling comcnattach() to wait
previous console output to complete.
2003-10-17 18:15:52 +00:00
tsutsui
19e183345a Add vr at pci and dmphy at mii. Tested on my O2. 2003-10-17 17:18:16 +00:00
sekiya
a747a8f16d Mouse port offset was incorrect. 2003-10-17 12:43:08 +00:00
sekiya
af12cdb68a Compile dsclock_hpc.c only if dsclock is present in config file. 2003-10-17 06:49:34 +00:00
jdolecek
ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek
4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
simonb
970b12080e Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
2003-10-08 01:40:22 +00:00
tsutsui
608b19ae28 Use proper mips_dcache_{wb,inv,wbinv}_range() ops in dmamap sync function
if possible. Tested on my O2 (with r5ksc patch).

XXX should we apply similar changes to mips/bus_dma.c and use it?
2003-10-07 16:03:09 +00:00
tsutsui
fd316d7ac1 Use proper macros. 2003-10-07 14:37:06 +00:00
tsutsui
086016d756 Add pcn at pci, tl at pci and tlphy, which I've confirmed working on O2. 2003-10-05 15:44:36 +00:00
tsutsui
b0cd3c8093 Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
2003-10-05 15:38:08 +00:00
jdolecek
e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
tsutsui
d788e7c9ec - some KNF
- hz -> Hz in printf
2003-10-04 09:41:27 +00:00
tsutsui
d330e7b609 TAB/space cleanup. 2003-10-04 09:19:23 +00:00
tsutsui
1d11374304 Cast through (void *) to appease gcc3. 2003-09-28 13:02:18 +00:00
tsutsui
7f019aacfd - Remove (commented out) options COMPAT_ULTRIX, which is not usable on mipseb.
- Fix (commented out) obsolete options MINIROOTSIZE.
- space/TAB cosmetics
2003-09-28 12:56:09 +00:00
tsutsui
026b6946bd Fix typo. From Christopher SEKIYA. 2003-09-28 08:21:08 +00:00
tsutsui
992acd3aab Add options COMPAT_16. 2003-09-28 07:39:48 +00:00
he
772b1d9073 Allow kernels without the haltwo driver configured to build, i.e.
make the driver optional by adding the haltwo attribute.
2003-09-27 21:11:21 +00:00
lonewolf
c8d69e8d1c Attach haltwo on Indigo2 machines also, it reportedly works on them. 2003-09-26 16:58:06 +00:00
lonewolf
3111a2e6ea Support for HAL2 audio controller attached to the HPC ASIC, found on SGI Indy.
The driver is not too heavily tested and only supports audio playback and
master volume setting currently.
2003-09-25 16:35:50 +00:00
lonewolf
b06ea56eff Fix mistake in previous. 2003-09-18 15:01:33 +00:00
lonewolf
ae33e68d84 Correct offsets for HPC_PBUS_CHx_{BP,DP} and add HPC_PBUS_DMACTL_* definitions. 2003-09-18 15:00:26 +00:00
simonb
9d585c89bb Use common mips generic software interrupt routines.
Changes from Izumi Tsutsui, tested by Havard Eidnes.
2003-09-15 06:39:20 +00:00
chs
c023b4180f add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
2003-08-30 22:44:38 +00:00
itojun
4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
itojun
3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
thorpej
063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
lukem
ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
drochner
1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
fvdl
7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
thorpej
0eff671820 Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
2003-06-14 17:01:06 +00:00
thorpej
e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
gmcgarry
1cdac66ee5 Add commented-out wsfont (same as wsdisplay). Addresses PR#18388. 2003-05-04 01:36:53 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
dsl
d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
ragge
d8c8fa8111 Add pseudo-device ksyms. 2003-04-26 14:10:04 +00:00
ragge
69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
ragge
766d04f56a Add ksyms device major. 2003-04-25 21:10:46 +00:00
christos
b9f9db3ca2 Bye Bye UCONSOLE 2003-04-10 22:06:51 +00:00
he
6a6aa0e6ca Track the SBSIZE -> SBLOCKSIZE rename after the UFS2 merge. 2003-04-08 06:54:24 +00:00
rafal
42dea81851 If booted device starts with pci(N), strip it off; also, compare strncmp()
result to 0, not NULL.  This gets the O2 figure out what device it's been
booted off correctly mow.
2003-04-04 04:27:29 +00:00
thorpej
c9228c8ddd Use PAGE_SIZE rather than NBPG. 2003-04-02 04:17:50 +00:00
rafal
0adc6315a0 Oops, make sure to re-enable the IP32 watchdog correctly, else we end up
getting random reboots after returning from DDB.
2003-03-31 00:56:53 +00:00
rafal
090fac3d8b Update for devopen() change. 2003-03-17 03:07:14 +00:00
rafal
5bd093cfbd If the boot device starts with a PCI bus spec, skip over that when looking
for a boot device type; this gets the boot.ip32 booting a kernel off disk.

While here remove some unrolled string compares in favor of strncmp() to
make code more readable.
2003-03-17 03:04:51 +00:00
perseant
eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
simonb
3a93f29238 Update for LFSv2 support. Ports that have "bootxx_lfs"-style
bootblocks currently only support LFSv2, but the second level
"boot" program supports both LFS versions.
2003-02-23 23:23:07 +00:00
nakayama
e3e4805068 Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
2003-02-05 13:57:50 +00:00
pk
be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
kent
cd7d9faeaf Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it. 2003-01-28 01:07:51 +00:00
rafal
c1ff3ce973 Fix a bug that would cause the PCI fixup to assign addresses beyond the range
of KSEG0/1 mappable PCI window (the MEG_ALIGN macro was aligning to *16* MB
instead of *1* MB due to an extra 0 in the round-to constant).  Also, allow
the PCI code to fix up all functions of a multifunction device; both from
Chris Sekiya, with a bit of massaging by me.
2003-01-19 23:08:54 +00:00
rafal
48eb4573c0 Parse out flags passed to the kernel on boot; from Scott Taylor, tweaked to
use the MI boot_flags.h interface by me.
2003-01-19 22:36:00 +00:00
rafal
2eef5c9ba8 Turn on more of the PCI interrupts; from Chris Sekiya. 2003-01-19 22:33:20 +00:00
rafal
6c79dcd0e4 Update to use the full DS1687 register set, therefore allowing the clock to
store absolute year rather than an offset -- this means the clock is now
consitent across the ARCS PROM, IRIX and NetBSD.

XXX: This attachment is now a mismoner, since it's a Dallas Semi RTC, not
a Motorola RTC.  Should be renamed.
2003-01-19 22:26:38 +00:00
rafal
0c4b06c362 Add pci/usb/audio devices; from Chris Sekiya. 2003-01-19 22:23:03 +00:00
rafal
537bf9a526 Change DS1286 definitions to start with DS1286_ rather than DS_ so these and
DS1687 definitions are easier to distinguish.
2003-01-19 22:20:43 +00:00
thorpej
f91b0bb3f2 Merge the nathanw_sa branch. 2003-01-18 06:23:28 +00:00
bouyer
15c016cd08 When padding frames smaller than ethernet minimum size, make sure we supply
a buffer long enouth, with the padding bytes initialised.
Also pad to ETHER_MIN_LEN - ETHER_CRC_LEN, not ETHER_MIN_LEN (padded frames
were 4 bytes too long).
2003-01-13 17:13:10 +00:00
rafal
30d29f647c Simplify CRIME rev. calculation (we don't appear to need the low nibble). 2003-01-10 20:39:22 +00:00
rafal
5c114e8d30 Get rid of some extraneous declarations/comments. 2003-01-10 03:48:40 +00:00
rafal
0cc0813590 Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k.  If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.
2003-01-10 03:22:48 +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
rafal
b892fa21e2 There's no cache_r5k.h yet, so don't try to include it. 2003-01-06 06:25:32 +00:00
rafal
0098f248ba PCI fixup code for the O2. Tested with a range of 32 and 64-bit network
cards, but not much else.  Seems to work fairly well, though.
2003-01-06 06:21:11 +00:00
rafal
c21021e6fb Improve the interrupt code somewhat by having callers of xxx_intr_establish
pass in an interrupt handle (which is currently to the CRIME interrupt the
device is attached to) so the interrupt handlers know which device was the
one looking for attention.

While here, fix up PCI interrupt routing for both the on-board devices and
the PCI slots -- even though there is only one PCI slot in the chasis, the
hardware can accomodate up to three and provides an interrupt mapping for
all the PCI interrupt pins for both the internal SCSI & PCI slot and the
two "extra" slots.
2003-01-06 06:19:40 +00:00
rafal
b0e9963d23 Don't shift the pending interrupt bitmask passed to crime_intr() so it can
associate pending interrupts with the proper sources.  Add some comments to
the vestigal ip32_intr_establish() on what it really *should* do.
2003-01-06 05:59:34 +00:00
rafal
1e74cf4267 Postpone DDB/KGDB init until we know the machine type, so the debugger can
be attached to the right place, twiddle the right watchdog registers, etc.
2003-01-06 05:56:00 +00:00
rafal
3021da226f Cosmetic fix -- move __HAVE_MIPS_MACHDEP_CACHE_CONFIG to "MIPS specific
options" section.
2003-01-03 10:30:00 +00:00
rafal
0cff9e28dc Checkpoint of O2 work by Chris Sekiya and myself. This is the sgimips bit;
still needs some arch/mips support code before it will fully work.
2003-01-03 09:09:21 +00:00
rafal
b983746705 Also remove `options MIPS3_5200' since nothing uses it ATM. 2003-01-03 08:18:20 +00:00
rafal
2d6f1ac150 The Tigon driver is known to have issues on BE systems, so remove it (I got
the card probed & attached, but had to hack the driver source to even get
it that far and it had issues after that which made me punt on it).
2003-01-03 08:14:44 +00:00
rafal
f2c485b280 Move console setup after we've determined machine type so the console init
code can guess where to find a console depending on machine type.
2003-01-03 06:26:06 +00:00
rafal
fe84d50d7e Mark the CRIME/MACE register twiddling done after autoconfig with an XXX so
it gets cleaned out when the interrupt registration code is capable of doing
the interrupt mask setup itself.
2003-01-03 06:24:18 +00:00
pooka
fb4bf2a901 * tweak CRIME and MACE interrupt masks for IP32 and add some verbosity
* recognize ahc scsi as a boot device

once again thanks to Chris Sekiya
2003-01-02 15:08:18 +00:00
thorpej
dca15fc8c2 Use aprint_normal() for cfprint routines. 2003-01-01 02:10:08 +00:00
pooka
bca1052dab on second thought... make this also compile 2002-12-28 16:44:36 +00:00
pooka
00ddd0deec add timer calibration
from Chris Sekiya
2002-12-28 16:40:48 +00:00
pooka
30d4a8344b sync with mecreg change, ie. make this compile 2002-12-26 22:25:12 +00:00
pooka
a0c298e366 brush up situation with mec register definitions
from Chris Sekiya
2002-12-26 22:24:46 +00:00
pooka
c99132ebb0 Shuffle network interface and phy drivers into alphabetical order and
add comments for them.
2002-12-26 18:26:07 +00:00
pooka
87a74ecee8 Use crimereg.h definitions for the crime dog. Also, move watchdog
disable down the very last possible place in cpu_reboot.

from Chris Sekiya
2002-12-23 21:04:23 +00:00
pooka
8ecf5692ac add bus_space_vaddr()
from rafal
2002-12-23 20:41:47 +00:00
pooka
0dd7013e7a MACE register definitions
from Chris Sekiya
2002-12-23 20:05:06 +00:00
pooka
b31b740c2b CRIME register definitions
from Chris Sekiya
2002-12-23 20:04:22 +00:00
pooka
1fcaee0848 add debug printf
from Rafal
2002-12-23 19:49:27 +00:00
pooka
2f32342d20 also create boot.ip32 with the entry point set to the IP32 load address
from Chris Sekiya
2002-12-23 19:31:24 +00:00
pooka
fb83173bb6 add some ethernet interfaces
from Chris Sekiya
2002-12-23 19:18:34 +00:00
lukem
7f7f9da211 minor delint 2002-12-13 02:36:37 +00:00
simonb
6a5e492b57 Remove the explicit `makeoptions MACHINE_ARCH="mipse{b,l}"' for kernel
builds and use the endianness of the toolchain being used to determine
the endianness of the kernel.
2002-12-09 22:54:09 +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
wiz
e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
thorpej
9972dfbbbf Add "-mno-abicalls" to AFLAGS. Add "-ffreestanding -msoft-float" to
CFLAGS.
2002-11-10 17:12:58 +00:00
thorpej
73f78d5e61 Fix signed/unsigned comparison warnings. 2002-11-09 18:52:20 +00:00
thorpej
a1ef3f204e Avoid a strict-aliasing warning from GCC 3.3. 2002-11-09 18:49:02 +00:00
jdolecek
c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
junyoung
e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
elric
5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
rafal
5ad5ca60a5 Memory and I/O space accesses to MACE PCI address ranges are passed through
in the correct byte order, so there's no reason to byteswap them.
2002-10-10 18:16:40 +00:00
provos
2f7a0aaac8 add SYSTRACE; approved perry. 2002-10-06 02:11:54 +00:00
elric
d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
thorpej
89bf5a8f8e Add trailing ; to CFATTACH_DECL. 2002-10-02 15:52:22 +00:00
thorpej
b96bc0d7bc Use CFATTACH_DECL(). 2002-10-02 04:06:36 +00:00
thorpej
0dac35b547 Use CFATTACH_DECL(). 2002-10-02 02:00:07 +00:00
thorpej
217c799fe7 Use CFATTACH_DECL(). 2002-10-01 21:24:43 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +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
c75e60ed75 Get the pointer to the driver name early, rather than constantly
deferencing the cfdriver pointer.
2002-09-26 20:45:42 +00:00
thorpej
71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
martti
81e8d78cd4 Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK" 2002-09-25 11:49:48 +00:00
martti
3b553bac54 Added (commented out) IPFILTER_DEFAULT_BLOCK. 2002-09-20 10:39:48 +00:00
lukem
3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
thorpej
139cdc3125 Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
2002-08-25 20:21:33 +00:00
briggs
0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
simonb
fef76c7e26 Use a __HAVE_BOOTINFO_H define to check for bootinfo support instead of
speading port names in arch-dependant code.
2002-08-05 02:13:14 +00:00
gmcgarry
3647e0d293 Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.
For now, only pmax implements CPU_BOOTED_KERNEL.  Need to revisit.
2002-08-04 01:41:23 +00:00
thorpej
3912e469dd Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device.  While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
2002-07-19 16:38:14 +00:00
rafal
695a5c114c Cleanup and enhancements to sgivol, mostly from Scott G. Taylor, with some
tweaking by me.  Specifically, this gives sgivol an "unattended" mode that
can be used from eg. sysinst to install the bootblocks.
2002-07-18 16:02:42 +00:00
rafal
653e0b546e Fix boot device detection in the face of multiple SCSI controllers. This
isn't perfect (the NetBSD device units must match ARCS device numbers), but
it's better than randomly matching one of the devices.  Fixes PR 16584 from
Scott G. Taylor.
2002-07-15 04:38:59 +00:00
rafal
fa5c0332f8 Fix PR port-sgimips/17568: the PROM on early Indigo2 machines did not like
the ECOFF version of boot produced by `objcopy'.  Using elf2ecoff make it
work, so use that instead.  Also, don't bother stripping the bootblocks on
install (as that confuses strip, at least for the ECOFF one, and since the
build already strips them).
2002-07-12 13:04:03 +00:00
christos
3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
lukem
fde6ae6f04 Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
2002-06-17 05:14:02 +00:00
manu
eae183fa32 Added COMPAT_LINUX and COMPAT_ULTRIX (commented out) 2002-06-16 21:03:36 +00:00
manu
e7be1a51a5 Commented out COMPAT_IRIX in GENERIC kernels, because it is still
quite experimental.

Added irix_kmem and irix_usema pseudo devices which are used by
IRIX binary compatibility (commented out for now)
2002-06-16 20:54:28 +00:00
simonb
6b6e4f4f60 Simplify include files that just include <mips/locore.h>. 2002-06-05 06:18:34 +00:00
simonb
9cc65a96d0 3 ports are now using the reciprocal count divisor code now, move it
to <mips/cpu.h>, and add MIPS_SET_CI_RECIPRICAL and MIPS_COUNT_TO_MHZ
macros to use it.
2002-06-04 05:42:41 +00:00
drochner
d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
manu
c56a07ad1c Added an irix_machdep.h (in the future, COMPAT_IRIX will be available on
several MIPS architectures)
2002-05-22 04:59:45 +00:00
rafal
3ac921616c Make sure to read from stdin, not stdout. From Scott Taylor. 2002-05-21 21:53:35 +00:00
rafal
722dca8509 Turn kernels into ecoff as well by default. 2002-05-21 21:01:34 +00:00
rafal
a5a7e0f25c Add RAMDISK kernels for installation. 2002-05-21 21:00:35 +00:00
manu
17f9f77621 Filling tables for device 62 (irix_usema) where it was missing 2002-05-21 06:35:08 +00:00
thorpej
204183c0fa * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses.  For busses behind a bridge, it points to
  a persistent copy of the bridge's pcitag_t.  This can be very useful
  for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
  uses OFW device nodes to enumerate the bus.  When a PCI bus that is
  behind a bridge is attached, pci_attach_hook() allocates a new PCI
  chipset tag for the new bus and sets it's "curnode" to the OFW node
  of the bridge.  This is used as a starting point when enumerating
  that bus.  Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
2002-05-16 01:01:28 +00:00
thorpej
dada8613e1 Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
2002-05-15 19:23:51 +00:00
soren
fa3bdb57ba Add some codenames. 2002-05-14 16:21:47 +00:00
pooka
95af0aba23 include GENERIC, set TEXTADDR right 2002-05-14 15:42:25 +00:00
pooka
fe422abe40 a real version of GENERIC 2002-05-14 15:38:43 +00:00
soren
f514efc600 Make the build machinery happy for now. 2002-05-13 01:26:27 +00:00
pooka
6562508c4b Make INDY the Indy config file
Add DRAKEN as a model of what to do with the O2 (effectively the same
file as the old INDY)
2002-05-08 13:52:17 +00:00
pooka
ca3ea88b7a add mcclock 2002-05-04 20:06:49 +00:00
rafal
4cebb807c9 Cosmetic change. 2002-05-03 01:51:38 +00:00
rafal
2eece4af5f Update copyright dates. 2002-05-03 01:49:21 +00:00
rafal
c92f3647a4 Fix up clock interrupt accounting for the sgimips port -- make sure
to schedule clock interrupts at a fixed interval, rather scheduling
the next one based on the time of the arrival/servicing of the previous
clock interrupt.  Also, pick up a trick from the sbmips port to convert
a division in ip22_clkread to a multiplication, since those are much
cheaper -- the details of that are described in Simon's commit (see
Message-Id: <20020306073437.1D2A8B004@cvs.netbsd.org>).  Thanks to
Jason Thorpe and Dominic Sweetman's "See MIPS Run" (where I found
mention of this very subject while looking for something totally un-
related! 8-) for the clue about the source of the timekeeping problems.

For the IP32, where we have no clock-calibration code yet, use the CPU
frequency provided by ARCS instead; it beats a hard-coded value!

As an added bonus, most of the CPU-clock related stuff is now collected
together in cpu_info_store, rather than as a collection of unorganized
global variables.
2002-05-03 01:13:54 +00:00
rafal
ab8f2fbc01 Add interrupt counter for Seeq interrupts; also, make sure to reset back to
"recieve only my frames & broadcasts" and clear the ALLMULTI flag if we have
no multicast addresses in our list.
2002-05-02 20:31:19 +00:00
rafal
1a73d72d3b If we handle multiple events from the zs chip in one interrupt, don't count
that as multiple interrupts.
2002-05-02 20:26:49 +00:00
rafal
e65d64e370 Since we don't have code to drive the L2 cache on R4600/R5k processors,
disable the L2 cache so at least things work (albeit more slowly) on
the SC versions of those chips.  Tested on a R4600 Indy and a R4400
Challenge S.
2002-05-02 18:00:40 +00:00
rafal
e9ca49cdee Fix nasty crashes on IP22 machines with console running at 38.4kbps (which
generally translates to "high interrupt load") -- the old code re-enabled
interrupts in the machine-specific hardware interrupt handler causing the
handler to be re-entered, possible multiple times.  Could lead to kernel
stack overflows, and all sorts of mysterious crashes/hangs as a result.

While here, fix up the IP32 interrupt handler code to also not re-enable
interrupts.

Thanks for ideas/comments go to Chuq and Stephen Ma.
2002-04-29 02:06:14 +00:00
atatat
d1b3852365 Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
2002-04-25 15:06:20 +00:00
manu
c7dcec33a1 Added IRIX /dev/usema and dev/usemaclone (void driver for now, will be
filled later)
2002-04-23 06:48:46 +00:00
rafal
7a25d8c7ba Add event counter for zs interrupts and attach and use it; also, get the
zs major number out of the cdevsw table rather than hardcoding it in zs.c.
2002-04-17 13:49:54 +00:00
thorpej
eedd94475c * Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
  the magic "files include order" dance in N machine-dependent
  configuration definitions.
2002-04-16 20:50:16 +00:00
wiz
5040dc6d7d Remove last(?) traces of pmsi. 2002-04-16 11:49:54 +00:00
gmcgarry
6e066ba77a Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
2002-04-12 08:10:45 +00:00
bouyer
e5727031fb Implement mstohz() as discussed on tech-kern, and use it in SCSI drivers
to convert xs->timeout to callout() parameter.
2002-04-05 18:27:45 +00:00
lukem
d213d804f7 Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
2002-04-02 05:30:34 +00:00
simonb
a85e214bda Make sure that private DMA flags don't overlap with standard DMA flags;
start these at 0x10000 to leave room for an increase in the latter.
2002-03-17 21:45:06 +00:00
martin
94881fb123 Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
2002-03-16 16:55:51 +00:00
manu
da6cdf1446 Added IRIX /dev/kmem emulation pseudodevice and SVR4 net pseudodevice 2002-03-15 17:29:06 +00:00
simonb
707b8da2e8 Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
2002-03-13 13:12:25 +00:00
simonb
22db14d9e1 All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
2002-03-13 02:55:10 +00:00
lukem
cd19d52695 * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
2002-03-10 19:56:37 +00:00
thorpej
a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
simonb
9bcc70fa1d Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
2002-03-05 09:40:38 +00:00
rafal
929d489997 In _bus_dmamap_sync, only invalidate as much data as there is in the current
segment rather than invalidating the total map length for each segment.
2002-02-27 01:51:48 +00:00
christos
6b030ee036 - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
2002-02-27 01:19:03 +00:00
simonb
d9ab16ba2f Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
  are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
2002-02-26 15:13:19 +00:00
wiz
37e458fa45 strategy should have an 'r'. Inspired by similar change in OpenBSD. 2002-02-19 17:09:40 +00:00
wiz
66df0333a1 s/seperate/separate/ 2002-02-11 10:44:38 +00:00
lukem
03bd9dc73f cosmetic reorder of #defines to match other ports 2002-01-28 23:09:54 +00:00
jdolecek
6d265bd894 add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
2002-01-27 13:23:08 +00:00