BSD 4_4 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 18 Jun 1993 10:32:58 +0000 (02:32 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 18 Jun 1993 10:32:58 +0000 (02:32 -0800)
Work on file usr/src/sys/hp300/DOC/README
Work on file usr/src/sys/hp300/DOC/Options
Work on file usr/src/sys/hp300/DOC/Pmap.notes
Work on file usr/src/sys/hp300/DOC/TODO.dev

Synthesized-from: CSRG/cd3/4.4

usr/src/sys/hp300/DOC/Options [new file with mode: 0644]
usr/src/sys/hp300/DOC/Pmap.notes [new file with mode: 0644]
usr/src/sys/hp300/DOC/README [new file with mode: 0644]
usr/src/sys/hp300/DOC/TODO.dev [new file with mode: 0644]

diff --git a/usr/src/sys/hp300/DOC/Options b/usr/src/sys/hp300/DOC/Options
new file mode 100644 (file)
index 0000000..573770d
--- /dev/null
@@ -0,0 +1,102 @@
+Here is a list of hp300 specific kernel compilation options and what they
+mean:
+
+HAVEVAC
+       Compiles in support for virtually addressed cache (VAC) found on
+       hp320 and 350 machines.  Should only be defined when HP320 and/or
+       HP350 is.
+
+HP320
+       Support for old hp320 machines: 16mhz 68020, HP MMU, 16mhz 68881
+       and VAC.  Compiles in support for a VAC, HP MMU, and the 98620A
+       16-bit DMA channel.  Forces the definition of HAVEVAC.
+
+HP350
+       Support for old hp350 machines: 25mhz 68020, HP MMU, 20mhz 68881
+       and VAC.  Compiles in support for a VAC and the HP MMU.  Differs
+       from HP320 in that it has no support for 16-bit DMA controller.
+       Forces the definition of HAVEVAC.
+
+HP330
+       Support for old hp330 (and 318/319) machines: 16mhz 68020, 68551 PMMU
+       and 16mhz 68881.  Compiles in support for PMMU.
+
+HP360
+       Support for old hp360 (and 340) machines: 25mhz 68030+MMU and 25mhz
+       68882.  Compiles in support for PMMU and 68030.  Differs from HP330
+       in support for 68030 on-chip data cache.
+
+HP370
+       Support for old hp370 (and current 345/375/400) machines: 33 (50) mhz
+       68030+MMU and 33 (50) mhz 68882.  Compiles in support for PMMU, 68030
+       and off-chip physically addressed cache.  Differs from 360 in only one
+       place, in dealing with flushing the external cache.
+
+HP380
+       Support for "current" hp380/425 (and 433) machines: 25 (33) mhz 68040
+       with MMU/FPU.  Compiles in support for 68040.
+
+HPFPLIB
+       Compiles in support to link with HP-UX's version of Motorola's 68040
+       FP emulation library (hp300/hpux_float.o).  Kernel will build and run
+       without this option, but many binaries will core dump.  Should not be
+       defined unless HP380 is.
+
+
+USELEDS
+       Twinkle the hp4xx front panel (or hp3xx internal) LEDs in the HP
+       designated way.  Somewhat frivolous, but the heartbeat LED is
+       useful to see if your machine is alive.
+
+PANICBUTTON
+       Compiles in code which will enable a "force-crash" HIL keyboard
+       sequence.  When the Reset key is typed twice in succession (within
+       half a second) the kernel will panic.  Note that the HIL Reset key
+       sends a NMI to the processor which will get the CPUs attention no
+       matter what it is doing (i.e. as long as it isn't halted).  Alas,
+       also note that the NMI is only sent when the keyboard is in "cooked"
+       (ITE) mode.  If it is in "raw" mode (i.e. X-server is running) the
+       Reset key is just another keypress event.  A cheezy substitute in
+       this case is holding down the upper right-most unlabeled key and
+       then pressing the unlabeled key to its left.  Note that this only
+       works if HIL (level 1) interrupts are not masked.
+
+DEBUG
+       Compiles in a variety of consistency checks and debug printfs
+       throughout the hp300 MD code and device drivers.
+
+HPUXCOMPAT
+       Enables HP-UX binary compatibility mode.  Allows a variety of
+       "recent" HP-UX binaries to be run unchanged.  Due to the
+       evolutionary and "as-needed" nature of this code, "recent" is
+       anywhere from release 6.2 to 8.0 of HP-UX.  It will run 8.0
+       shared-library binaries (assuming all the necessary shared-libraries
+       are installed in the filesystem).
+
+COMPAT_OHPUX
+       Compile in old 4.2-ish HP-UX (pre-6.0?) compatibility code.
+
+FPCOPROC
+       Compile in code to support the 68881 and above FPU.  Should always
+       be defined, since all supported SPUs have one.  Don't even know if
+       it will compile, much less work,  without this option.  Defined in
+       the prototype makefile (hp300/conf/Makefile.hp300).
+
+DCMSTATS
+       Compile in code to collect a variety of transmit/receive statistics
+       for the 98642 4-port MUX.
+
+WAITHIST
+       Compile in code to collect statistics about the distribution of
+       wait-times for various busy waits in the SCSI host-adaptor driver.
+
+STACKCHECK
+       Enables two types of kernel stack checking in hp300/hp300/locore.s:
+       1. stack "overflow".  On every clock interrupt we ensure that
+          the current kernel stack has not grown into the user struct
+          page, i.e. size exceeded UPAGES-1 pages.
+       2. stack "underflow".  Before every rte to user mode we ensure
+          that we will be exactly at the base of the stack after the
+          exception frame has been popped.
+       This option can degrade performance considerably, use it only if
+       you suspect a problem with kernel stacks.
diff --git a/usr/src/sys/hp300/DOC/Pmap.notes b/usr/src/sys/hp300/DOC/Pmap.notes
new file mode 100644 (file)
index 0000000..48f3ab9
--- /dev/null
@@ -0,0 +1,41 @@
+Following are some observations about the the BSD hp300 pmap module that
+may prove useful for other pmap modules:
+
+1. pmap_remove should be efficient with large, sparsely populated ranges.
+
+   Profiling of exec/exit intensive work loads showed that much time was
+   being spent in pmap_remove.  This was primarily due to calls from exec
+   when deallocating the stack segment.  Since the current implementation
+   of the stack is to "lazy allocate" the maximum possible stack size
+   (typically 16-32mb) when the process is created, pmap_remove will be
+   called with a large chunk of largely empty address space.  It is
+   important that this routine be able to quickly skip over large chunks
+   of allocated but unpopulated VA space.  The hp300 pmap module did check
+   for unpopulated "segments" (which map 4mb chunks) and skipped them fairly
+   efficiently but once it found a valid segment descriptor (STE), it rather
+   clumsily moved forward over the PTEs mapping that segment.  Particularly
+   bad was that for every PTE it would recheck that the STE was valid even
+   though we should already know that.
+
+   pmap_protect can benefit from similar optimizations though it is
+   (currently) not called with large regions.
+
+   Another solution would be to change the way stack allocation is done
+   (i.e. don't preallocate the entire address range) but I think it is
+   important to be able to efficiently support such large, spare ranges
+   that might show up in other applications (e.g. a randomly accessed
+   large mapped file).
+
+2. Bit operations (i.e. ~,&,|) are more efficient than bitfields.
+
+   This is a 68k/gcc issue, but if you are trying to squeeze out maximum
+   performance...
+
+3. Don't flush TLB/caches for inactive mappings.
+
+   On the hp300 the TLBs are either designed as, or used in such a way that,
+   they are flushed on every context switch (i.e. there are no "process
+   tags")  Hence, doing TLB flushes on mappings that aren't associated with
+   either the kernel or the currently running process are a waste.  Seems
+   pretty obvious but I missed it for many years.  An analogous argument
+   applies to flushing untagged virtually addressed caches (ala the 320/350).
diff --git a/usr/src/sys/hp300/DOC/README b/usr/src/sys/hp300/DOC/README
new file mode 100644 (file)
index 0000000..e1d82f8
--- /dev/null
@@ -0,0 +1,28 @@
+This directory contains random snippets related to various hp300 issues.
+
+Debug.tips     Some tips for debugging kernel problems.  Out of date but
+               may contains some useful info.
+
+HPMMU.notes    Most of this information was collected by David Davis in
+               1987 or so while he was working on hp200/300 BSD.
+
+Options                Kernel configuration options that are either defined in
+               the prototype makefile or that can be specified in a config
+               file.
+
+Pmap.notes     Some (mostly HP-specific) observations I made while cleaning
+               up the hp300 pmap module.
+
+README         This.
+
+README.68040   Notes and copyright information for the 68040 floating point
+               emulation package.
+
+TODO.dev       A fairly ancient list of projects related to IO devices.
+
+TODO.hp300     A much more up do date list of general hp300 projects.
+
+Mike Hibler (mike@cs.utah.edu)
+Center for Software Science
+University of Utah
+February, 1993.
diff --git a/usr/src/sys/hp300/DOC/TODO.dev b/usr/src/sys/hp300/DOC/TODO.dev
new file mode 100644 (file)
index 0000000..5752201
--- /dev/null
@@ -0,0 +1,10 @@
+Oh, where do I begin...
+
+1. Integrate 98628A (single port buffered RS232) driver.
+2. Integrate 1/2" 9-track reel tape driver (from Mt Xinu).
+3. SCSI: sync support and connect/disconnect.
+4. VME/EISA adaptor drivers needed.
+5. Centronics driver for 345/375.
+6. HP-IB (SCSI?) improvement: attempt to get more activity on a single
+   bus (e.g. overlap seeks with transfers).
+7. Support for more modern (post-DaVinci) displays.