Commit Graph

12510 Commits

Author SHA1 Message Date
pk d71930e6c9 Put native NetBSD disk label in a piece of wasteland within a SunOS label.
read_disk_label() uses the native label if present.
write_disk_label() constructs a SunOS label around the native one.
1996-06-29 22:38:11 +00:00
pk 80c64cc71d Put native NetBSD disk label in a piece of wasteland within a SunOS label. 1996-06-29 22:33:16 +00:00
leo 3fa481b30d Update to match NetBSD version. 1996-06-29 20:51:58 +00:00
leo 1ed5af88ee Define LIBCRT0. This tries to defeat the attempts of bsd.prog.mk to add
${DESTDIR}/....crt0 to the link rule when $DESTDIR is set.
1996-06-29 20:48:41 +00:00
leo 4b558a4b6a Remove references to kern_extern.h 1996-06-29 20:24:25 +00:00
pk e2ec1dab69 Avoid compiler warning on SUN4-only kernels. 1996-06-29 20:10:50 +00:00
pk 4ce982125b Need to add another `if defined(SUN4M)'; noticed by David Gilbert. 1996-06-29 20:09:40 +00:00
chuck cc499a99d9 change:
- change asock to rxhand and adjust all for this [esp atm_input]
1996-06-29 20:07:05 +00:00
chuck 685684df93 change:
- change rxso into a void handle ... no need to know details at this low
        level.
fix:
 - forgot to init "vci" during ENOTHER_DRAIN case of RX DMA interrupt
        [could cause a vm_fault on native mode connection close depending
        on needing to drain out the VC and also the random value of vci]
1996-06-29 20:00:44 +00:00
abrown de7ece6ce5 Prevent recursive invocation of mcount() while in kernel by setting profiling
state to BUSY while in mcount(). This allows profiling to work when mcount()
calls a profiled routine (for example, udiv on the SPARC).
1996-06-29 14:30:32 +00:00
chuck a2efd3b632 add hook for user to turn on/off raw mode 1996-06-28 02:34:34 +00:00
chuck d8f8995650 new: add all needed hooks to engage raw mode. 1996-06-28 02:32:24 +00:00
chuck 849f947488 fix/improvement:
- add proto if atm_input
 - add native mode atm hooks to if_atmsubr.c (atm_input)
1996-06-27 04:34:17 +00:00
chuck ff6f7d186b fixes/improvements:
- more stat counters (rxmbufout -- mbufs, ttrash -- trashed RBD)
 - add swsl_size to keep track of size of software slist
 - revise when we call en_service
 - fix handling of circular lists (was getting full vs empty confused in
        extreem cases...)
 - native mode atm: remove sbappend code: can't do it here since
        socket buffer is protected only by splsoftnet and that doesn't
        mask enintr off.    forces us to switch to a two level interrupt
        scheme.    revise call to atm_input to reflect that.
1996-06-27 04:29:40 +00:00
jtc 209801c89e Add memcpy.c to SRC_sa 1996-06-26 19:32:32 +00:00
thorpej 180c16eff6 Oops, forgot this required change in previous commit. 1996-06-26 18:11:24 +00:00
thorpej fc699e8440 Major revamp of the boot code.
- Good bye SYS_PBOOT and SYS_NBOOT, hello SYS_UBOOT (unified boot)
	  Currently supports booting from SCSI and HP-IB disk and network
	  from a single boot block.  Infrastructure for booting from
	  HP-IB tape is there, but it doesn't quite work yet.

	- Add a slightly modified version of Gordon Ross's "rawfs",
	  which provides a filesystem-like interface to tape devices.
	  Still needs debugging (see above).

	- Rename sys_inst.c to inst.c, so that the LIF directory entry
	  turns out right (used to look like SYS_SYS_I if loaded from
	  tape).

	- Add a "netio_ask" hint to netio.c, so that a special instnetio.o
	  doesn't have to be compiled for SYS_INST.  Defaults to using
	  bootparams, but if set, will prompt user for information
	  usually obtained from bootparams.

	- General cleanup.
1996-06-26 17:44:21 +00:00
is a63c9b84e2 - Add code to loadbsd.c to allow booting on DraCos. This could be done
in a more elegant way, but it works as is, and we need it now.
- Add a README and Makefile for the above. Note that this directory should
  NOT be added to ../Makefile's SUBDIRS.
1996-06-26 15:53:05 +00:00
jonathan d41e338edc * Put in fix to in bytestuffing/RLL code from Stuart Cheshire, that
somehow got lost between NetBSD and Linux.    Output side mbuf-walking
  code now correctly bytestuffs mbuf chains, as well as single mbufs
  and clusters.

* Update radio error-parsing code to Stuart's latest stable code.
  We now parse error messages the older code didn't.

* Note where radio-crash watchdogs should be added (the linux code
  is there, #ifdef'ed out). This still just  doesn't work.
  The radio reset doesn't always work even when slattatch is first started,
  but I have a radio with old firmware, which may be a contributing factor.

* Correct the checks for the tty output queue being overfull;  estimate
  the stuffed pkt size as  (original * 65/64) + STRIP_HDRLEN + 2,
  instead of SLIP's (2*SLMTU).  Re-enable the disabled  check now the
  size estimate isn't excessively large.

* Fix BPF tapping of strip interfaces,  STRIP packets are wrapped
  in a SLIP bpf  header.   This implies no BPF support for arp or atalk,
  even though Linux boxes are sending arp requests and  gratuitous arps.
  There may be no good  fix short  of adding explicit  STRIP encapsulation
  support to bpf/tcpdump.

* Still need a solid walkthrough, and  rewrite to eliminate redundant
  receive-side mbuf copying.
1996-06-26 06:04:20 +00:00
jonathan 9f364d3a3b Rename unused macro ELF_HDR_SIZE -> MIPS_ELF_HDR_SIZE to avoid clash
with #define of ELF_HDR_SIZE in MI elf code.
1996-06-26 04:41:41 +00:00
phil 99db994eea Move to the MI ncr5380 driver. 1996-06-26 04:31:33 +00:00
chuck 4ac1ba7fe7 [1] add new rxso passing structure to if_atm.h
[2] modify atm_output to handle native mode atm output mbufs
1996-06-26 04:22:54 +00:00
chuck a08c95305d fixes/new stuff:
[1] if user tries to enter in a bogus PVC don't leave it in the routing
        table ... remove it
[2] change ioctl arg to include rxso for lower layer
[3] add hooks (inside "NATM" ifdef) for native mode atm sockets so that
        they don't clash with IP PVCs.   [i am still debugging the native
        mode atm socket protosw code]
1996-06-26 04:18:44 +00:00
chuck 39b4f89493 fixes:
[1] rxslot "cur" pointer wasn't updated if we copied all data and
        didn't have any fill.   this could cause a service id mismatch
        panic under load.
  [2] recv of aal0 forgot to include the cell header in the data length
        calc [add cell header length to midwayreg.h]
  [3] fix control info "chop" for raw mode and aal0
  [4] handle rxsb better for native atm connections
        (XXX: still working on this ... not complete and needs revision)
1996-06-26 04:08:53 +00:00
pk 1a04146533 A couple of emulation enhancements from der mouse's PR#2411:
- ability to be either a BROADCAST or POINTTOPOINT interface.
	- a humble beginning of link-layer addressing (differs from PR
	  by using a `struct sockaddr' instead of single byte).
