Commit Graph

230 Commits

Author SHA1 Message Date
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
rafal 5b1c3b74ba Remove externs moved to headers, fix interrupt masks to be zeroes at startup,
add MIPS clock interrupt (int5) event counter and clean up some more debug
goo.
2001-06-14 01:15:35 +00:00
rafal d9d912728f Get rid of externs moved to header files, add event counter for the clock
interrupt, use platform.ticks_per_hz instead of hardcoded constant for the
counter increment (XX: not that the ticks_per_hz is calculated for the IP32
yet).
2001-06-14 01:09:37 +00:00
rafal 3327706cab Add externs for struct platform and the machine type definitions (mach_type,
mach_subtype, mach_boardrev).
2001-06-14 01:06:08 +00:00
rafal 68306a9bf0 Implement a db_trap_callback which turns off the watchdog on entry to DDB
and turns it back on on exit.  Hook the callback in early in the boot, so
it's there as soon as DDB is available.
2001-06-13 12:34:24 +00:00
thorpej 37c37861b9 Make sure to always re-sync the rx buffer dmamap if recycling the
rx buffer.
2001-06-08 14:32:05 +00:00
simonb e5bd00e48d For ports that wire up pciide in compatibility mode, have
them define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
in pci_machdep.h and pciide_map_compat_intr() only calls
pciide_machdep_compat_intr_establish() if that preprocessor
define exists.

Ports that don't need to do this no longer need to supply a
dummy function.
2001-06-08 04:48:54 +00:00
rafal a8bb9b127a All soft interrupts are currently handled by soft interrupt 1, so make
all splsoftxxx() calls block soft interrupt 1 and make spllowersoftclock()
re-enable soft interrupt 1.

