Commit Graph

22965 Commits

Author SHA1 Message Date
thorpej ffc4c833ea Be careful not to deref bad pointers in the MMU fault handler! (yow!) 1996-10-14 08:07:23 +00:00
thorpej 7744dc270c Couple of small changes to how kernel is mapped:
- kernel text is now always read-only.
- page 0 is invalid.
1996-10-14 08:05:37 +00:00
thorpej 4fa7362d31 Add a db_memrw.c that understands how to write to read-only kernel text
(remaps page read/write/cache-inhibit, does write, restores previous
mapping).  Kernel text no longer needs to be read/write with DDB/KGDB
is in the kernel.

Based on a similar module written for the Sun3 port by Gordon Ross,
and modified somewhat by me.
1996-10-14 08:02:27 +00:00
thorpej 5b66e34d14 A few small changes:
- Offset kernel text one page.  Stash the PA of this offset page for
  use later.
- Add a few comments.
- Free up some registers earlier in the initialization process.
- Use a `prototc' to set the Translation Control register, rather
  than relying on a2 pointing just past the MMU trampoline in the
  high page.  (Suggested by Charles Hannum.)
- Set VBR to the kernel vector table just before turning on the MMU.
- Just before rebooting, set VBR to 0, which is what the BOOTROM expects
  it to be.
1996-10-14 07:58:54 +00:00
thorpej 27f386f5b2 Garbage collect some now unneeded code, and declare the punit device
driver entry point switch.
1996-10-14 07:34:48 +00:00
thorpej 415248a4f2 Move the machdep_start() code into machdep.c. No need for different
versions of this function anymore, now that we have a sane kernel setroot().
1996-10-14 07:33:43 +00:00
thorpej 18c2b0460a Garbage collect some hackish code that was needed when we had a lame
kernel setroot().  The device type for network boot is set like any
other device now.  Also, call the punit entry point for device drivers
to properly set `bootdev'.
1996-10-14 07:31:47 +00:00
thorpej 9ff0348a49 Implement ctpunit(), a "set physical unit" entry point. 1996-10-14 07:29:57 +00:00
thorpej 9d51a5dcf7 Add a standalone driver entry point that sets the physical unit (HP-IB's
equivalent of a LUN) in `bootdev'.  This is needed to properly detect the
boot device if booted from the tape unit of an HP-IB disk/tape combo.
1996-10-14 07:29:15 +00:00
thorpej 84da57f13b Clean up the code that sets `bootdev' based on information provided
by the BOOTROM.  Also, give network devices the attention they deserve.
1996-10-14 07:26:06 +00:00
thorpej 23640d012f New root device detect/set code, lifted mostly from NetBSD/alpha.
The "options GENERIC" entry in kernel config files is not longer necessary
for "swap generic" kernels.  Uses new config constructs which work with
some glue in an old config environment.  This code will support new config
with minimal changes.
1996-10-14 07:20:26 +00:00
thorpej 8acf9f0215 Set the device class on non-dull devices. This is a transitional thing. 1996-10-14 07:14:11 +00:00
thorpej 7d13691de1 Add some new config glue to the legacy hp300 device structures. This is
a transitional thing.
1996-10-14 07:11:50 +00:00
thorpej 01d74572dd Default the HIL keyboard to "US ASCII". This should fix a bug where
an unrecognized keyboard produced garbage on keypresses in the kernel,
but worked in the boot program (which has this default).  The bug is
that the keymap pointers are unitialized.
1996-10-14 07:09:41 +00:00
scottr 534c6caa6b Add EXEC_AOUT and EXEC_SCRIPT 1996-10-14 07:01:10 +00:00
thorpej 04f65ff081 Need to include <sys/exec.h> 1996-10-14 06:53:23 +00:00
thorpej 7ee4744ed2 Need to include <sys/exec.h>. 1996-10-14 06:51:50 +00:00
cgd 385de32c08 Trade one bit of lossage for another. Now that groff has been upgraded,
the Alpha no longer needs -fno-for-scope.  However, NetBSD/Alpha's
(cygnus snapshot) g++ doesn't allow virtual functions which aren't
declared inline to be later defined as inline without a warning (-> error).
Therefore, on the Alpha, define BROKEN_GXX_VIRTUAL_INLINE (which will
go away after the Alpha is upgraded to use a more recent toolchain), and
use it to make sure that declarations of virtual functions which will
be defined inline are actually marked as inline when they're declared.
1996-10-14 05:24:23 +00:00
mhitch c376b68e9d Now needs sys/proc.h since compat/common/compat_util.h doesn't anymore. 1996-10-14 05:15:39 +00:00
jonathan 9d781ce37f Back out second inclusion of <sys/poll.h> from duplicated poll(2) changes. 1996-10-14 04:55:26 +00:00
cgd 40bcaca9ac fix a bogon in some new functionality apparently added in the last
commit (which was supposed only to back out the printf->kprintf changes).
The new functionality is: if the user enters control-D, return an error.
1996-10-14 04:49:21 +00:00
jonathan 02fb4a1255 Back out previous revision's change to use mips family-independent locore
initialization.
Locore doesn't (yet) set up cpu_id early enough for mach_init() to use it.
1996-10-14 04:31:57 +00:00
mhitch b4355fb150 More fallout from printf->kprintf->printf: printf in sys/systm.h now
conflicted with stdio.h.  Get rid of sys/systm.h, as it isn't needed.
1996-10-14 03:04:32 +00:00
mhitch be3a168305 Removed stray ";" so conditional return is really conditional. Fixes
autoconfig display for xcfb.
1996-10-14 01:39:57 +00:00
cgd 0e4ddf059b deal more sanely with ELF binaries with only a single program header
section.  Patch come up with by Bob Baron <rvb+@cs.cmu.edu> and myself.
This entire bit of code (the code which sets daddr/dsize and taddr/tsize)
is very bogus, but it's not clear what the 'right' way to fix it is
and this patch fixes a problem preventing some ELF executables from
being run.
1996-10-13 22:54:52 +00:00
christos 898d3e0b34 regen 1996-10-13 22:21:15 +00:00
christos b3de746da6 Apply PR/2840: Recognize more 3com models... 1996-10-13 22:19:19 +00:00
veego de5f30a2ec Import GNU rcs 5.7 1996-10-13 21:56:51 +00:00
jonathan 27ec6276b8 Rename mips CPU-family locore prefixes for case-consistency:
mips_r2000_, mips_R2000_ -> mips1_
    mips_r4000_, mips_R4000_ -> mips3_
