Commit Graph

1691 Commits

Author SHA1 Message Date
thorpej f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
mhitch 7d9369f3d3 Fix callout change for keyboard repeat. The callout structure was
incorrectly added as a union member which overlaid the keyboard
state structure.  Fixed by moving the callout structure into to
keyboard state structure.
2000-04-26 04:16:17 +00:00
mhitch ac3bfd5e7f When the tty intialization was split out of rcons_init(), the call to
rcons_ttyinit() was never added to the pmax rasterconsole stuff.  Output
to the display using /dev/console has not been working since then.  Adding
the call to rcons_ttyinit() makes this work again.
2000-04-20 20:02:34 +00:00
itojun 3be41bae18 add stf pseudo interface (commented out due to possible security risks) 2000-04-19 06:50:27 +00:00
drochner 13c9f8d398 implement bus_space_vaddr() 2000-04-17 17:24:48 +00:00
nisimura e7206926ef Add a comment block describes what the intent of safepri global variable
as "During autoconfiguration or after a panic, a sleep will simply ..."
2000-04-12 04:40:50 +00:00
nisimura 19156689a9 - Abandon processor type check for R3000 or R4000/R4400 because VAX
processor is unlikely able to boot the kernel.
- Correct comments about what mach_init() and cpu_startup() do.
- Relocate cn_tab = &promcd to make ROM console printf() work in the
  earliest stage of boot.
