Commit Graph

177 Commits

Author SHA1 Message Date
simonb a6b8c86af0 Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
2001-08-31 03:53:22 +00:00
simonb 4ac4da1c52 G/C the unused kernel-only CLK_TCK #define.
XXX: does include/time.h still need <machine/limits.h>?
2001-08-31 03:46:03 +00:00
bjh21 ad2c12a28d Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading.  I should probably have done this at the time,
but it's better late than never.
2001-08-02 12:24:05 +00:00
wiz 41df6b74a9 partiton -> partition 2001-07-26 22:47:34 +00:00
wiz 20ab98b30f bcopy -> memcpy 2001-07-22 15:48:11 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
abs 01b024cd5b Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
2001-07-08 16:32:12 +00:00
wdk fa993060eb change b*() -> mem*() 2001-07-08 04:25:36 +00:00
darcy ce0ec1e208 Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores.  It appears that there are no overrides
in the code and each file has the following added.

 options    SYSVSEM     # System V semaphores
+#options   SEMMNI=10   # number of semaphore identifiers
+#options   SEMMNS=60   # number of semaphores in system
+#options   SEMUME=10   # max number of undo entries per process
+#options   SEMMNU=30   # number of undo structures in system
 options    SYSVSHM     # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten.  It was done separately.
2001-06-30 11:00:31 +00:00
nisimura 0533d3265c Do a straight and simple cpu identification in cpu_attach(). 2001-06-27 08:20:44 +00:00
wiz 40ac848024 Fix various misspellings of compatible/compatibility. 2001-06-11 01:50:48 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
wdk 86d8020753 Move previous patch which performs allocsys() before pmap_bootstrap()
to the correct location.
2001-04-28 04:20:27 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
thorpej e553a6caf0 Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().
2001-04-24 15:41:38 +00:00
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
thorpej 079c2e0ac9 Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.
2001-04-23 23:50:22 +00:00
thorpej 5871b80f00 Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly.  On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change.  This is merely for API consistency.
2001-04-22 18:21:48 +00:00
kleink f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink 739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
kleink 7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
wdk dacfad3be3 Clear interrupt latch after interrupts are processed, not before. 2001-04-02 09:54:16 +00:00
wdk 6b982beac1 Call softintr_init() 2001-03-31 00:10:03 +00:00
wdk 3e4cc841a7 Add softintr and ISA bus support 2001-03-31 00:08:34 +00:00
wdk a03b2aaaf0 Reverse previous commit - isa headers don't belong in /usr/include 2001-03-31 00:05:57 +00:00
wdk d3a8b4016e Add isa_machdep.h and isapnp_machdep.h 2001-03-30 23:59:19 +00:00
wdk 0ca4ab64ac Add ISA serial port device 2001-03-30 23:54:45 +00:00
wdk 9641e5d860 Probe ISA bus devices 2001-03-30 23:52:05 +00:00
wdk dd068f675e Changes to interrupt architecture for softintr support 2001-03-30 23:51:14 +00:00
wdk cdba0ef41c Add some ISA bus cards 2001-03-30 23:49:37 +00:00
wdk 1b6e2e02dd Add files for ISA bus and softintr support 2001-03-30 23:47:58 +00:00
wdk 8cd59636b4 Support for ISA expansion slot in Mips 3230
The ISA Bus on this machine doesn't support DMA, and all interrupt lines
are wire-OR'ed together.   Mileage may vary if sharing interrupts.

Tested cards:
     com:  8250 and 16550 UART's (8 bit)
     ec:   3com Etherlink II (8 bit)
     we:   SMC 8013 Ethernet (16 bit) [work in progress]
             Probes, ARP in both directions works, sends clean packets,
             tcpdump show correct packets on receive, NDP for IPv6 works,
	     netstat -s shows nothing strange.. but doesn't talk TCP/IP!
2001-03-30 23:45:18 +00:00
wdk 154a3bba69 use MI softintr 2001-03-30 23:28:00 +00:00
wdk 5d03735614 Move most interrupt functionality to arch/mipsco/mipsco/interrupt.c
Remove old style soft interrupts to favor MI softintr support
2001-03-30 23:26:29 +00:00
wdk 09d79c4b1f New data structures and prototypes for MI softintr support 2001-03-30 23:23:37 +00:00
wdk 273d283d25 Implement MI softintr functions (softintr_establish, softintr_schedule etc) 2001-03-30 23:21:30 +00:00
wdk 9477a9256c Re-implement bus_space(9) functions:
- Correctly handle striding of data
 - Better support for endian neutral access
 - Correctly implement _stream variants of bus_space functions that can
   byte swap.  This reverses the automatic byte swapping done in hardware
   for 16 bit ISA bus cards