1996-06-25 22:15:13 +00:00
thorpej 698844254e A few simple changes:
- Use an extent map to manage the ISA memory "hole", much like
	  how i/o port space is manged with an extent map.  Do the actual
	  accounting in bus_mem_{,un}map().

	- When creating the ioport and iomem extent maps, pass the
	  EX_NOBLOB flag, which tells the extent map code to disallow
	  fragmenting of regions.  This will make it easier to catch
	  simple i/o and memory mapping bugs (like the if_ed.c bug I just
	  fixed) in the future.

	- In bus_mem_map(), a chunk of code was indented using spaces.
	  Make the indentation use tabs.

	- In bus_io_unmap(), fix the format passed to printf().
1996-06-25 21:22:48 +00:00
thorpej 794614df64 In the 3c503 probe, map the correct number of ports. (Unmap already
unmapped the correct number of ports, thus causing the ISA io port
extent map to get corrupted.)
1996-06-25 20:47:02 +00:00
jonathan 8445253ad3 Fix 4.4bsd/pmax memory-sizing bug:
physical memory is sized by a loop that writes data to the first
word in a page, (writes something else to settle the bus) and then reads
back the word it wrote. If the read succeeds, the amount of physical
memory is increased by one page.

This fails on a 5000/1xx with a memory subsystem filled with 8 low-density
(4Mbyte) SIMMs. The memory-decoding hardware  aliases the 32Mbytes of
physical memory  at physical addresses 0, and at 32M (and presumably
at 64 and 96Mbytes.)  The contiguous aliasing causes the memory-sizing
loop to continue  at 32 MBytes, testing the memory that's really
at address 0,  overwriting and crashing the kernel.

Fixed (for 1.2) by reading the SIMM-decoder stride size from the
motherboard, and reducing the loop bound to 32Mbytes on a 5000/1xx
with low-density SIMMs.  (Other models have a non-power-of-2 maximum
memory and so are not subject to _contigous_ aliasing of physical memory).
1996-06-25 05:47:31 +00:00
pk 6e8ba625ef Ignore the mountpoint's `v_usecount' in nfs_unmount() if MNT_FORCE is on.
This takes care of two related problems:
	- `umount -f' wouldn't work if someone's working directory is
	  the filesystem root.
	- vfs_unmountall() would complain about a busy `/' on a
	  diskless setup.
1996-06-24 10:26:40 +00:00
jonathan 7620af6671 Fix 4.4bsd/pmax bug in memory-sizing loop:
The physical memory-sizer claims to preserve memory contents
(specifically the contents of msgbuf).  The loop writes different
values into two adjacent locations and reads the contents of the
first, to ensure that whatever is read back from the first location is
from memory and isn't just the first write persisting on the bus.

The loop preserved the value of the first location, but not the second,
resulting in the second test value ('ZZZZ') over-writing a word in msgbuf.
1996-06-23 21:08:54 +00:00
thorpej 9b69016c08 Now that we have i/o port accounting, change the mainbus attach
order back to the (correct) pci -> eisa -> isa ordering.
1996-06-23 20:11:27 +00:00
thorpej 8c2f15c6fc New implementation of bus_io_{,un}map() for the i386. Details:
- A fixed extent map (statically allocated descriptor storage) is
	  created in init386(), just before the call to consinit().  The
	  fixed descriptor storage has enough room for 8 region entires,
	  which is plenty for early initialization, but doesn't chew up
	  that much memory.

	  This extent map (ioport_ex) manages the i386 i/o port
	  space (0x0 - 0xffff).

	- Just before the call to configure() in cpu_startup(), a
	  flag is set which notifies the bus_io functions that it is
	  safe to use malloc() to allocate descriptor storage, in the
	  event that more than 8 regions are needed.

	- bus_io_map() attempts to allocate the specified region from
	  ioport_ex.  If the allocation succeeds, the io handle is
	  filled in.  If the allocation fails, it is implied that
	  something else is already using that io space, and an
	  error condition is returned.

	- bus_io_unmap() frees a region previously allocated from
	  ioport_ex in bus_io_map().  If the free fails, a warning
	  is printed on the conole.

