Commit Graph

274 Commits

Author SHA1 Message Date
manu 5f90ae55b5 Added clockctl 2002-01-12 14:52:40 +00:00
wdk c09d9a0d03 We now need ufs/ufs/dinode.h for ufs/ffs/fs.h
XXX:  All this work for BBSIZE and SBSIZE.  Sigh.

Add missing $NetBSD$ Header to file
2002-01-10 06:56:18 +00:00
thorpej e091c2afd1 Add -Dsgimips to CPPFLAGS. 2001-12-20 20:30:59 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
atatat b45c51b1fc Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
2001-12-09 05:00:40 +00:00
manu 55c08f5ede Back out the copy of theses files to userland 2001-11-28 20:13:34 +00:00
manu fa1e4588d9 We need to copy new SVR4 header files to /usr/include/sys... 2001-11-28 12:13:49 +00:00
manu a268e72f56 Add support for COMPAT_IRIX 2001-11-28 11:56:43 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
soren bf7d9c855e Adjust for dsclock name change. 2001-11-25 15:26:03 +00:00
soren 07992b8797 Forgot pooka's license header. 2001-11-25 15:13:53 +00:00
soren 45192487a5 O2 RTC attachment, based on code from Antti Kantee. 2001-11-25 15:05:04 +00:00
soren 7e84b9e1db Add wscons devices. 2001-11-22 04:50:04 +00:00
rafal 85cae1f6d1 If we already have a boot device set, don't reset the slot/unit/partition.
Now my Challenge S boots multiuser with the new bootloader without stopping
to ask for boot/root devices.
2001-11-22 03:15:35 +00:00
soren 6c3e025b46 Nuke cleandir target override. 2001-11-22 02:18:24 +00:00
soren 6e9ab4848f Respect OSLoadPartition even if it doesn't come before SystemPartition in argv.
Add a few comments about the above.
2001-11-22 02:06:32 +00:00
soren b63ced481c Note kernel load adress change. 2001-11-22 01:30:03 +00:00
soren 60ae71115a Change the kernel load address offset from 512K to 420K, the Irix
convention for debugging kernels.
2001-11-22 01:11:51 +00:00
thorpej b2fe046c8c Move the kernel forward in memory, starting it 512K in from the
bottom of RAM.  The bootloader is now loaded 2K in from the bottom
of RAM, so we need to make space for it.
2001-11-22 00:59:23 +00:00
thorpej aabfa72384 - Clean up the bootloader Makefiles somewhat.
- Build an ECOFF version of the bootloader as "boot".  As a temporary
  measure (due to a bug in libbfd which has not yet been fixed, but
  for which a work-around exists as a patch), install and ELF version
  of the bootload as well as "boot.elf".  "boot.elf" will go away once
  the toolchain issue is resolved.
2001-11-22 00:58:07 +00:00
thorpej 3975cecee7 - Adjust bootinfo to work sanely in an ARCS world, and pass some
info along to the kernel (currently just the symbol table info).
- Don't bother with the startprog dance; we don't need to do anything
  special, here, so just call the entry point directly.
- A bunch of random cleanup.
2001-11-21 23:33:17 +00:00
thorpej 38afb59582 - Check for provided bootinfo from the bootloader. If we find it,
save off DDB symbol table information.
- Make loading of memory work reliably with the bootloader; for each
  candidate memory type from ARCS (which now includes LoadedProgram),
  check to see if the kernel is within that chunk, and load the pages
  around it if it is.
2001-11-21 23:27:20 +00:00
thorpej 741c7a2997 sbic -> wd33c93, in preparation for the core driver going into
sys/dev/ic.
2001-11-21 23:22:25 +00:00
soren 482d429ddc Install loader in /usr/mdec. 2001-11-21 22:14:51 +00:00
soren 57bd30a92c s/pmax/sgimips/ in comments. 2001-11-21 22:13:55 +00:00
thorpej e2397b7f93 Change symtab info to unsigned longs. 2001-11-21 20:31:49 +00:00
thorpej 4b1d2d4ce9 Add bootinfo stuff for NetBSD/sgimips. Changes to kernel and bootloader
forthcoming.
2001-11-21 20:29:31 +00:00
thorpej 4e63f44f6c Initial cut at a bootloader for NetBSD/sgimips, by Michael Hitch. 2001-11-21 19:09:06 +00:00
thorpej bcc50e9703 Use strncmp() when looking up volume files. 2001-11-20 23:09:45 +00:00
thorpej c8f26da0bd - General code cleanup (and enable warnings).
- It's perfectly legal to have an 8 byte volume filename; the trailing
  NUL is not required in this case.
