- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
use command line parameters to ld(1) instead to set the endian format.
Clean up some endian decisions in mips/conf/Makefile.mips.
Wrap some long lines.
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.
Currently this is a no-op on most platforms, so they should see no difference.
Reviewed by Jason.
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...)
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.
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
- 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.
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.
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!
- 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
- 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
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
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.
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
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.
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.
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
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.
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.
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.
Give rest of clock interrupt code a revamp. Because we are using an external
cycle counter we can now handle loosing several hundred interrupts without
the time slipping.
* For MIPS RISC/os based diskl labels create partition 8 which is used
by sash (and where bootstrap code hides).
* If existing MIPS RISC/os label is present update disk parameter information
If the machine uses a Z85230 ESCC device with deep buffers, we observe
output glitches when printing the zstty{0,1} probe lines when the device
is reset & reprogrammed during startup.
There is no easy 'hook' in the MI Z8530 driver, so we wait for output
buffer to drain before changing the baud rate generator prescaler value.
consistant with other ports.
Prevent uninitialized time from being written back to the RTC (1-Jan-1970)
if the machine is halted from the root device name prompt
(bootflags & RB_ASKNAME)
If the DMA chaning interrupt couldn't be serviced immediately (higher spl
level when kernel doing something else) a few microseconds later the NCR
controller will fill its FIFO and also interrupt the CPU.
The SCSI interrupt sees the terminal count has been reached, calls
asc_dma_intr to finish the job off. The FIFO cannot be flushed because
the block count hasn't been setup for the last dma segment (DMA chaining
still wasn't serviced).
Since the NCR 53c94 FIFO is only 16 bytes in size, any short DMA in this
size combined with the machine 'doing something else' causes the problem
to occur.
Servicing the DMA chaining interrupt before the NCR SCSI interrupt solves
this problem.
Add tests to ensure the DMA FIFO has been flushed correctly at the end of
each DMA operation just to be on the safe side.
All compatable values are copied from the MIPS volume header to the
BSD disklabel structures.
* Add support for writing Mips volume header.
* Remove support for writing NetBSD label directly (this was broken)
These changes allow the kernel to read either a BSD disklabel created under
NetBSD/sparc or a MIPS volume header created under RISC/os.
There is a small amount of losage with the conversion between the 2
types of disk labels (mainly to do with file system types).
A table is used to map partition numbers and types between the two
types, and unless someone does something real fancy (or crazy) it should
work in both senario's
This change will allow the stand alone shell to directly load a NetBSD
kernel and mount a file system, avoiding the need for a seperate disk or
bootp server to bootstrapping NetBSD.
NetBSD/mipsco is now self sufficiant. We are not far from having a
miniroot filesystem and removing the need to have another NetBSD
machine to create the base filesystems.
Minor Trap for young players:
The root partition must be created with 'newfs -O' in order for the
stand alone shell to boot the kernel
TODO:
Add support for writing NetBSD disk labels back in - it will be useful
for non boot disks. I'm just not sure how to control the 2 behavours
- Using the prom getenv function determine the correct console port
- Remove old prom function hooks
- Tidy up bootflags (remove upper case names, fixup RB_ASKNAME) as
recommended by Jaromír Doleèek
handler to hook up device interrupts and softc callbacks.
Suggested by: Jason Thorpe and Toru Nishimura
* Fixup the indenting in a few places to conform to NetBSD style