These changes implement "port accounting".  This is required for
proper autoconfiguration on the i386 port, and makes dealing with,
among other things, PCMCIA io mappings _much_ easier.
1996-06-23 19:59:06 +00:00
briggs 4043c93c6f Format the NetBSD Id string like it is elsewhere 1996-06-23 15:30:51 +00:00
briggs 9f01fc6ee4 Add a comment about the last change. 1996-06-23 15:02:58 +00:00
mycroft 865bfae299 Return ENOPROTOOPT rather than picking pseudo-random error values.
Don't allow SIOCGET{VIF,SG}CNT from sockets other than the multicast router.
Restructure rip_ctloutput() like ip_ctloutput(), and fix memory leaks.
1996-06-23 12:12:44 +00:00
mycroft 5262bdf053 Remove the old (broken) setre[ug]id() emulation. 1996-06-23 11:20:42 +00:00
mycroft fdc697b5e9 Catch up with setre[ug]id() changes. 1996-06-23 11:17:50 +00:00
mycroft 1328302bd9 Regen. 1996-06-23 11:16:12 +00:00
mycroft 365a977533 Catch up with setre[ug]id() changes. 1996-06-23 11:13:32 +00:00
mycroft f01b3b1837 Regen. 1996-06-23 11:12:22 +00:00
mycroft 3bbb29fe03 Catch up with setre[ug]id() changes. 1996-06-23 11:10:01 +00:00
mycroft 8ea2fc5788 Regen. 1996-06-23 11:08:01 +00:00
mycroft 351bdbd445 Implement setre[ug]id() compatibly with 4.3BSD, SunOS, and Linux. 1996-06-23 11:04:11 +00:00
thorpej 5253727570 From Ignatios Souvatzis <is@NetBSD.ORG>:
- handle fpfault properly on the 68040
	- properly distinguish between a bus error and an MMU fault
	  on systems with 68030 or 68851 MMUs
1996-06-23 05:48:12 +00:00
thorpej 6041e29f1f My extent map manager. Sort of like resource maps, but more flexible.
Understands allocation aligment and boundary restrictions, "specific region"
allocations, and suballocations.  Capable of statically or dynamically
allocating map overhead.

Many thanks to Matthias Drochner for running the code for me, and sending
me bug fixes, optimizations, and suggestions.  Also, many thanks to
Chris Demetriou for his extremely helpful suggestions.

XXX No manual page yet.  One is forthcoming, as soon as I can scare up
the time to write one.  This has been sitting on my plate for quite a
while, and several projects are waiting for it.  Time to move on.
1996-06-23 00:10:08 +00:00
leo 1cf023be2b s/keymaps/keymap/ 1996-06-22 21:01:29 +00:00
leo d7160491e3 Install loadkmap in the default distribution. The keymap files are moved
to ..../stand/keymaps and have their own Makefiles there.
1996-06-22 20:21:55 +00:00
leo 323c486e74 Add the subdirs: binpatch, keymaps and loadkmap. 1996-06-22 20:18:15 +00:00
leo 1a5ae2120a Atari keyboard maps 1996-06-22 20:14:09 +00:00
chuck 7544016a9d sbus specific stuff for eni155s sbus atm card.
XXX: only works on sun4c, needs something better than vtophys() for
	machines with IOMMUs(?).
1996-06-22 02:02:48 +00:00
chuck 254ec3a7ef pci specific code for the eni155p card 1996-06-22 02:00:31 +00:00
chuck d96712ec4b regenerate to fix "generated from" comment
(next commit pcidevs first, then regenerate)
1996-06-22 01:58:54 +00:00
chuck cf4c02966d add product code for efficient networks eni155p atm card and regenerate 1996-06-22 01:55:43 +00:00
chuck ba63d22426 add support for efficient networks midway atm chip. 1996-06-22 01:50:52 +00:00
chuck e186894640 add atm networking stuff 1996-06-22 01:49:00 +00:00
chuck d9c6fd68b8 network support for ATM networks (ATM == Async Transfer Mode, not
Automatic Teller Machine).