- Default the partition type to "4.2BSD", not "EFS".
2001-11-20 23:07:16 +00:00
rafal 52f4b0490c Stylistic fix to last. 2001-11-20 21:21:03 +00:00
soren 3f54e2c74f Add stand to SUBDIR. 2001-11-20 18:37:00 +00:00
soren 0f71151d6e stand Makefile. 2001-11-20 18:36:31 +00:00
soren 1e6da897d3 Michael Hitch's volume header tool. 2001-11-20 18:35:22 +00:00
soren 5ecc88dc2f Correct previous, pointed out by mhitch:
makebootdev() sets not booted_device but booted_protocol, so test for that.
2001-11-20 18:06:40 +00:00
thorpej f934d91c74 The 2nd SCSI controller is now supported; remove it from the TODO list. 2001-11-20 17:38:31 +00:00
rafal 6c04d91bae Post Jason's autoconfig cleanup, the DMA tags are actually passed in from
the parent, so we don't need to look at the innards of bus_dma anymore.
Also, remove the Todo item pertaining to autoconfig cleanup from the list
in the comments.
2001-11-20 16:10:49 +00:00
rafal c4596a56c0 Fix up Jason's last cleanup (thanks for that, btw!!)... Don't attach
hpc child devices that don't match our systype.  Attempting to attach
a wdsc1 on my Challenge S locks the box hard.
2001-11-20 16:09:00 +00:00
lukem 0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
lukem 03aef4723c cleanup:
options SPACE TAB
	makeoptions TAB
	psuedo-device TAB
	remove trailing whitespace
	replace multiple spaces -> tabs
	options "FOO" -> options FOO
	options "FOO=bar" -> options FOO=bar
	options "FOO=\"bar\"" -> options FOO="\"bar\""
2001-11-20 12:56:17 +00:00
lukem 99bccc3cab - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
	KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
	DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for  options KGDB_DEVNAME="\"com\""
- use correct quotes for  options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
2001-11-20 08:43:19 +00:00
soren f270ebd294 Remove obsolete comment. 2001-11-19 17:39:54 +00:00
soren b76c8dbfc9 Remove netbsd.high Ind* load address hack and use a separate
distribution GENERIC instead.
2001-11-19 17:39:31 +00:00
soren db0828bda0 Remove driver options that don't belong in std.sgimips. 2001-11-19 17:38:24 +00:00
soren 3fe377a8b9 s/sgi/sgimips/
Remove __NO_SOFT_SERIAL_INTERRUPT.
2001-11-19 17:36:41 +00:00
soren a36dfe843b Since we can get boot device information from both the boot loader
and the firmware, we allow it to be set only once, so the boot
loader is given highest priority.
2001-11-19 17:35:15 +00:00
soren 6413de2df4 Get L2 cache line size from ARCS.
Remove hack to disable (standard) L2 caches.
2001-11-19 17:33:02 +00:00
soren ce57fc2bba Also check SystemPartition when finding boot device. Especially
when netbooting, it is practical to load the kernel directly.
2001-11-19 17:29:53 +00:00
soren 77a301e0e8 s/sgi/sgimips/ 2001-11-19 17:28:23 +00:00
thorpej 38b076b60c zsc does not needs-count 2001-11-18 08:24:33 +00:00
thorpej 431af33735 Tweak for HPC autoconfig changes. 2001-11-18 08:21:38 +00:00
thorpej be010c72ef * Clean up HPC autoconfiguration a little. Pass device register and
DMA register offsets, as well as IRQ, to children.  Use direct
  config.  Use machine type/subtype to determine which devices are
  present.
* Add support for the second SCSI controller on the Indigo2.
2001-11-18 08:16:15 +00:00
thorpej 8edf2c6d98 * Add a callback to the front-end for the 33c93 driver to reset
the controller/SCSI bus.
* Implement controller/SCSI bus reset on SGI HPC3 SCSI using the
  "channel reset" bit in the SCSI DMA channel control register.