XXX: This needs to be reworked so that spllowersoftclock() only turns on
softclock interrupts, not all soft interrupt.  That change is coming soon.
2001-06-08 00:09:28 +00:00
rafal 86d8f950ef Fix initial interrupt mask settings for `hard' interupts to mask out soft
interrupts as well.  The system is quite stable now that soft interrupts
don't pop up at random places where they're unexpected 8-)

Also, while here, fix CPU clock speed calculation for the Indy.
2001-06-08 00:02:41 +00:00
thorpej 0859a7601d - Differentiate beteen the 8003 and 80c03 (the 80c03 has some additional
features).
- Implement crude multicast support -- enable reception of all multicast
  frames if we have any addresses on the multicast list.  TODO: use the
  64-bit hash table on the 80c03.
- Implement promiscuous mode.

IPv6 doesn't quite work yet -- DAD finds a duplicate for the
link-local.  The 8003 hears its own transmissions, but IFF_SIMPLEX
is not set, so I'm a little confused.
2001-06-07 23:05:51 +00:00
thorpej b4e0748bf3 Don't use PCLK as the baud rate generator, as the Indy doens't
like that, and it has no effect on the Indigo2.
From Christopher SEKIYA <wileyc@rezrov.net>.

Also, query the "ConsoleOut" ARCS variable (i.e. "what the console
really is") rather than "console" ("what the console is configured
as").
2001-06-07 19:23:03 +00:00
thorpej a7df60e8e9 Pass -N to the linker, so that it will generate a single PT_LOAD
section (a'la OMAGIC).
2001-06-07 15:26:31 +00:00
rafal a1830df1bb Fix a deadlock in the tx code -- the code checked the DMA status before
sync'ing the descriptor, leading to a race where the packet could complete
after the DMA check but before the sync of the descriptor, sending the code
into unknown territory and the DMA engine into space.  Also, fix a bug with
spurious watchdog resets going off due to the if_timer not always being set
on transmit.

Finally, clean up use of hardcoded magic numbers, get them from hpcreg.h
when possible.
2001-06-07 12:20:42 +00:00
rafal 63f856cb2e Add a bunch of defines for bits withing the ethernet-related registers so
the Seeq driver can use them instead of hardcoded constants.
2001-06-07 12:10:34 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
matt 4eaed60c97 Add IP32 2001-05-14 17:59:22 +00:00
matt 50522d3e8f Add null ip32_bus_reset. Add cpu_intr_establish which calls
crime_intr_establish.  XXX cpu_intr_establish needs to have the
"normal" intr_establish arguments.
2001-05-14 17:56:36 +00:00
matt 4cf3bc7ebc Define splserial to be the same as spltty(). 2001-05-14 17:55:03 +00:00
thorpej a3fad63f23 Rafal's Indigo2 kernel configuration. 2001-05-11 05:05:42 +00:00
thorpej 5c3fa40aa3 Autoconfiguration glue changes for Indigo2/Indy support. 2001-05-11 05:04:34 +00:00
thorpej c68eb33351 Delete __NO_SOFT_SERIAL_INTERRUPT. 2001-05-11 05:02:30 +00:00
thorpej c36aca4169 Support for configuring an SCC console. From Rafal K. Boni. 2001-05-11 04:56:56 +00:00
thorpej 935ed514af Support for the IP22 (Indigo2, Indy, Challenge S). From Rafal K. Boni. 2001-05-11 04:56:09 +00:00
thorpej 07d7386b8f Move IP32 (O2) support into its own file.
From Rafal K. Boni.
2001-05-11 04:55:42 +00:00
thorpej acc9f8ef65 Adjustments for dynamic system configuration. From Rafal K. Boni. 2001-05-11 04:53:25 +00:00
thorpej 7583466c6f Expose atoi(). From Rafal K. Boni. 2001-05-11 04:47:55 +00:00
thorpej 148ab319ac Use hit-flush ops in bus_dmamap_sync(). From Rafal K. Boni. 2001-05-11 04:46:22 +00:00
thorpej fc4bcdcdf2 We now have generic soft interrupts. 2001-05-11 04:42:41 +00:00
thorpej a8a801d6f3 Dynamic system configuration support, derived from pmax port.
From Rafal K. Boni.
2001-05-11 04:42:13 +00:00
thorpej c9ca9bb770 SGI machine types and subtypes. From Rafal K. Boni. 2001-05-11 04:38:22 +00:00
thorpej 6b313f2c5f Basic EISA support for the Indigo2. From Rafal K. Boni. 2001-05-11 04:36:15 +00:00
thorpej 13f69bc540 Generic software interrupt implementation, derived from mipsco
implementation.

From Rafal K. Boni.
2001-05-11 04:32:05 +00:00
thorpej 87f3aebd5e New data structures for the new SCC driver.
From Rafal K. Boni.
2001-05-11 04:26:17 +00:00
thorpej f24f6c113d Support for the SCC serial ports on Indigo2/Indy.
From Rafal K. Boni.
2001-05-11 04:24:44 +00:00
thorpej 3b92374a20 Support for the Indigo2/Indy IMC (this is that to which all other
devices are attached).
2001-05-11 04:22:55 +00:00
thorpej e6e4372ada New clock functions, based on the newsmips versions. These
actually do something, by calling into the hardware clock
routines set up during autoconfiguration.

From Rafal K. Boni.
2001-05-11 03:42:59 +00:00
thorpej ce9753d9e9 Autoconfiguration glue for HPC devices.
From Rafal K. Boni.
2001-05-11 03:23:38 +00:00
thorpej 5885656e58 Support for the Seeq 8003 Ethernet attached to the HPC ASIC,
found on Indigo2 and Indy.

From Rafal K. Boni.
2001-05-11 03:22:21 +00:00
thorpej 5d02689ede IOC1/2 memory map.
From Rafal K. Boni.
2001-05-11 03:18:57 +00:00
thorpej 726924bc4c Support for the Dallas 1286 clock found on the Indigo2 and Indy. 2001-05-11 03:16:59 +00:00
thorpej c4173c40c1 Support for the HPC I/O peripheral ASIC. There is where SCSI, Ethernet,
etc. live on the Indigo2 and Indy.

From Rafal K. Boni.
2001-05-11 03:11:20 +00:00
thorpej 149ebabf26 Get the major number of the CRIME properly.
From Rafal K. Boni.
2001-05-11 02:25:21 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00