Currently supports PVCs only (no ATM ARP either).
1996-06-22 01:47:35 +00:00
is 24a0b3ecb0 Forgotten $(DESTDIR) in special install rule. 1996-06-21 21:55:53 +00:00
briggs 8d1606fcb9 Move splimp back to spl2 (from spl4). 1996-06-21 21:51:15 +00:00
pk 51347fcaaa Return useful file descriptor when opening a raw device. 1996-06-21 20:51:23 +00:00
pk 68f420b593 Oh, what's in a name.. 1996-06-21 20:29:28 +00:00
pk b461ef1d17 Allow seeks on raw devices. A `f_offset' field is added to the file structure
which is maintained in lseek(), read() and write(), and passed along to
the device's strategy routine.
1996-06-21 20:09:03 +00:00
scottr 231a66aa69 Minor style cleanup (avoid goto); no functional change. 1996-06-21 06:12:45 +00:00
scottr 08a2715e38 Test for serial console in adb_init() early, and abort if we're using it.
Initiialize ROM vectors regardless of this so that the PRAM RTC read and
write work regardless of whether a serial console is in use.
1996-06-21 06:10:56 +00:00
pk 43cca6772f `rd_root.c' => `md_root.c' 1996-06-20 20:17:57 +00:00
pk ba3ce100e0 memory disk driver hooks to pass on the root filesystem bits.
Note: this file is called `md_root.c' in anticipation of the forthcoming
`rd' => `md' rename.
1996-06-20 20:15:40 +00:00
pk b0b2a995cd When booting from a floppy drive and RAMDSK_HOOKS is defined, arrange for
a callback from memory disk driver to load the actual root image.
1996-06-20 20:12:31 +00:00
pk d802ca2b2a Declare a memory disk at block device #5. 1996-06-20 20:07:45 +00:00
pk 417fc9581d ramdisk stuff 1996-06-20 20:06:16 +00:00
pk 5b9021505a ramdisk stuff. 1996-06-20 20:05:46 +00:00
pk a0222c1293 Turn on disconnect/reselect by default on targets 4-7 on the premise that
tape devices normally are set to one of these targets. Tape devices should
be allowed to disconnect for the SCSI bus to operate acceptably.
1996-06-20 19:50:41 +00:00
leo e07a535f4e Some minor nits. 1996-06-20 19:41:01 +00:00
is 0569d3582c Use the right microsecond delay address. To achieve this, also map that
piece of hardware into kernel virtual memory (was only a guess 'til now).
XXX Unfortunately, the hardware vendor reserves the right to change this in
future DraCo revisions. We must rethink delay() and DELAY(), at least for the
DraCo, soon.
1996-06-20 09:31:58 +00:00
jonathan fc7c84da3a Explictly credit Per Fogelstrom for the mips shared library support in elf.c,
which was taken from OpenBSD/pica.

The previous revision of elf.c replaced Ted Lemon's elf exec machinery
with something closer to Christos' MI elf machinery. It turns out
that old NetBSD/pmax elf binaries have three segments, and the newer
elf exec machinery cannot exec them.

The old elf exec machinery is folded back into cpu_exec.c, which falls
back onto using the old machinery if the new machinery fails. The
old-style binaries will be deprecated at the 1.2 release.
1996-06-20 07:06:36 +00:00
scottr 02f1ebc3de SPOT is now an NFS server, too. 1996-06-20 04:11:55 +00:00
gwr e1cc05a94c Fix ZMAGIC (from Chuck Cranor) 1996-06-20 03:59:41 +00:00
gwr a1ec070f97 Take control over the kernel libraries so cross-build is easier. 1996-06-20 03:47:27 +00:00
gwr 4bb67f0a27 Take control over the kernel libraries so cross-build is easier. 1996-06-20 03:11:06 +00:00
pk dba83379bd Remove a "notyet" in last commit. 1996-06-19 13:30:49 +00:00
pk c7fc34ac08 add tcx device at major number 109 1996-06-19 13:28:14 +00:00
pk 3da87417d2 tcx declaration 1996-06-19 13:25:01 +00:00
pk 5f5407c39e add tcx 1996-06-19 13:23:25 +00:00
pk c6d4bf55e3 Add tcx definition. 1996-06-19 13:21:09 +00:00
pk f62f900f6c First go at a TCX framebuffer driver. This version does enough to
load and store colour lookup tables
	blank the screen / put monitor in power-saving mode
	make X11 run on it in `cgthree' emulation.
1996-06-19 13:17:35 +00:00
scottr 758ea43e99 Completely revamp setroot() and friends. Since Chris' version of this code
is close to how I reworked it, I pulled in the (essentially MI) NetBSD/alpha
and added the appropriate support around it.

- No need for the GENERIC kernel config option.
- NFS-mounted root and swap are supported.
- If we can't figure out where the root filesystem is from what the Booter
  tells us, ask the user.
- Split the mainbus autoconfig code to a separate file.

Also, update/add copyrights as appropriate.
1996-06-19 03:21:03 +00:00
briggs 37472fd212 Remove Alice copyright. 1996-06-19 02:20:54 +00:00
briggs 09eef8070d Remove Alice copyright and comment from '92. 1996-06-19 02:19:13 +00:00
scottr 6c3aabe226 Update some comments, and the copyright 1996-06-19 01:47:28 +00:00
mycroft 506cefab8c In the sync case of bwrite(), move the accounting earlier so that so that the
delayed write is logically converted to a sync write, mirroring the async case.
In bdwrite(), move the tape case earlier to avoid needless reassignbuf()s.
1996-06-18 20:50:23 +00:00
is 40cd9f0062 During the data type cleanup, a bug crept in in the code handling mbufs with
odd length. This would lead to corrupt data sent.
1996-06-18 20:50:00 +00:00
gwr a2b74a415d Several minor changes to make cross-compilation easier.
(I do most compiles on a sparc these days...)
1996-06-18 16:18:34 +00:00
mycroft a8e5b5ba47 Remove some unneeded FIFO flushes and reorder some register changes per the
6360 manual.  Turn off synchronous negotiation.
1996-06-18 16:13:05 +00:00
gwr d3b59f36ab Add the field "pcb_mmuctx" for future use by the pmap code.
(This will make later update of the pmap code much easier.)
1996-06-18 16:03:45 +00:00
mycroft 202bd8b9ae Turn off *DIAG by default. 1996-06-18 12:55:00 +00:00
is 59bbde87bc Don't use the inline assembler 64bit integer division if our kernel might
run on 68060. Some graphics boards need delay() in early initialization (that
is, before initcpu() was called.
1996-06-18 11:41:48 +00:00
leo 2c4c524e54 Use -S rather than -x for "normal" link flags. 1996-06-18 11:12:32 +00:00
leo 1301d25702 Pull down from release. Sorry, should have been the other way around.... 1996-06-18 11:10:04 +00:00
mycroft 60f46fb10b Increment the boot block version. 1996-06-18 07:51:26 +00:00
mycroft 584f242944 Don't advance to the next default name if the user typed something.
Make gets() return void.
1996-06-18 07:47:02 +00:00
mycroft 398b638fbb Add comments on #else and #endif. Move #ifndefs outside of comment blocks. 1996-06-18 07:17:47 +00:00
mycroft b360b90a92 Save %esi and %edi around BIOS calls. Also, reference arguments through
%esp rather than %ebp, to avoid needing to change %ebp on entry.
1996-06-18 07:03:44 +00:00
leo cf50b9a115 Add fpfault & bus error handling corrections from Ignatios Souvatzis. 1996-06-18 06:13:46 +00:00
mycroft f2d34a2c9a Compare device types with strcmp(). Remove special case for `wt'. 1996-06-18 06:10:33 +00:00
mycroft 8a706cd17f Add a ONEDISK option to elide the getc(). 1996-06-18 06:06:38 +00:00
mycroft 0ca0eeec5f Clean up the install target. 1996-06-18 06:05:44 +00:00
leo d84f4c4b18 Add tty_attach() calls. 1996-06-18 05:54:59 +00:00
mycroft 36720c448c Use the BIOS memory sizes passed in by the boot program, to preserve the BIOS
data area.
1996-06-18 01:53:07 +00:00
gwr bf7ab63c97 Move some of the DMA engine initialization from the "start" routine
to the "setup" routine.  Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
1996-06-17 23:21:29 +00:00
pk b298c40fbe Call reassignbuf() at splbio in bdwrite(). 1996-06-17 22:21:31 +00:00
cgd b2dca977c5 FPA probe would always return zero, because of incorrect return statement.
Patch provided by Peter Galbavy in PR 2555.
1996-06-17 18:29:18 +00:00
gwr dc066b6a10 KGDB support 1996-06-17 15:40:36 +00:00
gwr af3f9266db Correct return type of boot() and reboot2(). 1996-06-17 15:27:16 +00:00
gwr 3274834c18 Use the PROM->input_source setting instead of EEPROM to determine
where the console is, because that is correct if, for example, you
boot with the diag/norm switch set for diagnostics and the EEPROM
is set for keyboard/display.
1996-06-17 15:17:06 +00:00
jonathan 9fedff95ce Update mipspmax elf exec support:
* Update arch/mips/mips/cpu_exec.c to include MI exec_elf.h header,
    and to use the MI interface exec_elf_makecmds().
  * Replace arch/mips/mips/elf.c (Ted Lemon's elf code) with
    a version of Christos's MI elf exec code, munged to support demand paging
    and mips shared libraries.
1996-06-17 10:51:28 +00:00
jonathan 2311fa5f31 Fix typo, colon instead of semicolon when DS_5000_25 is not defined. 1996-06-17 07:59:39 +00:00
jonathan b212f1b0c1 Move cpu_singlestep outside of #ifdef DEBUG/#endif; the process-tracing code
in  mips/mips/process_machdep.c (erroneously) calls cpu_singlestep().
1996-06-17 07:55:13 +00:00
oki ff21e075f0 added wait for insert system floppy 1996-06-17 07:28:58 +00:00
jonathan 26626be148 Before calling a signal handler, set $t9 to the user-level signal
handler address.  May be needed by sysv ABI for shared libs.
1996-06-17 06:36:34 +00:00
oki 8da30c1475 fd* is need to boot from floppy 1996-06-17 06:09:30 +00:00
pk 5d5e7cf75e bootpath detection: some (newer?) v2 prom versions use actual device address,
e.g. `/fd@1,72000000'.
1996-06-16 23:28:18 +00:00
mhitch cd2de87a62 Fix cpu configuration display - extraneous "\n" was printed. 1996-06-16 17:05:33 +00:00
mhitch d5cb319823 Fix to compile if DS3100 is not defined when building without DS3100 support. 1996-06-16 17:03:18 +00:00
mhitch dbd6d91a1f Fix to compile if DS3100 is not defined when building without DS3100 support.
Now that autoconf parameter passing is cleaned up, configure the cpu.
1996-06-16 17:01:46 +00:00
mhitch 2c4f6b4b82 Don't modify rz_softc[] entries beyond what was configured.
Show proper inquiry data when version >= 1, not <= 1 (SCSI-2 devices
now display their inquiry infor).
Correct transfer length passed to dk_unbusy (b_resid hasn't been
updated yet).
1996-06-16 16:57:31 +00:00
mhitch 40c440b66e Do tty_attach() for serial lines and MAXINE console. 1996-06-16 16:50:56 +00:00
mhitch 56a2e98b80 Do tty_attach() for serial lines. 1996-06-16 16:49:07 +00:00
oki 3b090d3e8f fixed to write disklabel correctly. 1996-06-16 09:07:59 +00:00
briggs b4c60fd801 port-m68k/2547: wrong bus error detection from is@beverly.rhein.de. 1996-06-15 21:25:21 +00:00
oki 3e629c7765 deleted invalid MANDIR line. 1996-06-15 20:15:54 +00:00
jonathan d56e7d7f50 Fix for PR #1828 and partial fix for PR #2548:
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
  option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
  if it means "support for DS5000/200" or "support for any TC machine".
  This implictly fixes pr 1828.

* Use the  "tc.h" and NTC generated by config for a "tc? at mainbus"
  where appropriate, intsead of #ifdef DS5000.


* Canonicalize the spelling of kernel options that enable support
  for particular models. Use
	DS5000_25	for the Personal Decstation aka MAXINE aka KN02-ca
	DS5000_100	for the 5000/1xx series aka KMIN aka KN02-ba
	DS5000_200	for the 5000/200 aka 3MAX aka KN02
	DS500_240	for the 5000/240 aka 3MAXPLUS aka KN03

and change  DS_5000_xxx to DS5000_xxx everywhere.

* Wrap the  interrupt handlers for each model in the appropriate #ifdef,
  instead of wrapping all of them with "#ifdef DS5000".

* Wrap the TC autoconfig for each model in the appropriate #ifdef.
1996-06-15 19:05:24 +00:00
gwr 8ef4845dec merge 1.2 changes 1996-06-15 14:58:02 +00:00
gwr 7d5909191e Remove unnecessary CPP conditional around file contents. 1996-06-15 14:47:49 +00:00
gwr 75a1ca034a Add KGDB support 1996-06-15 14:34:32 +00:00
jonathan 6f359b538f Fix for PR #1828 and partial fix for PR #2548:
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
  option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
  if it means "support for DS5000/200" or "support for any TC machine".
  This implictly fixes pr 1828.

* Use the  "tc.h" and NTC generated by config for a "tc? at mainbus"
  where appropriate, intsead of #ifdef DS5000.


* Canonicalize the spelling of kernel options that enable support
  for particular models. Use
	DS5000_25	for the Personal Decstation aka MAXINE aka KN02-ca
	DS5000_100	for the 5000/1xx series aka KMIN aka KN02-ba
	DS5000_200	for the 5000/200 aka 3MAX aka KN02
	DS500_240	for the 5000/240 aka 3MAXPLUS aka KN03

and change  DS_5000_xxx to DS5000_xxx everywhere.

* Wrap the  interrupt handlers for each model in the appropriate #ifdef,
  instead of wrapping all of them with "#ifdef DS5000".
1996-06-15 08:57:52 +00:00
jonathan 78688c01fe Update kn01_intr() to allow configuration of the kn01 (ds3100) baseboard
lance device at any unit number, not just le0. Other unit numbers
(and interrupt handlers) are still hardcoded.
1996-06-15 07:11:20 +00:00
cgd e8fab58348 allocate a flat 10% of memory to buffer pages. 1996-06-15 03:55:17 +00:00
cgd 55651c941b punt on the grep and do all the file selection in find. don't try
to build kernels from files with '.' anywhere in their names.
1996-06-15 03:45:02 +00:00
cgd d73abf41aa avoid unnecessary checks of m_get/MGET/etc.'s return values. When
they're called with M_WAIT, they are defined to never return NULL.
1996-06-14 22:21:12 +00:00
cgd 1beca2d96b add a new machine-dependent sysctl, machdep.root_device, which is the
(string) name of the root device.  It's a string so that it can
be used before dev_mkdb has been run.
1996-06-14 20:40:46 +00:00
cgd 5c5c2d1804 add a delay before serial console is initialized, to allow any
outstanding PROM output to drain.  Move the console-type printfs
so that they're only printed if console selection fails.
1996-06-14 20:38:11 +00:00
cgd ef8b4f596a clean up entry printf 1996-06-14 20:04:45 +00:00
cgd 643339aa90 Don't pass arguments to the kernel, trim unnecessary environment
calls, kill 'ask' loop (i.e. if boot fails, halt), seperate
ECOFF and a.out support into seperate options.
1996-06-14 20:02:52 +00:00
christos e2e0f65050 Merge pagedvn changes from OpenBSD and added mips defines. Also added
ELF_MAP_PAGE_ZERO define. The entry point computation is different than
the one OpenBSD uses.
1996-06-14 18:15:55 +00:00
mrg 2a0f025a41 use VATTR_NULL macro. 1996-06-14 09:27:23 +00:00
oki 5e55373e7a change BINDIR /usr/local/bin --> /usr/bin 1996-06-14 05:16:53 +00:00
scottr 3f231717ab raise splimp() to spl4(); we need to block zs interrupts, too. 1996-06-14 04:42:50 +00:00
jtc 2074cccbb8 Cast `sec' to a u_quad_t in `sec * 1000000 + usec' so the expression
is computed with quad integer arithmetic (so it won't overflow after
4294 seconds).
1996-06-13 23:22:22 +00:00
cgd 1a6ddd64d7 cpu_model must be an array to make sysctl be happy. 1996-06-13 23:16:43 +00:00
cgd 0729742246 fix error in 'swap generic' nfs root picking code (a case that can never
currently happen) which forgot to set rood device correctly.
1996-06-13 23:10:37 +00:00
gwr e63a9d929c Add tty_attach(), and fix a type mismatch. 1996-06-13 23:05:40 +00:00
jonathan 465d53bd4d Fix sense of strcmp() comparison that broke dcmatch() on real ioctl asic hw. 1996-06-13 22:43:33 +00:00
pk 7b9f9e5426 Check user access rights only if `uio_segflg' says it's a user space buffer. 1996-06-13 22:30:18 +00:00
pk e2655dd7cc Allow DIAGNOSTIC kernels a FLUSHWIN trap in order to record stack traces
(currently used by the nullfs filesystem code, noted by der mouse).
1996-06-13 22:26:21 +00:00
cgd af576d8a9f no need for a local implementation of SIOCGIFMTU; delete it.
s/ifr_metric/ifr_mtu/ where appropriate (in SIOCSIFMTU code), since
MTU data no longer (loggically) stored in ifr_metric.
1996-06-13 21:51:53 +00:00
cgd 1f29d4b51f no need for a local implementation of SIOCGIFMTU; delete it. 1996-06-13 21:50:32 +00:00
cgd ba3b2a87a2 implement SIOCGIFMTU in a generic manner, by pulling the MTU out of
each netif's if_data structure.  There's no point in making each
driver implement this ioctl.
1996-06-13 21:49:43 +00:00
cgd 2e3d795708 add an ifru_mtu member to the union in 'struct ifreq', and add a
#define so that ifr_mtu accesses that.  MTU shouldn't be overloaded
with ifr_metric, if only for clarity.  Adding an MTU field to the
union hurts nothing (in fact, does not actually _change_ generated
code), and does improve clarity.
1996-06-13 21:48:34 +00:00
cgd 49c6ac313f update readme files for present reality. 1996-06-13 20:36:04 +00:00
christos d83602c110 Simplify and add comments. 1996-06-13 19:27:01 +00:00
cgd 53a97a8870 get rid of now-unnecessary kernel config files (now that swap generic
works) for my machines and now-nonexistent test machines.  Clean up
options in existing config files so that they're more consistent.  Add
more units of various pseudo-devices to several.
1996-06-13 19:18:16 +00:00
is 052a8aa0ba Fix a bug in the 68020+68851 / 68030 branch of the buserr handler:
For these CPU's, you have to use the ptest operation to search the mmu
tables in order to decide whether it is a real bus error or just a
page fault or write protection violation.

Our old code assumed user space always when calling ptest, and
erroneously assumed the BUSERR bit in the ptest output (mmusr
register) is the only indication for bus errors to check.

In fact, we have to follow a multistage decision tree to decide. 68060
CPUs are much easier to handle correctly.
1996-06-13 19:12:25 +00:00
christos 4d9a6e0930 - Pass the Elf32_Ehdr in the linux probe function, and use it!
Since linux binaries are (mostly) always compiled with gcc, look for
the gcc signature in the .comment section header: "\0 GCC: (GNU) ".
I've changed the probe order in kern/exec_elf.c to probe for linux ELF
binaries first and fall back to SVR4 binaries. This makes statically
linked binaries work for both linux and svr4. Note that gcc-compiled
svr4 binaries, still contain the operating system signature first and
then the GCC signature, so there is no conflict. Yes this is a hack.
1996-06-13 18:42:01 +00:00
christos 9c07ccd65c - Add definitions for Elf section headers.
- Add prototype for elf_read_from.
- KNF.
1996-06-13 18:36:42 +00:00
christos 306987eb37 - Pass the Elf exec header in the emulation dependent probe functions.
- remove static from elf_read_from().
1996-06-13 18:35:25 +00:00
christos 5d27db0882 Pass the elf exec header in the probe function. 1996-06-13 18:33:54 +00:00
cgd 386aeb320f clean up copyright notices 1996-06-13 18:31:49 +00:00
mark 103a43ae29 Get the interrupt flags address from sc->sc_specific.sc_podule rather
than sc->sc_podule.
1996-06-13 18:29:45 +00:00
jonathan 592ca35c51 Fix typos in SUSP and DSUSP mapping when setting Ultrix posixmode tty
attributes  (was 112 and 113,  should be 12 and 13).
1996-06-13 18:13:34 +00:00
cgd 1abc77f86d if kmem_malloc() fails while trying to allocate an mbuf cluster, try
and free some space by calling m_reclaim().  Also, log the "mb_map full"
error message (at most) every 60-seconds.  The old code would log it
once over the lifetime of the system, but that's not a useful diagnostic.
(More useful is the new behaviour, which roughly indicates how often
periods of heavy load occur, without spamming the console and system
logs with messages.)
1996-06-13 17:02:23 +00:00
cgd 06c209646e handle the case where kmem_malloc() returns NULL in the 'can wait' case.
Right now, this code just panic()s (same as kmem_malloc() used to do
before, but different message), but in the future it should be modified
to try to reclaim wasted memory.
1996-06-13 16:53:34 +00:00
cgd 62034405e6 allow kmem_malloc to return NULL if canwait is set and there's no map space
left, rather than panic()ing.  This allows callers to set their own policy
for how to handle the shortage.  Add a few comments.
1996-06-13 16:52:06 +00:00
jonathan 7adf57b6f5 Fix the reworked autoconfiguration to also boot on a 5000/200.
Check and avoid trying to configure (or dereference unknown arguments
to dcattach() and dcmatch() when called with busses the driver doesn't support.
1996-06-13 08:06:12 +00:00
cgd f41d0a3d9b in select(), if it's a small number of file descriptors use a
automatic array rather than an array allocated with alloca().
(This was the only use of alloca() in the kernel, and it wasn't
necessary or consistent with the way other functions in this file
work.)
1996-06-13 05:08:47 +00:00
cgd d97900c6f4 boot device autodetection, using PROM's boot device environment variable.
This is a bit of a hack, as-is, since there's a lot of code that's
outright duplicated between the various files and because it doesn't
support detection of a network device as the root device.  The
latter's not a problem yet, because NetBSD/Alpha can't load the kernel
from the network to begin with.
1996-06-13 04:53:47 +00:00
cgd 1e2b610d5a #ifdef __alpha__, call a machine-dependent function with new device
structure and 'aux', right before ca_attach is called for the
newly-attached device.  This allows the alpha port to do root device
autodetection without modifying every bus and device driver which could
be in the 'boot path.'  In the long run, it may make sense to make
this machine-independent.
1996-06-13 04:50:29 +00:00
cgd 3a7c6bd270 note that the DEC 21000 isn't supported in the same way as for the 2000/300 1996-06-13 00:28:59 +00:00
cgd b26a6f1d3d We'd like to differentiate case for kernel boot flags, but the Alpha AXP
Architecture Reference Manual says that we shouldn't.  'a' is now back
to ~RB_SINGLE, and 'n' and 'N' now get RB_ASKNAME.
1996-06-13 00:24:52 +00:00
pk fbc5fd1fca Bound the buffer cache to 1/2 of kernel virtual memory, so machines with
lots of core don't run out of core (takes care of PR#2506).
1996-06-12 23:48:51 +00:00
pk 5ce90889f0 Remove unneeded header file. 1996-06-12 23:40:29 +00:00
cgd a59ba05045 don't pass "argc," "argv," and "envp" from boot blocks to kernel;
they're unnecessary and there's no reason to use them.  Have the
kernel get necessary values from the PROM directly.
1996-06-12 22:11:28 +00:00
cgd 3b3f71fb25 don't pass the firmware's console environment variable to the various console
initialization functions any more.  None of them used it, and they can
get the same data more easily via the RPB.
1996-06-12 22:06:40 +00:00
cgd f6d4b1367d null-terminate strings returned by prom_getenv() 1996-06-12 21:59:52 +00:00
mark 31c4f7d574 Only read beyond the first byte of the podule header if we know that
an extended header is present i.e. don't assume an extended header as
however unlikely there could be a podule that doesn't have one.
Calculate an absolute address for the podule's interrupt mask rather
than leaving it relative to the base address of the podule.
If the interrupt status pointers are not present or are zero then
used the default bits as specified in the podule specification to
determine if the podule is interrupting.
1996-06-12 21:09:55 +00:00
mark 857439698b Claim the interrupt when leaving the interrupt handler as there can
only ever be a owner of the netslot interrupt.
Don't declare ebintr() as static.
1996-06-12 21:01:56 +00:00
mark 27ab616466 Don't claim the podule interrupts but pass them on in case of
chained podule interrupt handlers.
Fill out the ih_maskaddr and ih_maskbits fields in the interrupt handler
structure so that interrupt dispatcher knows where to look to determine
if the handler should be called.
General code tidy up and source code formatting.
1996-06-12 20:59:10 +00:00
mark 4dd0dabfca Don't claim the podule interrupts but pass them on in case of
chained podule interrupt handlers.
Fill out the ih_maskaddr and ih_maskbits fields in the interrupt handler
structure so that interrupt dispatcher knows where to look to determine
if the handler should be called.
1996-06-12 20:46:58 +00:00
mark e5aad86168 Allow the mouse interrupt to be specified in the config file. Fall
back on timer 1 interrupts if none is specified.
Only set up timer 1 is the driver is using timer 1 interrupts.
Don't claim the interrupt but allow them to be passed on to other
handlers.
1996-06-12 20:30:59 +00:00
mark 7d688793a8 Claim the interrupt if it has been dealt with otherwise pass it on. 1996-06-12 20:28:29 +00:00
mark 08ec43427f Added some sanity checks to irq_claim().
Fixed the handling of IPL_NONE.
Debugged support for interrupt chaining.
Fill out the intrnames array with the name of the interrupt handler
currently at the head of the chain.
Guarded several sanity checks with #ifdef DIAGNOSTIC.
1996-06-12 20:23:58 +00:00
is 51e832dc49 Fix a few off-by-one errors in bitnumbers used by print_fcode.
ptestX fc,<ea>,M used to be printed with the wrong semantics of the fc
field, and could panic the kernel if fc was interpreted as a register number.
1996-06-12 20:22:42 +00:00
mark 459cefbe67 Added support for the RC7500 interrupt registers
Added interrupt chaining.
Removed some dead debugging code.
Guarded several sanity checks with #ifdef DIAGNOSTIC
Make sure interrupts are disable while updating the IOMD interrupt
masks.
1996-06-12 20:19:35 +00:00
mark 1fd9b6f37c Removed some dead code that could never get executed (followed a panic).
Updated several panic messages to indicate what part of the fault code
they came from.
1996-06-12 20:15:28 +00:00
mark 977f90bd3b Removed copyin()/copyout() stub code.
Removed several old debugging functions that are no longer needed.
Block interrupts while updating the soft interrupt masks.
Fixed softclock interrupts and added IRQ_SOFTPLIP to the SPL_SOFT mask.
1996-06-12 20:12:04 +00:00
mark 47c523fff0 Spilt the copyinout() function into two separate functions copyin()
and copyout() so that the address space checks are done here rather than
in a bit of stub code.
1996-06-12 20:06:00 +00:00
mark 7b05ce2841 Updated to match changes in the irq handler structure.
Define symbols for the address space limits that copyin() and copyout()
compare against.
1996-06-12 20:02:42 +00:00
mark 13ff05d513 Don't claim the interrupts in hardclock() and statclock() but allow
them to be passed on to other interrupt handlers attached to the
timer interrupts.
1996-06-12 20:00:21 +00:00
mark b8dfbd8fe6 Don't use signed compares when determining the copy direction. 1996-06-12 19:58:43 +00:00
mark 120210258e Added a new machine command intrchain to dump the interupt handler
chains.
1996-06-12 19:57:06 +00:00
mark 8f541bdd1d Added a couple of comments.
Defined VM_MAXKERN_ADDRESS as the maximum address for the kernel address
argument to copyin() and copyout().
1996-06-12 19:55:04 +00:00
mark 78d05630aa Define insl() and outsl() as macros that currently just panic for the
moment.
1996-06-12 19:50:14 +00:00
mark 167d543662 Define several new macros for testing the processor mode. 1996-06-12 19:48:48 +00:00