2001-11-18 05:14:38 +00:00
thorpej 21c0578357 Walk the ARCS device tree to find the L2 cache size. 2001-11-17 01:19:58 +00:00
mhitch 636eb23869 When loadfile() leaves the ELF header at the end of the kernel, it enables
erroneous code that tries to compute the end of the symbol table.  Disable
that for now so that kernels don't hang when booted from the disk.
2001-11-14 22:47:16 +00:00
thorpej bd15cfaed8 Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
2001-11-14 18:26:21 +00:00
thorpej af66038f73 Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
2001-11-14 18:15:10 +00:00
hubertf 95bf3bc4cd add pseudo-device rnd - it's needed by sshd 2001-11-14 13:25:19 +00:00
rafal 1a9f819d84 Make microtime(9) do interpolation to get better-than-hz resolution, if
the platform supplies a clkread function that does something other than
return 0 (which is the default unless overridden by the platorm code).
Supply such a function for the IP22; even if it isn't perfect, it goes
a long way to making ntp usable.

While I'm at it, move the ticks-per-hz variable out of the struct platform
since it's really private to the per-platform interrupt/clock code.

XXX: No clkread function supplied for IP32, since it has other problems --
like a hardcoded ticks-per-hz, but the same code as on the IP22 could be
used.
2001-11-11 17:21:40 +00:00
soren 3566ffe886 Fix vnd pastoes. 2001-11-11 00:38:30 +00:00
wdk 571fbc80c7 Tidy up debug logic
Fix compile errors when DIAGNOSTIC or DEBUG options disabled.
2001-11-10 22:54:54 +00:00
wdk 7f5269c58f NetBSD Disklabel and SGI Volume header support. Based on NetBSD/mipsco
due to its similarities.

Patch has been tested by many people on the sgimips list for some time with
no complaints.

Contributed by: Christopher SEKIYA <wileyc@rezrov.net>
2001-11-10 07:35:17 +00:00
wdk de81761c50 Complete overhaul of WD33c93 SCSI driver
- Full support for SCSI-2 Tagged commands (enabled by default)
 - Implement save and restore datapointer messages
 - Formalize interface between MI and MD drivers.
 - decouple interface between MD driver and DMA routines
 - Use scsipi layer where appropriate (Tags, Sync Negotiations etc)
 - control blocks stored using kernel pool(9) functions
 - evcnt(9) compliant counters
 - Enable advanced features on later WD33c93 chips.
   (Identify message out phase is hardware assisted)
 - Improved timeout support (one per active control block)
 - Improved MESG_IN and MESG_OUT handling
 - Start to tidy up debugging output
 - Numerous bug fixes and cleanups throughout