(which are also, for mnemonic reasons,  consistent with gcc flag usage,
 rather than using mipsI_ and mipsIII_).
1996-10-13 21:37:35 +00:00
mhitch bc4aec6c5b Fix error from in_addr_t changes by christos: htonl() takes in_addr_t
parameter, not in_port_t.
1996-10-13 20:59:02 +00:00
cgd a23bd4576c if ${MACHINE_ARCH} is "alpha" build shared libs with the 'normal' GNU
linker's command line args, rather than the NetBSD linker's command
line args.  This is a hack, and should go away in favor of something
more general when that something is developed.  In the mean time, it
might be appropriate for the various mips ports to do the same thing.
1996-10-13 20:39:36 +00:00
cgd 7dc2d2b3fe define NOPIC on the alpha only if ELF_TOOLCHAIN is not defined.
(This is a hack.)
1996-10-13 20:33:59 +00:00
cgd 4cd050e74f temporary hack until better support for multiple toolchains is in the tree:
build SASM and SPSEUDO on the alpha without the '-k' flag to the assembler,
since -k is a flag specific to NetBSD's hacked assembler.
1996-10-13 20:28:55 +00:00
cgd 01565a3ced typedef, not typeded 1996-10-13 19:57:59 +00:00
cgd 77483f297b increment cnt.v_intr for I/O device and clock interrupts 1996-10-13 19:57:49 +00:00
christos d551a4edf9 catch up with Jason's exec.h inclusion. 1996-10-13 18:30:05 +00:00
christos 05d14bf764 catch up with Jason's changes 1996-10-13 18:28:49 +00:00
christos ad67e04154 backout previous kprintf change 1996-10-13 16:50:51 +00:00
is 65e53018c2 Fix an error message, and extend it to indicate possible workarounds. 1996-10-13 13:39:52 +00:00
jonathan 8b2066b7ad Remove sys/arch/pmax/pmax/{locore.S,trap.c}.
Use versions from sys/arch/mips/mips instead.
1996-10-13 13:24:48 +00:00
jonathan 4be3cd1350 Remove pmax/tc/if_le.c. Superseded by sys/dev/tc MI TC/ioasic lance drivers. 1996-10-13 13:18:06 +00:00
jonathan 23ad284399 Remove obsolete `#include <machine/MachConst.h>'.
Where CACHED_TO_HYS() is still needed for kernel-virtual-to-physical
or physical-to-uncached mapping (fb drivers), replace with
`#include <mips/cpuregs.h>'.
1996-10-13 13:13:50 +00:00
jonathan 0c048bf278 poll(2) changes for rcons, pmax framebuffer hardware-independent layer. 1996-10-13 12:47:55 +00:00
jonathan 1f97bf2ceb Update SCCS id to 4.4-lite2. We already had lite2 tz.c changes from
Raph Cambpell.
1996-10-13 12:34:20 +00:00
jonathan e1a0a7fc77 Split dcparam() into two parts:
* dcparam() with normal tty t_param interface, which calls
    * cold_dcparam() called with explicit dc7085 register address
      and flags, which does the work and is also callable when cold,
      to set up console (or kgdb) line parameters.