2001-03-30 23:17:03 +00:00
wdk 70a7bcb64b Remove ncr53c9x_dmaselect 2001-03-30 07:49:07 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
wdk b9b387d9b1 Remove function decl that doesn't belong in cpu.h 2001-03-11 09:20:58 +00:00
wdk 13de0e4f2b 1. Remove cpu_exec_ecoff_hook
2.  Invoke KGDB if booted with RB_KDB flag
3.  Don't round up page address when zeroing BSS - this can overwrite debug
    symbols
2001-03-11 09:19:31 +00:00
thorpej 2c4c690f14 Add the BUS_DMA_STREAMING flag. 2001-03-07 22:42:16 +00:00
wdk ffa74abf2f - Add "Features Enable" and CDB bits to SCSI controller config
- During un-aligned writes: Don't accidently leave the DMA engine active
  after priming the FIFO between calls to asc_dma_setup and asc_dma_go
2001-03-05 05:04:29 +00:00
wdk 9cf464f7d1 no longer keep a copy of the volume header in cpu_disklabel 2001-03-05 04:58:09 +00:00
wdk 680c13c7d4 - brelse() was called twice after reading disk label
- re-read RISC/os volume header off disk before writing new label
  in case it was updated by installboot utility
- no longer keep a copy of the volume header in cpu_disklabel
2001-03-05 04:54:07 +00:00
wdk 581542f31f Return microtime of zero if not available at early stages of device
autoconfiguration.
2001-02-21 09:46:54 +00:00
wdk 935036cf94 Remove superfluous #include added in previous commit 2001-02-21 09:20:56 +00:00
wdk 8e130c9227 Document KGDB options 2001-02-21 09:14:33 +00:00
wdk 85f0f12a55 Changes for KGDB 2001-02-21 09:12:14 +00:00
wdk 07bb8e7a23 Call KGDB hook function 2001-02-21 09:10:42 +00:00
wdk 6d8f58da18 Add zs_kgdb.c driver 2001-02-21 09:09:54 +00:00
wdk 8a5e278439 Glue functions for KGDB support 2001-02-21 09:08:35 +00:00
cgd c2bdafab79 use getprogname() 2001-02-20 23:51:59 +00:00
wdk c0f3e4293d Add a MD zs_chanstate layer that carries bus_space information
Tidy up several comments at same time.
2001-02-07 11:40:18 +00:00
wdk 25ad09d3d2 Fully implement bus_space(9) access to the z8530 SCC registers.
This adds the missing wbflush() calls after writing register data.

At same time tidy up several comments and make several KNF changes.

XXX: The z8530 MI driver doesn't support bus_space access to the registers
     (lacks a hook for storing a bus space tag, and stores register
     addresses directly)
     Until other ports catch up (this is the first) we have overlayed
     the missing data in the MD structures
2001-02-07 11:38:34 +00:00
wdk 8bbe289faf Allow file to be included in assembler source (bootstrap code etc.) 2001-02-06 04:32:29 +00:00
wdk f4290b34e9 Make booted_device struct visible to RAIDframe driver 2001-02-06 04:27:48 +00:00
jdolecek 8b24036797 Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
2001-01-22 13:56:55 +00:00
wdk 8e913e0c2a Use custom linker script for building ECOFF kernel images. The PROM loader
is fussy about the order of sections and location of memory gaps so we
must produce a firmware friendly version of the kernel as netbsd.ecoff for
network booting

The ELF version uses the standard mips linker script which can be loaded
by the new bootstrap routines
2001-01-22 01:54:03 +00:00
tv e58532a4bf No-op commit to force update to a non-"-kk" revision. 2001-01-18 17:47:58 +00:00
fvdl c7f1462f3e Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
2001-01-17 00:07:18 +00:00
thorpej d74e432ed3 Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
2001-01-15 20:19:50 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
bouyer c71f40d166 Add pseudo-device vlan 2000-12-19 10:42:02 +00:00
matt 825cb46de5 Revert back to a machinearch (really cputype) of mips. Put ENDIAN back. 2000-12-03 07:05:21 +00:00
matt 866f93d61f Change arch from mips to mipsel/mipseb as appropriate. Nuke the ENDIAN
makeoption.  Key off MACHINE_ARCH for adding -EB/-EL to CFLAGS/AFLAGS/LD/
LINKFLAGS.
2000-12-03 05:30:31 +00:00
matt a0a88e0a71 Use shared Makefile.mips 2000-12-03 04:51:26 +00:00
matt bd338a518c Deal with -Wstrict-prototypes -Wmissing-prototypes 2000-12-03 04:51:04 +00:00
soren 38a44e0d8f Consistently use pmap_steal_memory() to allocate USPACE. 2000-11-27 05:57:25 +00:00
chs c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
itojun 0c84fad435 more rnd(4). 2000-10-04 22:26:49 +00:00
wdk 6b207c8f05 Add netbsd.ecoff to list of files to cleanup. Forgot in previous commit. 2000-10-03 10:09:12 +00:00
wdk ff5d9dc3a7 Change default kernel format from ECOFF to ELF now we can boot ELF using
libsa based bootstraps.   This is now the prefered format.