Changes are based largely on the NCR53c9x MI driver for ideas on
how to DTRT.
2001-11-10 07:32:42 +00:00
thorpej e727e3f180 Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly.  BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31 17:20:45 +00:00
thorpej 90a2bc2cf7 For MIPS kernel Makefiles, don't set ENDIAN in std.${MACHINE}. Instead,
explicitly set MACHINE_ARCH to the appropriate thing.  Makefile.mips will
then set all of the internal variables it needs to accordingly.
2001-10-23 20:40:00 +00:00
mhitch b216e63487 Use boot arguments to try to determine the boot device. The OSLoadPartition
string, if present, will override the second argument (which may be the
path/kernel being loaded).  This will provide a way to netboot the kernel
and allow the root device be set to a disk partition.
2001-10-18 02:36:33 +00:00
mhitch 6d6ab09e29 Initial boot device determination code: makebootdev() to parse boot command
line parameters, and device_register() to try to match the boot device.  Works
on a Challenge S (and similar machines), but will need more work for other
SCSI adapters.
2001-10-18 02:25:33 +00:00
mhitch 7c6b1c8da0 We have device_register(). 2001-10-18 02:19:54 +00:00
mhitch f7a303efc6 Machine-dependent loadfile() support for booting. 2001-10-15 21:01:34 +00:00
pooka 3518dc8ed0 * fix thinko in mace_print() to prevent intr with value MACECF_INTR_DEFAULT
from getting printed
* fetch device name from dv_xname instead of using hardcoded value
2001-10-11 15:17:42 +00:00
pooka e45292cb5e panic in cpu_initclocks() if clock device is not attached 2001-10-10 13:24:47 +00:00
pooka 4eea26606e read dbaud from ARCS and use that for com rate, not hardcoded 38400 2001-10-08 15:53:07 +00:00
simonb 62274f02ea Use ${KERNLDSCRIPT} instead of hard-coded ld script name. 2001-10-08 10:14:41 +00:00
pooka 527cf2d2b1 use kern.ldscript instead of kern.ldscript.be per new scheme 2001-10-05 14:57:18 +00:00
mhitch a52fa14deb Run vfs_shutdown() if NOSYNC is *not* set, rather than set. 2001-09-24 03:56:03 +00:00
manu 2d16421460 Moved COMPAT_LINUX config stuff from arch/sgimips to arch/mips, so that it's
available on all Mips ports.
2001-09-23 19:45:41 +00:00
manu 142bd48453 config stuff for COMPAT_LINUX 2001-09-22 21:30:15 +00:00
rafal 0143775c35 If OSLoadOptions is set to auto, boot straight to multi-user. Requested
one too many times and it seems to do no harm, so enable it.
2001-09-22 16:26:34 +00:00
rafal e613cff3c5 Obey the RB_POWERDOWN flag passed to cpu_reboot; make it work on the Indy
by enabling the FPU before jumping back to ARCS (gross, but necessary!).
2001-09-18 05:19:29 +00:00
wdk 151ad65334 Fix obvious typos: swapdev set to incorrect major number preventing
kernel from accessing swap device.
2001-09-17 09:33:41 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
rafal 39c82fe985 Use the newly committed imcreg.h to get rid of the magic numbers polluting
this file; while I'm here, rework the GIO arbitrator parameter setup to
match more closely what is done by lunix on the same hardware... Finally,
on a tip from Wilbern Cobb, preserve the graphics-related bits of the
GIO arbitrator parameter register from the PROM-initialized settings so
ARCS console on the graphics display works (tested on both my Indy with
Newport and my Indigo2 with XL gfx).
2001-09-10 15:36:19 +00:00
rafal efa747227e Register defines for the SGI MC memory controller. Not 100% complete, but
has enough register/bit definitions to get rid of all the magic numbers that
currently pollute imc.c
2001-09-10 14:13:31 +00:00
simonb a41b7a380e Clean up and standardise across MIPS ports. 2001-09-09 04:20:25 +00:00
simonb 099f117735 Standardise the format of MIPS' <machine/db_machdep.h>. 2001-09-04 07:43:29 +00:00
simonb 62fb390c64 May as well include <mips/cpuregs.h> in <mips/cpu.h> once rather than
in every MIPS port's <machine/cpu.h>.
2001-09-04 06:23:15 +00:00
simonb 214f5366ea Centralise struct cpu_info declaration and related info to <mips/cpu.h>. 2001-09-04 06:19:21 +00:00
simonb a6b8c86af0 Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
2001-08-31 03:53:22 +00:00
wdk 12a212bc5c Add support for WD33C93 controller and assosiated SCSI devices, and enable
by default.
2001-08-19 03:20:36 +00:00
wdk 0ac0d0d4e4 Initial implementation of WD33C9x SCSI driver for SGI IP22 platforms.
Based on mvme68k and Atari drivers for the same chipset with the
addition of bus_space support.  Attempts have been made to seperate out the
machine dependent dma components and more work is required in this area.

Tested on SGI R4K Indy, but has little testing on other platforms.
2001-08-19 03:16:21 +00:00
wdk 83cb8b7f0a If the boot device cannot be determined don't return an un-initialized
pointer.
Prevents garbage when asking for root device at startup.
2001-08-08 11:35:12 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
thorpej ce8c5df2c6 Count and display the number of CPUs present on the system. 2001-07-09 02:00:19 +00:00
thorpej 8ea809324e Fill in cpu_model[] 2001-07-09 00:30:35 +00:00
thorpej af0e157b66 - Use the identifier strings that are fetched by the MI ARC BIOS
code.
- Garbage-collect some non-useful stuff from the mainbus_attach_args.
2001-07-08 23:59:31 +00:00
thorpej edeeafe82b bcopy -> memcpy, bzero -> memset 2001-07-08 21:04:50 +00:00
thorpej 2b351e4a6f - If the multicast address list changes, make sure to kick the chip.
- Remove unnecessary includes.
- Slight cosmetic change in sq_start().
2001-07-08 20:57:34 +00:00
thorpej e9fd7a6a2b Use sys/dev/arcbios. 2001-07-08 20:30:13 +00:00
wdk 962a2e51fb Add typical KGDB settings, and leave commented out. 2001-07-07 23:17:58 +00:00
wdk bda50bcdd4 - Finish off KGDB kernel debugger support for sgimips 2001-07-07 23:13:25 +00:00