2000-04-12 03:05:08 +00:00
nisimura 8bbdc89989 One more line escaped from trap.c rework. 2000-04-11 12:05:35 +00:00
nisimura 678a23b345 Forgot to remove mips_hardware_intr global variable. 2000-04-11 06:50:37 +00:00
nisimura 3dd5742b63 Change to have cpu_intr() peculiar to DECstations; have ssir global
variable and cpu_intr() body in machdep.c.  Reorder and rename
model specific interrupt handler arguments.  Fixup machine/intr.h and
machine/cpu.h appropriately.
2000-04-11 02:43:51 +00:00
ad 031d0221e7 Only spew about every interrupt that gets hooked up if DEBUG is defined
(i.e. not DIAGNOSTIC).
2000-04-05 17:49:55 +00:00
soda 1c5551f260 splsoftnet() should block softclock() too. 2000-04-03 11:44:19 +00:00
soren 80e6d43253 Add asm.h like other ports. 2000-03-30 21:33:30 +00:00
simonb bf851ea6cb Nuke register. 2000-03-30 14:45:04 +00:00
simonb 2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
kleink 230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +00:00
nisimura c4dd0cba64 Add 'struct callout repeat_ch;' in ACCESS.bus softc storage. 2000-03-26 06:51:46 +00:00
nisimura 61609b54e2 Make sure proc0 PCB has spl0 condition in CP0 status register field.
cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them.  This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.
2000-03-25 10:14:13 +00:00
soren 573160e03b Revert previous. 2000-03-24 23:06:03 +00:00
soren c535ede30b Move sysctl definitions from arch/mips to arch/foo. 2000-03-24 21:30:58 +00:00
thorpej 7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
tron e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft 9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00
mycroft 02905321b2 Foolish consistency. Mainly, always use underscores and sys/endian.h. 2000-03-16 15:09:34 +00:00
nisimura 220005d941 Eliminate unused sc_cookie field of struct ioasic_softc. 2000-03-15 03:07:44 +00:00
oster 1bad2e1909 Add the RAIDframe device major to the machine-dependent config files
so that the right entries get added to dev_name2blk[].  Needed for / on RAID.
(Whoops!  I missed checking these in when adding the RAID_AUTOCONFIG stuff.)
2000-03-14 15:56:51 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
nisimura 4c043eb094 Arrange 'vmstat -i' to show 'optslotN'; for interrupt counts of TC slot N
as well as DECsystem 5100 optional serial card slot N.
2000-03-10 01:31:22 +00:00
mhitch 5a9b9df419 Do the interrupt dispatch somewhat differently than the previous fix.
This one is more in the spirit of incorrect version which was trying
to shorten the interrupt path.  This probably isn't quite as fast as
using a switch() statement to dispatch the interrupts, but should be
a little faster than testing for each of the possible 6 interrupt
conditions.
2000-03-08 18:09:27 +00:00
mhitch 0641e677c4 Using interrupt bits in a switch statement doesn't work very well if more
than one interrupt bit is set (unless you do some fancy case values).
Check each interrupt bit individually and process the interrupt if set.
5000/200 doesn't hang shortly after booting now.
2000-03-07 23:41:35 +00:00
tsutsui d16c6f3272 Use DISKPART/DISKMINOR/DISKUNIT instead of dkpart/dkminor/dkunit. 2000-03-07 15:55:14 +00:00
thorpej a183d34f04 - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
2000-03-06 21:36:05 +00:00
mhitch e87b3c7fb3 Use device_register() instead of dk_establish() to determine the boot
device.  Works on a 3100 with both old and MI SCSI, on a 5000/25 built-in
IOASIC with both old and MI SCSI, on the 5000/25 PMAZ TC option card
with both old and MI SCSI, and with tftp boot on the 5000/25.
2000-03-06 03:15:28 +00:00
mhitch 9ace38f7dc Move the now emptry dk_establish() back to disksubr.c where it originally was. 2000-03-06 03:14:28 +00:00
mhitch 7f9b4522d1 A common device_register() is used instead of a separate version for each
of the different DECstation models.
2000-03-06 03:11:43 +00:00
mhitch 0993165c93 Define __HAVE_DEVICE_REGISTER, since pmax now has device_register(). 2000-03-06 03:11:05 +00:00
mhitch e65044e30d Get rid of hook for dk_establish() - pmax will now use device_register(). 2000-03-06 03:08:32 +00:00
nisimura 1036d33c39 Fix mipsmate SCSI lossage made by my previous change. 2000-03-04 10:14:39 +00:00
nisimura f58f6334cb Cosmetic cleanups to hide local objects. 2000-03-04 08:25:24 +00:00
nisimura 13441f2429 It's not necessary to have #if NSII > 0. 2000-03-04 06:05:36 +00:00
mhitch 8bf4d36694 Fix boot device detection. Device probes are not done when adapters are
configured, but after all adapters have been configured.  When multiple
adapters are present, only the last configured adapter could be matched
to the boot device slot.  The adapter attach routines now check if that
adapter slot matches the boot device slot and saves the softc pointer
for that controller.  Then when the disks are configured, dk_establish()
matches the appropriate controller.  Also change the rz boot device test
to include a check for the adapter so that it works when booting from a
disk on adapters other than the first one.
2000-03-04 05:42:55 +00:00
mhitch 40b13c16c0 Do the Ultrix label check in readdisklabel() instead of in rz.c. Ultrix
disks are now usable with the MI SCSI sd devices.
The install mini-root adjustment and the default partitioning still needs
to be moved into readdisklabel().
2000-03-03 17:51:26 +00:00
mhitch 9eaf0ad1d4 Allow a kernel (i.e. GENERIC) to be configured with rz disks with the SII
driver and sd disks with MI ASC driver.
2000-03-03 17:46:49 +00:00
nisimura 3c5d39d73b Make clearer a bit how proc0's USPACE is intialized. 2000-03-03 08:36:20 +00:00
ad 14050f197e Make this compile in DEBUG/DIAGNOSTIC case. 2000-03-01 00:44:53 +00:00
nisimura 6f5dadba1c Cleanup warning comment which is now irrelevant. Reorder codes. 2000-02-29 09:03:30 +00:00
nisimura d93aaefb84 - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
  in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