ECOFF format kernel renamed to netbsd.ecoff - still required for network
booting.
2000-10-03 09:46:39 +00:00
wdk e705396abb Switch to MI md_root.c 2000-10-03 09:38:20 +00:00
abs 2824f4906d Ensure all INSTALL* kernels have two ptys, and a note explaining why:
pseudo-device  pty             2       # pseudo-terminals (Sysinst needs two)
(Some installers may not be using sysinst, in which case this just reduces
the number of ptys from 16 that are not used to 2 that are not used)
For i386 conf files, no change other than comments.
2000-10-02 18:43:34 +00:00
wdk 2bc18c0ead Add parenthesis to TICKS_TO_USECS macro avoiding side-effects.
Fixes glitch where microtime goes backward.   KNF rules!
2000-10-02 07:58:26 +00:00
wdk d7ff540d90 Boot to multiuser by default. 2000-10-02 07:57:29 +00:00
wdk 68e8ad5120 Fixup missing entries in chrtoblktbl 2000-10-02 07:56:31 +00:00
wdk 77c68f1f9c downsized kernels for installation & recovery 2000-10-02 07:54:34 +00:00
wdk caccbc2e21 Add kernel support for memory disks 2000-09-29 12:43:14 +00:00
wdk ceb69697cd Backout previous commit.
loadfile_machdep.h doesn't belong in /usr/include/machine

Pointed out by Simon Burge
2000-09-27 02:06:08 +00:00
wdk bbec09cae1 Add stand directory to build process 2000-09-26 11:45:06 +00:00
wdk 7378a103a0 Much needed installboot utility. Manual page to follow.
Builds and installs from stand directories, but untested from higher
level makefiles.
2000-09-26 10:00:19 +00:00
wdk 50e120c13f Parse boot string intelligently to extract the boot device options.
This permits boot from any SCSI ID
2000-09-26 09:48:35 +00:00
wdk 7495cd76b1 Since we don't have a lseek function in the PROM firmware standalone libs
we have to poke the data structures directly to force the offset we need.

The open() function returns with the address of the IO control block in
register t0 so we take a copy of it for our brute-force lseek function.

This should be reasonably portable since the firmware writers closely
follow UNIX semantics and the open stubs should recompile and use the
same registers.   May break on the rebadged clones -- buyer beware.

The alternative is to use dummy reads to go forwards and reopen followed
by dummy reads to go backwards.  It takes around 60 seconds to boot
using this method if we use a clean filesystem.

Tested with firmware versions 5.40 and 5.43
2000-09-26 09:32:25 +00:00
wdk 9b4e50f624 Second stage bootstrap:
-  Rename from boot.mipsco -> boot to be consistant with other ports
  -  use ELF format
2000-09-26 09:11:04 +00:00
wdk 1eec339f4b First stage bootstrap is stored on boot sectors in ECOFF format. Ensure
entire file fits within the imposed limit.
2000-09-26 09:06:50 +00:00
jdolecek b1f94e26ab don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
2000-09-24 15:59:26 +00:00
jdolecek 49c105ffdb add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
2000-09-24 12:32:31 +00:00
wdk d471ac652d Forgot to commit this file with the 2 stage bootstrap 2000-09-19 07:50:50 +00:00
wdk 513cc0ca27 Linker script for building first stage bootstrap. Due to bugs/limitations
in the MIPS prom loader we have to be very careful how the sections are
ordered and the number of sections defined.   For this reason the standard
linker scripts cannot be used.

The exact rules don't appear to be documented and a little experimentation
is required.
2000-09-18 11:48:29 +00:00
wdk a3ec172607 Initial commit of a 2 stage bootloader for NetBSD/mipsco. Based on pmax
and alpha ports.

Uses PROM standalone I/O functions but due to the lack of a lseek function
it currently only works with version 5.40 of the firmware.  A more portable
solution is being worked on.

installboot utility requires several changes in order to correctly install
the bootstrap code - there is a "volume directory" which contains a list
of filenames, start sectors and length.  We need to add a "boot" entry of
the correct length starting at block 2.  The boot file has to be ecoff
which means we waste another 0.5k

Normally the Mips filesystem has a ~500k partition for this purpose but it
should be possible to squeeze it all into the first 7k "BSD Style" (1k is
required for 2 different copies of the partition table)

Only the bootxx_ffs first stage bootstrap has been tested via bootp() which
loads the second stage off disk and then boots the kernel.
2000-09-18 11:40:46 +00:00
wdk 74fa574688 * Add INET6 and IPSEC support.
* Enable vnd driver for creating a working miniroot.
2000-09-16 09:35:38 +00:00
wdk 0b445f157e Add missing align argument to uvm_map() which was missed by thorpej during
original commit.
2000-09-16 09:18:01 +00:00