1996-10-13 12:25:50 +00:00
jonathan 04cc01fd56 Commit arch/pica/pica/pmap.c changes from August 1996:
* use mips_round_page,mips_trunc_seg() instead of
    pica_round_page(),pica_trunc_page().
  * discard (unused) return value from TLBUpdate(), and delete
    (unused) temporary variable used to hold it.
1996-10-13 11:39:52 +00:00
jonathan fba8024a86 Add (missing) PAGE_IS_RDONLY() macro to test for readonly pages,
in both mips-I and mips-II versions, and use it in arch/mips/mips/trap.c.
1996-10-13 09:54:39 +00:00
jonathan 6ac1fdec40 Merge mips1 and mips3 pte/pmap code, pass 0;
* Move mips-I pte (TLBlo) definitions from pmax/include/pte.h
      to mips/include/mips1_pte.h

    * Move mips-III pte (TLBlo) definitions from  pica/include/pte.h
      to mips/include/mips3_pte.h

    * Add new mips/include/pte.h, which includes exactly one of
      mips1_pte.h or mips3_pte.h (which still have namespace collisions),
      depending on "options MIPS1" or "options MIPS3". (hack).
      Move soft kvtopte(), ptetovk() definitions to mips/include/pte.h

    * Add macro PTE_TO_PADDR() to hide the different hardware TLB formats
      when mapping from pte to physical address.

   * Add macro PTE_READONLY() to hide lack of SW read-only bit in mips-III
     tlb. (mips1 pmap uses a sw bit in the PTE, mips3 looks up RO bit in
     the kernel pmap.)

   * Use macros (not direct TLB frobbing) in mips/trap.c, to make it
     mips-1/mips-III indepenndet.

    * Change {pmax,pica}/include/pte.h to just do #include <mips/pte.h>.
1996-10-13 09:28:53 +00:00
jonathan a179b23932 Add marker labels to the end of the exception-vector (and exception
jump-table) locore entrypoints, so the stack traceback code can use
the end marker to handle entry points specially when doing  tracebacks,
even if it doesn't know about them  explicitly.
1996-10-13 08:45:15 +00:00
jonathan 96eb3c22a4 Commit (very old) partly-merged ARC Pica mips3 trap handler code:
* fold in netBSD style changes:
      ``if (foo = bar)'' -> ``if ((foo = bar) != 0)''
    * add mips1 vector as well as mips3 vector
    * change vector names to make mips1 and mips3 locore entrpoints distinct
    * add pmax additions (e.g., old fixes to ktrace code, kernel-TLB_miss
      instrumentation)
   * update stack traceback code to a newer version of the pmax code.
1996-10-13 08:15:40 +00:00