2000-02-29 07:20:21 +00:00
simonb 4eb55e447c Do the "<space><tab>" thing with the RAID_AUTOCONFIG option. 2000-02-29 06:32:20 +00:00
nisimura a6e403e50b Remove unnecessary cast for kernend variable when grabbing proc0 USPACE. 2000-02-29 04:55:54 +00:00
nisimura 7eeaa2a1fa NLE_PMAX symbol in le_pmax.h has gone. 2000-02-29 04:44:29 +00:00
nisimura 582e9de235 - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
  in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
2000-02-29 04:41:47 +00:00
mhitch 19c22771f3 Check and clear the appropriate IOASIC SCSI interrupt bits when in polled
I/O mode.  Kernel dumps will now work with the IOASIC SCSI devices.
2000-02-28 18:51:25 +00:00
oster d9c47013b2 Defopt 'RAID_AUTOCONFIG'. Adding 'options RAID_AUTOCONFIG' turns on
the component auto-detection and auto-configuration of RAID sets.
Also, add "#options RAID_AUTOCONFIG" to the GENERIC config files.
2000-02-26 17:35:33 +00:00
mhitch 98fa781c83 The check for 'rz(?,?,?)' was incorrect and would not find the boot device
on the 3100.
2000-02-23 18:50:51 +00:00
soda 9051f8102e clean up vm_{offset,size}_t, use {v,p}{addr,size}_t instead 2000-02-22 12:22:19 +00:00
nisimura 3c0d53280b Fix scsi.pmax inclusion mistakenly commented out. 2000-02-21 06:44:24 +00:00
nisimura e6635ea8bd Introduce MI SCSI codes; for DECstation 5000s only this moment. 2000-02-19 09:48:46 +00:00
nisimura 051314999f Introduce MI SCSI codes; for DECstation 5000s only this moment.
Disabled by default and needs arrangements in conf file to use it.
See DS5000 as a sample.
2000-02-19 09:46:48 +00:00
nisimura 58d5093220 Introduce MI SCSI codes; for DECstation 5000s only this moment and
disabled by default.
2000-02-19 09:43:40 +00:00
nisimura da782dba95 The way to determine booted root device was simplified largely. 2000-02-19 04:16:18 +00:00
mycroft 14ef93565d Use the prefix printed before cpuattach() is called. 2000-02-19 03:59:04 +00:00
nisimura 02d328f925 List all 6 different types of MI SCSI device. 2000-02-19 03:58:23 +00:00
nisimura 7481db1957 Revert the removal 'include "dev/scsipi/files.scsipi"' directive; it's
neccessary to make pmax/conf.c compiled correctly.
2000-02-18 10:18:12 +00:00
nisimura eb30f016ae Group and reorder old SCSI driver descriptions into a single
location.   Nuke files.scsipi inclusion which has never been useful.
2000-02-18 08:41:21 +00:00
thorpej 5903e181fa Nuke NKMEMCLUSTERS. 2000-02-12 03:29:18 +00:00
nisimura 9fb475bc29 Missing commit to reflect ioasicreg.h merge. 2000-02-09 08:37:43 +00:00
nisimura 43917001c7 - Add missing "opt_ddb.h" to dc.c and dtop.c (oh, boy)
- Nuke irrelevant "dcvar.h" and "tc.h" inclusion from dc.c
- Put '#if NRASTERCONSOLE > 0' around scc_lk201_cnattach().
2000-02-09 08:29:40 +00:00
thorpej fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
cgd 7d16ac338c add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
2000-02-05 00:13:22 +00:00
nisimura c6641d91a8 Merge IOASIC register definitions. 2000-02-03 08:13:44 +00:00
nisimura f3837e8a9d Not to use (cfdata->cf_unit > 0) conditional in device match() routine. 2000-02-03 05:22:47 +00:00
nisimura d60c22d5f7 Nuke mistakenly introduced #include "rasterconsole.h". 2000-02-03 04:23:36 +00:00
nisimura 72b67dec3e Massive change of console initialization to make WSCONS transition easier. 2000-02-03 04:19:59 +00:00
nisimura 3aaeaf7331 - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
  making sure no extraneous console resolution message is emitted.
