Commit Graph

1063 Commits

Author SHA1 Message Date
cgd 83f9bdc359 update for the fact that config_found() and config_rootfound() now
return pointers.  (Check vs. NULL, rather than just boolean tests.)
1996-04-04 06:25:00 +00:00
cgd 7bc2baeb01 update for the fact that 'alldevs' is now a TAILQ. 1996-04-04 00:27:24 +00:00
pk 7311f0da23 Late-breaking patch from Aaron. 1996-04-01 21:09:39 +00:00
christos 10ffa5da40 Fix warnings when SUN4M is not defined. 1996-04-01 19:16:41 +00:00
christos 3dbbc8d3e9 Fix another printf format argument. 1996-04-01 17:37:08 +00:00
christos 4bdb6550cb Added missing prototypes and include files, fixed parentheses so that it
compiles cleanly.
1996-04-01 17:36:20 +00:00
christos 362a6875bf Remove last dependency to dev_conf.h and the file itself. 1996-04-01 17:34:34 +00:00
christos f34addbb3b - remove dependency to dev_conf.h
- remove unneeded casts for %b
1996-04-01 17:33:10 +00:00
christos 34f644d1b9 Remove casts of printf args for %b format. 1996-04-01 17:31:38 +00:00
christos dc6ff48df6 Eliminated dependencies on dev_conf.h 1996-04-01 17:29:44 +00:00
pk 25b6ab86fe Update device list. 1996-04-01 00:20:31 +00:00
pk 3cf5ed1f30 Various cleanup; mostly trailing spaces/tabs. 1996-03-31 23:44:53 +00:00
pk 8347d3f584 The sun4m name for this device is "auxio". 1996-03-31 23:43:21 +00:00
pk 301e978cf8 Various sun4m-related changes straight from Aaron. 1996-03-31 23:38:29 +00:00
pk e0344005b4 Changes to match 4m-aware locore.s. Note changed `trapbase' and
`sparc_interrupt_{44c.4m}' labels.
1996-03-31 23:35:20 +00:00
pk e743dda2a9 Update for 4m locore.s. Remove some items, since locore.s now #includes
param.h
1996-03-31 23:28:03 +00:00
pk cf4009e56c Include support for sun4m timers and counters: hardware register layout
has changed. There is a counter for each CPU (currently, just one supported).
1996-03-31 23:24:59 +00:00
pk 8de1fd22bc Add sun4m support. Many, many changes..
Note on multi-architecture kernels: most architecture dependent traps are
forked off directly by having a separate trap table for each (sun4,sun4c,sun4m)
This reduces the number of tests on `cputyp' significantly, and it's easier
on the mind. There are still some entry points that need to test `cputyp',
most notably microtime().. yuck.
1996-03-31 23:19:22 +00:00
pk 6d76616bf0 The sun4m IOMMU "device". 1996-03-31 23:09:32 +00:00
pk 7b55c61c27 Include support for sun4m timers and counters: hardware register layout
has changed. There is a counter for each CPU (currently, just one supported).
1996-03-31 23:07:59 +00:00
pk df2a68f25b Add sun4m VA definitions (for clock and interrupt).
Make these generic for all architectures (i.e. avoid `#if defined(SUN4*)'s).
1996-03-31 23:03:31 +00:00
pk ff109a19a3 Accomodate sun4m CPUs and caches (Aaron). Cache handling needs to be
revised.
1996-03-31 23:00:40 +00:00
pk df08150880 Updates for sun4m. 1996-03-31 22:57:09 +00:00
pk 35802bf06b Accomodate sun4m device layout (v3 PROM) and special 4m startup goo.
Heavily cleaned from most `#if defined(SUN4*)' stuff in favour of
CPU_ISSUN4* macros.
1996-03-31 22:55:33 +00:00
pk 678fbb4806 sun4m device definitions and bus structure. 1996-03-31 22:52:38 +00:00
pk b2d12c182b Aaron's sun4m-related trap handling (memory faults).
Note that fork() no longer return in syscall() in the child.

Add a couple of `#ifdef DEBUG's.
1996-03-31 22:51:58 +00:00
pk d15de4b09b Initialize DMA addresses properlier in cpu_startup().
dumpsys(): do not try to dump first physical page, this fucks up pmap_extract().
1996-03-31 22:48:24 +00:00
pk 3c89c0901d Aaron's SRMMU/sun4m pmap implementation.
Note: multi-architecture kernels use function pointers for several PMAP
entry points.

Cut down the `#if defined(SUN4*)' mess severely by using CPU_ISSUN4*
macros (see machine/param.h) wherever possible.
1996-03-31 22:42:59 +00:00
pk 2f3ec93250 Various cleanup; mostly trailing spaces/tabs. 1996-03-31 22:38:29 +00:00
pk 66539854e8 Diddling of the `power' bit in machine control register (Aaron). 1996-03-31 22:34:40 +00:00
pk 954302ae70 Handle sun4m `ledma' and `espdma'.
DMA setup requires services of the IOMMU.
1996-03-31 22:32:45 +00:00
pk 7e45b3449f Re-arrange a bit to stear clear of gcc `-Wall' bites. 1996-03-31 22:30:50 +00:00
pk 25aa56ae29 Handle sun4m `obio' devices.
Cleanup `#if defined(SUN4*)' mess.
1996-03-31 22:28:38 +00:00
pk 96f175d477 Add sbus_translate() to deal with slot address translations, including
new v3 PROM style "range" properties. This routine is also called from obio.c
(which can be viewed upon as just a another Sbus slot).
1996-03-31 22:27:15 +00:00
pk 345295ff08 Deal with sun4m le/ledma. Work around spurious interrupt problem (aaron). 1996-03-31 22:22:52 +00:00
pk bb0897eec6 Various cleanup; mostly trailing spaces/tabs. 1996-03-31 22:21:21 +00:00
pk 1c8b452515 Add a non-interrupt-priority-lowering version of SPL(). Used by splpmap()
at the moment.
1996-03-31 22:20:14 +00:00
pk 76404b0bbe Add sun4m CPU/MMU identifications. 1996-03-31 22:18:16 +00:00
pk 5703b83d00 Move autoconf subroutine prototypes to autoconf.h
Deal with sun4m `software interrupts'.
1996-03-31 22:17:14 +00:00
pk 8d9fbd0949 Add some v3 PROM glue.
Move autoconf subroutine prototypes here (from cpu.h).
1996-03-31 22:12:34 +00:00
pk 0ab4a52862 Add SRMMU/sun4m support. Size and layout of `struct pmap' has changed. 1996-03-31 22:09:13 +00:00
pk 922201e06a Add SRMMU/sun4m definitions.
Cleanup (i.e. mostly delete) `#if defined (SUN4*)' in here.
1996-03-31 22:06:55 +00:00
christos b646bc023a New md conf.h per Jason's plan. 1996-03-30 21:17:55 +00:00
christos 393ad3332b Don't need this anymore; it's data are moved to <machine/conf.h> and conf.c 1996-03-30 21:15:03 +00:00
christos 2d29d17da3 Deprecate use of *_conf.h and use only <machine/conf.h> and <sys/conf.h> 1996-03-30 21:13:53 +00:00
christos c3a3efa9e6 Fix db_printf formats. 1996-03-30 21:13:02 +00:00
christos 32fe9b6a79 iUse <machine/conf.h> instead of sparc_conf.h 1996-03-30 21:12:16 +00:00
christos e4397b82d7 Use machine/conf.h, instead of sparc_conf.h 1996-03-30 21:11:33 +00:00
christos a1777d0168 Remove u_int casts from the printf %b formats. 1996-03-30 21:10:37 +00:00
christos 564084ce99 - add the GETHRTIME and GETHRVTIME traps. Do the best we can for them.
- getcontext() fills the stack_t portion of the context with an 8k size
  stack, 0 flags, and below our current stack pointer. I am not sure where
  to set the pointer. Thanks pk [2-2] for noticing that.

Now netscape and java work...
1996-03-26 19:09:31 +00:00
christos 70e15a2ba9 Make fpu_regs a union of doubles and ints to get the alignment of the
machine dependent portion of the context correct. Thanks pk [1 of 2]!
1996-03-26 19:04:48 +00:00
pk c299fd2d61 Bitfields are unsigned. 1996-03-26 01:28:50 +00:00
pk a8564828ee Back to normal printf()s, now that gcc understands `%b'. 1996-03-26 00:35:25 +00:00
mrg 8d14f53bd0 install stand tools. 1996-03-25 22:48:09 +00:00
pk 3d5031d609 PROM does not like %p's.. 1996-03-25 20:46:56 +00:00
pk 2dd9317452 Remove reference to sense code "internals". 1996-03-23 21:09:04 +00:00
christos 3c3a955cf2 Avoid unused label warning. 1996-03-18 21:48:19 +00:00
christos 4d4d2d999a Remove 'volatile' from the romhalt and romboot routines, and local prototype
declarations.
1996-03-17 21:40:11 +00:00
cgd 94907fa254 adjust to deal with expression support for optional file specs 1996-03-17 13:21:09 +00:00
pk 59ff996be6 Avoid "unused variable" warning. 1996-03-17 03:19:34 +00:00
thorpej 3cd14f7597 New device attachment scheme:
- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.
1996-03-17 02:00:30 +00:00
mrg 4fe3a900f3 comment: LEAPYEAR is not entirely correct 1996-03-17 00:56:24 +00:00
christos 5b2bf5a548 add rom routines declarations 1996-03-16 23:51:44 +00:00
christos 64356e6df3 fix printf format strings 1996-03-16 23:31:45 +00:00
christos dafa7f2c60 fix format strings. move rom routine decls in bsd_openprom.h 1996-03-16 23:31:42 +00:00
christos ed2239daea Fix format strings in panic() 1996-03-16 23:31:40 +00:00
christos 0c4805af23 Fix typo in fsrtoname() use && as intended instead of & 1996-03-16 23:31:36 +00:00
christos 4b636d71eb cast argument to probeget() 1996-03-16 23:28:37 +00:00
christos 2cb7b87853 fix formats in printf() and panic() 1996-03-16 23:28:35 +00:00
christos 5c32202b7e fix format in printf() 1996-03-16 23:28:33 +00:00
christos fe4bb997c9 fix format in panic() 1996-03-16 23:28:30 +00:00
christos 09ff5d56a7 fix format in printf() 1996-03-16 23:28:28 +00:00
christos aab8906300 fix format in log() 1996-03-16 23:28:27 +00:00
christos f2b8b6e73e include <sys/systm.h> 1996-03-16 23:28:25 +00:00
christos 02bcb06a88 This could have never worked (fb in attach was never initialized); include <sys/systm.h> 1996-03-16 23:28:23 +00:00
jtc 2ce5f1478b Add _BSD_WINT_T_ definition so we can handle wint_t type added in NA1. 1996-03-16 01:31:45 +00:00
christos 6d492269e0 Add -Wall -Wstrict-prototypes -Wmissing-prototypes
to the kernel build. The sparc is clean now!
1996-03-15 00:02:28 +00:00
christos 9af46afa21 Fix prototypes for the latest kpc changes. 1996-03-15 00:01:21 +00:00
christos 9673aca601 Fix prototypes that were added with the latest kpc changes. 1996-03-15 00:00:39 +00:00
christos 9c75606e8c Add prototypes and fix bugs:
- softclock was called with extra argument.
    - missing %x formats in printf's
    - kgdb_copy called with only two arguments.

Fix conf.c so that it used the _conf.h files from other places instead of
rolling its own.
1996-03-14 21:08:50 +00:00
christos 9a07d9dec9 Add missing prototypes and fix the fp struct for svr4. 1996-03-14 19:49:04 +00:00
christos 03b701e393 Bring prototypes into scope and fix compiler warnings. 1996-03-14 19:44:30 +00:00
christos ab59f984ab Add and bring prototypes into scope. 1996-03-14 19:41:49 +00:00
pk 485ccae478 Insert child_return() for the benefit of child return path from cpu_fork(). 1996-03-14 00:55:59 +00:00
pk 0b1cba4b0b Implement cpu_set_kpc() and use its machinery to by-pass a child out
of the kernel from cpu_fork().
1996-03-14 00:54:34 +00:00
pk d48d8e1512 Install machinery for cpu_set_kpc(). 1996-03-14 00:54:06 +00:00
pk 808df5543f Remove cpu_set_init_frame(). 1996-03-14 00:49:20 +00:00
pk 894fde6bdd Remove __FORK_BRAINDAMAGE. 1996-03-14 00:48:30 +00:00
pk dc3c7fb2ba Actually enter executables where promised... 1996-03-14 00:11:29 +00:00
pk 90fb0cc9da Don't come down so hard on targets that ignore SDTR msgs. 1996-03-05 09:29:58 +00:00
chuck 9bb0e5dba5 Fix two bugs reported by Don Koch <aardvark@poirot.krl.com> (PR#2169)
[these bugs apply to the xy as well as the xd driver]
 [1] check return value from malloc() for NULL before trying to bzero it.
 [2] use "=" rather than "|=" when writing to CSR (otherwise you may
        ACK something you don't mean to!).
1996-03-04 20:13:39 +00:00
chuck 9fee13d104 Fix two bugs reported by Don Koch <aardvark@poirot.krl.com> (PR#2169).
[1] check return value from malloc() for NULL before trying to bzero it.
 [2] use "=" rather than "|=" when writing to CSR (otherwise you may
	ACK something you don't mean to!).
1996-03-04 20:11:32 +00:00
cgd 18ec26aa21 add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes.  meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
1996-03-04 05:04:10 +00:00
pk 855b6def84 Add ns_cksum. 1996-03-02 23:55:17 +00:00
thorpej 9f2837ac9b "oops", forgot to check this in...add entries for the cgfour and cgeight. 1996-03-01 08:11:00 +00:00
thorpej f579d1a485 Fix an operator precedence botch. *sigh* This just hasn't been my week. 1996-03-01 07:44:43 +00:00
pk abd3cf4df2 Don't reset `xs->retries'. 1996-02-29 23:33:48 +00:00
pk bf59310f69 Fix typo, and bring back VA hole handling. 1996-02-29 22:15:13 +00:00
cgd 3d67685d36 Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them.  From PR 2142, OK'd
by mycroft.
1996-02-29 20:54:58 +00:00
thorpej 93dff23036 Back out the "don't use DMA if SCSI_POLL is set" saftey-net. The
MI 5380 code did something I didn't really expect, which caused DMA
to disable itself if only DMA was enabled.  *grumble*
1996-02-29 03:28:38 +00:00
gwr 2de7b2e5cb update PMAP_PREFER 1996-02-28 22:44:33 +00:00
pk 8bea3309c3 Fix typo 1996-02-28 22:09:27 +00:00
thorpej 50c8d6cdb0 Oops...missed to places where I could have used CPU type macros. 1996-02-28 20:53:02 +00:00
thorpej edf9d66f32 First-cut support for P4 framebuffers. Currently supports P4 variants
of bwtwo, cgfour, cgsix, and cgeight.  Includes support for attaching
the overlay plane of the cgfour and cgeight as a bwtwo instance (a'la
SunOS).

P4 register descriptions, cgfour driver, and cgeight driver partially
derived from OpenBSD.

This code may still need polishing.
1996-02-27 22:09:14 +00:00
pk fe5a56ec9d Be sure to malloc() in page-sized units. 1996-02-27 13:17:01 +00:00
pk 70eee90be3 remove a printf 1996-02-27 09:10:24 +00:00
pk 9216cf3276 Drain rev 1 chips in dma_reset(). 1996-02-27 00:36:11 +00:00
pk 2c646f8da5 `bwtworeg' is just about the same as the generic `fbcontrol'. 1996-02-27 00:32:34 +00:00
pk 6b5eb65b21 bt_reg => fbcontrol. 1996-02-27 00:14:17 +00:00
pk 8628f94179 Use `video enable' bit in framebuffer control. 1996-02-27 00:11:14 +00:00
pk 2fe54615fb Define a couple more framebuffer control bits. 1996-02-27 00:09:23 +00:00
pk 517988b940 Interims:
Comment out `STATINT' checking; this is apparently unreliable on some
ESP revisions.
Deal with target initiated synch re-negotiation.
1996-02-26 14:48:30 +00:00
mycroft 2ce52ae489 Define build programs with `?=', so they can be overridden with `makeoptions'. 1996-02-26 02:53:20 +00:00
pk a3ab0e81da Use CPU-type macros. 1996-02-25 22:03:20 +00:00
pk 3d182fe265 Use CPU-type macros 1996-02-25 21:53:49 +00:00
pk ba0eb7ea59 Use CPU-type macros. 1996-02-25 21:45:53 +00:00
thorpej 1a5d5e25c6 Add an "sw_options" patchable global so that folks can still live life
on the edge (of sw DMA uncertainty) with pre-built kernels.
1996-02-23 16:29:34 +00:00
thorpej ef3500b579 Attempt to work around a hardware bug that screws up DMA on the 4/100.
Apparently, some early 4/100 DMA controllers do illegal memory access on
large ( >= NBPG ) transfers at the end of the transfer.  This appears
as SI_CSR_DMA_BUS_ERR in the csr.  To work around this, we simply
transfer the (up to 3) missing bytes from the bpr.  We were doing this
anyway, so the work-around is to ignore the bus error.

BUT!  I goofed when I implemented the "left-over byte" code for the sw!
It *should* be correct now.  Keep metrics (acceeible via DDB) on the number
of 1, 2, and 3 byte clean-ups, as well as the number of "clean" transfers,
just so we can get a clearer picture.

Thanks to Andrew Gillham <gillham@whirlpool.com> for noticing this!
1996-02-23 07:24:45 +00:00
mycroft 291267e40c Implement SDEV_AUTOSAVE. 1996-02-22 23:35:04 +00:00
pk 2f3ad94f8d An #ifndef _LOCORE to make this file safe to include in locore.s.
Introduce a couple of `CPU-type' helper macros to reduce the preprocessor
tangos in many a source file.
1996-02-22 21:59:08 +00:00
pk e259a02425 Correct some prototypes. 1996-02-22 15:04:07 +00:00
thorpej c86505a6a5 If we get a transfer with the SCSI_POLL flag set, don't use DVMA. We
only get these during autoconfiguration and during crash dumps.  During
autoconfiguration, the transfers are small enough that DVMA won't be used
anyway.  However, using DVMA during a crash dump can be dangerous,
depending on the nature of the panic, so we avoid it.
1996-02-22 07:25:05 +00:00
thorpej 2f132eb5e7 Bring in Gordon's fix from the sun3 port:
Correct the DMA transfer count when the target disconnects before
	the whole transfer is completed.  (Affects VME writes)
	Reselect now works on the VME si board!
1996-02-22 07:14:53 +00:00
thorpej a246f6c835 Fixup some RCS ids. 1996-02-22 06:50:49 +00:00
pk 66fedbbe19 Correct format in a printf(). 1996-02-21 10:21:14 +00:00
chuck adeed1d823 minor clean up: revise locations of disk_busy/disk_unbusy calls to match xd.c 1996-02-21 03:36:51 +00:00
pk b9de283ae6 Fix typo; pointed out by jtk. 1996-02-19 10:30:09 +00:00
pk 9b46365465 Adapt to changed kernel data structures (PR#2100). 1996-02-19 09:46:32 +00:00
thorpej a9012450ec Fix bug in bwtwounblank() ... didn't have code to enable video on sun4/200
obio framebuffer.  Noticed when my 4/260 dropped into DDB and the screen
didn't unblank.  Pull all of the video enable/disable into functions so
this mishap doesn't happen again.
1996-02-19 00:15:46 +00:00
pk a5ea7547d2 Correct timetochip() prototype.
Cleanup microtime() a bit.
1996-02-18 15:38:41 +00:00
pk 1a62c0b31b delay() takes an unsigned int; get the code to match. 1996-02-17 09:47:48 +00:00
pk 1caa80a432 Bring prototypes into scope.
Fix a few bogus `return's.
1996-02-17 00:03:17 +00:00
pk f1518de67c delay() prototype. 1996-02-16 22:13:34 +00:00
pk cdb37b19d3 Account for the fact that `clockreg' might not be page-aligned.
Misc prototype goo.
1996-02-16 22:12:13 +00:00
pk da1402dcb7 Eliminate <setjmp.h>. 1996-02-14 01:03:17 +00:00
pk fe9d17199a If `cold' simply halt the machine in boot(). Note, this still leaves a window
where vfs_shutdown() and sync() can be called prematurely.
1996-02-13 23:59:02 +00:00
pk 54bd5c6954 Fix ANSI prototype goof (from Openbsd).
Add explicit return type to most functions.
V3 PROM console support.
1996-02-13 22:49:48 +00:00
pk 773f74b60d Change some caddr_t's to void *'s. 1996-02-13 22:43:33 +00:00
pk 58cd67c20d Make sure we assign a value to variables we use.
Don't express size of NVRAM in terms of machine page size.
1996-02-13 22:38:25 +00:00
christos 8a8e1a4d94 caddt_t -> caddr_t 1996-02-13 17:13:22 +00:00
christos cbb1d18e70 - Fix setcxsegmap prototype.
- Cast ?TO? macros to NULL to avoid compiler warnings
1996-02-13 17:04:58 +00:00
christos 967dc9fa87 make pmap_page_index return int instead of u_long 1996-02-12 21:15:37 +00:00
pk 3237aa23d2 Avoid compiler warning. 1996-02-12 21:05:18 +00:00
pk d5ddbf99ab Separate DMA and SCSI routines more. 1996-02-12 15:59:51 +00:00
thorpej 8a6ad45eed In fdcretry(), if we're not using implied seeks, set the state to DOSEEK
rather than SEEKCOMPLETE before retrying the operation.  If implied seeks
are being used, the state is set to DOIO (no change).  This is why I
couldn't reproduce the disk_unbusy() panic on my SS2; it uses implied
seeks.  Patch from John F. Woods <jfw@jfwhome.funhouse.com>
1996-02-10 18:37:36 +00:00
christos c6edd77b23 A few prototype fixes 1996-02-09 23:14:14 +00:00
mycroft 753fe3a25a Fix mkdep problems due to missing flags. 1996-02-09 02:21:13 +00:00
chuck 2accbfeefb - moved disk_busy() call from xdstrategy() to xdc_startbuf()
[prevents disk_unbusy panic when disk is loaded (if no
	free IOPBs, xdstrategy() would queue the buffer for pickup
	by xdcintr() but xdcintr() would never call disk_busy().
	xdc_startbuf() is a better place since all bufs are routed
	through here]   problem detected by girish@dworkin.wustl.edu,
	diagnosed and corrected by me.
- move disk_unbusy() call in xdc_remove_iorq() before the call to
	XDC_FREE() [don't want to access a data structure that was just put
	on a free list]
1996-02-08 04:40:33 +00:00
thorpej fa30609066 Protect clearing the Intersil chip's interrupt with splhigh(). If this
gets interrupted (by the higher priority zs hardware, for example),
the clock can come to a dead stop!
1996-02-06 22:59:03 +00:00
pk d0abefaa36 beq -> be; some assemblers don't know about this alias. 1996-02-06 12:11:15 +00:00