2000-02-03 04:09:01 +00:00
tsutsui 11c8f56d48 Revert STRIPPROG -> STRIP 2000-02-01 05:25:24 +00:00
drochner 8eb798e603 define a "BUS_SPACE_MAP_PREFETCHABLE" flag which basically means that
device accesses are idempotent (but should not be cached by the CPU)
2000-01-25 22:13:17 +00:00
tron 04eb110431 Add "dependall" target for comfort. 2000-01-24 20:36:06 +00:00
hubertf 7e5ff67457 Add commented out "ident"-command 2000-01-23 23:46:04 +00:00
mycroft 7b49d242ce Clean up the machine symlink stuff ever so slightly. Needs to be
standardized between files.
2000-01-23 17:04:03 +00:00
thorpej 52242fdf9f Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:28:59 +00:00
wrstuden 87e1b0f9b7 Add overlay to kernel configs. 2000-01-20 19:12:28 +00:00
thorpej a0397a2573 Move callout initialization to a single location; no need to duplicate
that code all over the place.
2000-01-19 20:05:30 +00:00
tsutsui e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
msaitoh 0b9af6bdce check whether tv_usec >= 1000000 2000-01-19 02:52:16 +00:00
thorpej 4f27a98702 Use b_cylinder as defined in sys/buf.h 2000-01-18 19:48:02 +00:00
simonb 251eb03a2b Only prototype and include code for scc_kbd_init() and scc_mouse_init()
if NRASTERCONSOLE > 0.  Fixes problem reported on port-pmax by Anders
Andersson.
2000-01-18 12:19:49 +00:00
ad ec54843fa3 - Make consistant with the new order.
- Ammend comment about PrestoServe.
2000-01-14 15:52:33 +00:00
ad ba79e0aab8 Make consistant with the new order. 2000-01-14 15:52:00 +00:00
simonb bdf420bdbf Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
 - Remove bogus tc_slot_info[] name for interrupt handling array
   and replace with simplified struct intrhand  intrtab[] array.
 - Add intr_establish() and intr_disestablish() function pointers
   to struct platform and initialise this in each model-specific
   initialisation, and remove global tc_enable_interrupt function
   pointer.
 - Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
2000-01-14 13:45:21 +00:00
ad 2db85d5948 - Add some extra TC ID strings that we should recognise. From simonb.
- Function definition and RCS ID spacing.
- Fix multiple inclusion goo to be like the new order of things.
2000-01-14 02:00:46 +00:00
ad a4fe338bf5 Fix thinko in comment. 2000-01-11 20:36:17 +00:00
simonb ede7778a1c Remove unneeded include files (up to 16 in two files!). 2000-01-10 03:24:31 +00:00
simonb 6713f95947 Add trailing quote to RCS ID. 2000-01-10 01:57:41 +00:00
ad 0ab584940f RCS ID police. 2000-01-09 23:12:30 +00:00
ad ef9dba7791 - Protect against multiple includes.
- Spacing.
2000-01-09 23:10:45 +00:00
simonb 82a7ef29e8 Move include of <sys/sysctl.h> after <vm/vm.h>
Add some parentheses around part of an expression to keep gcc -Wall happy.
2000-01-09 22:31:44 +00:00
simonb 0e7337b60e Remove defines for VM_PHYSSEG_STRAT and VM_PHYSSEG_NOADD - these are
already in mips/include/vmparam.h.  Now things work again (yo Andy!).
2000-01-09 20:09:43 +00:00
ad 838b5e08c9 - Fix RCS Ids.
- Spacing.
- Protect from multiple inclusion in a consistant way (except on headers
  that do nothing except function as mips header wrappers).
2000-01-09 15:34:41 +00:00
ad e37d8a4671 This is just a wrapper, nuke comment so it's like the others. 2000-01-09 15:12:31 +00:00
ad ab208e6993 s/4(..)bsd/4$1BSD/ 2000-01-09 15:08:42 +00:00