allocation calls in the event the caller does not wish to utilize those
features of extent map allocation.
Suggested by Matthew Green <mrg@eterna.com.au>
mapping code. (instead of using a "slot" and multiplying by 4 and adding the
pin number later to get the IRQ, just use base IRQ value and add the pin
number.)
comment immediately preceding it: We have to take the most significant
"numbits" from the returned value "ph", and the rest from our addr. The
addition used previously introduced a carry which was causing great
difficulty in determining the correct PA of the framebuffer VA passed in
by the booter.
values, i.e. 0xfffffffe and 0xffffffff respectively. The changed
definitions were incorrect, according to the PCI Local Bus Specification
(Revision 2.0). Further rationale and a workaround for the broken
devices that instigated the change provided in a message to
current-users@netbsd.org, dated Mon, 05 Aug 1996 22:06:58 -0400,
message ID 16773.839297218@ux2.sp.cs.cmu.edu>.
occupy a slot. This is necessary so that GRFIOCMAP can find the correct
physical address of the framebuffer. Fixes P550, some LC models, and
perhaps the PB520.
a serial console and the PRAM read/write code happens to use the ADB ROM
vectors, we will have problems because the ADB hasn't been initialized.
For now, the only class of machines that we will set these up on regardless
of whether we are on a serial console or not is the original II series (II,
IIx, and IIcx). Others can come later.
- In egstart(), if the Send Packet command fails, m_freem()
the mbuf chain before dequeueing another one (memory leak).
- In egintr(), return 1 if a known interrupt was processed.
Would manifest itself as spurious interrupts.
Don't manipulate the memlist passed from the kickstart rom + bootloader, as
we want it unchanged in case we boot via /dev/reload.
Instead, make z2mem_start known to pmap.c; and use int in pmap_bootstrap to
detect the right segment to correct and the amount.
XXX The transformation of z2mem from physical to virtual kernel addresses
in amiga_init.c must not be done before the pmap_bootstrap() call now!
* Fix radio error-message parsing bug: old comparison against error
prefix string off by the size of the Starmode link-level protocol field.
* Fix radio reset finite state machine, given that parsing works properly.
* Add debugging messages about reset FSM if IFF_DEBUG is set.
* Remove #ifdefs notdef around back the check that discards newlines at
the beginning of a frame. Every error message from the radio has a newline,
as the radio send error messages terminated by \r\n, not just \r like data
frames. Not dropping the \n garbles the following data frame.
* Remove unused low-level debugging routines.
* Reformat the low-level bytestuff/RLL code to match the canonical source.
* Reduce MTU to 1100 bytes; 1200 bytes can overflow the radio buffers if the
bytestuff/RLL does poorly.
* Fix radio-probe string to _not_ include a frame delimiter (\r): sending
a \r to the radio tickles a bug in the firmware, causing the radio to
smash the next frame sent after the "**\r" probe string.
* Add calls to the tty t_oproc routine to make sure the probe and reset
strings get sent to the modem promptly, rather than waiting for the next
packet.
* Add PPP-style calls to the tty start-output function; seems to
reduce latency marginally.
still to do:
* Flush output queue if resetting, since the radio is going to drop
frames on the floor anyway if it needs resetting.
* Reduce tty start-output calls.
message-in. The remaining transfer count restored when a device is
reselected needs to be saved. The saved value is needed to compute
the number of bytes transferred if another disconnect occurs. This
fixes a random read data corruption that occurs on certain disks that
may disconnect more than once in the middle of a DMA transfer.
If z2 memory is used for bounce buffers, it used to be stolen in
amiga_init.c, but would not be removed from the memory list there, but
in pmap.c the memory list would just be corrected.
a) the sizes subtracted got out of sync.
b) the memory segment to subtract from was guessed in pmap_init, and not
necessarily right. (e.g. consider a graphics board whose fraem buffer gets
mapped in by the RO at 0x200000, and a memory board which maps at 0x400000)
The new code subtracts the stolen aount of memory from the memlist parameter
given to the kernel by the loader, and pmap_init just doesn't see it anymore.
- due to a merge error, 2 line were missing making all the kernel data area
cache inhibited.
- due to a misunderstanding of "kstsize" units, all but the first page of
the kernel segment table was copyback cached on the '040/'060 which
should have caused sporadic user process segmentation faults or
kernel endless loops on the '060, under heavy load (when lots of
userland pagetables are in-core), although the problem was not yet
observed.
an unrelated bug report. This will make kernel startups a bit more readable
in the presence of unsupported hardware.
Information contributed by Andreas Bussjaeger.
- adjust txhiwat and mindma params a bit
- fixed a couple of incorrectly labeled panic calls
- the "location" was being calculated incorrectly in some cases (forgot
to subtract off MID_RAMBASE). this only caused problem when trying
to change the size of the tx/rx buffers (e.g. to 64KB).
- fixed possible non-aligned DMA burst in the starting byte burst case.
(e.g. if we could DMA 3 bytes, but only have 2 it is not legal
for us to use MIDDMA_BYTE2 mode).
- opt: on tx: try and avoid flushing the internal buffer by padding out the
length of the last mbuf a bit (if possible)
- merged multiple DRQ/DTQ ADD macros into a single DRQ and a single DTQ
macro with a uniform interface to make the code simpler and easier to read.
- en_start: only update atm_flags if EN_MBUF_OPT is enabled (which it
should be)
- for alburst: make sure we don't DMA more bytes than we need (on both
tx and rx). if the alburst is larger than we need, drop to
MIDDMA_WORD mode.
- major change: enable the use of byte and 2 byte DMA on the trasmit side.
this allows us to DMA from non-word sized/aligned mbufs directly.
[the old code would always call en_mfix which would copy (or move) the
data in order to ensure proper alignment... it turns out TCP gives
us non-word sized/aligned mbufs when it is retransmitting, so we needed
to handle this case more efficiently.] the following functions
were changed to make this work:
- en_dqneed: add an arg to let us know if we are transmitting or not.
if we are TX, then we must take into account byte DMAs when
estimating the number of DTQs we will need for a buffer
- en_start: only mfix mbufs if DMA is disabled
- en_txdma: only set launch.nodma if we have en_mfix'd the mbuf chain
also, we may need a DTQ to flush the chip's internal byte buffer
- en_txlaunch: only attempt a copy if we have the proper alignment.
add byte dma code for the front and end of the buffer.
make sure the internal dma buffer is flushed out.
- stats: keep track of how many times we have to use byte sized DMA
midwayreg:
- add byte/2byte DMA defines
midwayvar:
- add new stat counter to monitor less-than-word lengthed DMA
start adding back in tracing printfs. add support for the virtual page
table. Now it gets to user-land code, but fails because i've not
added support to the context switch code to activate and deactivate pmaps.
more naturally in terms of way the OSF/1 PALcode delivers traps and
interrupts. Clean up fault/exception handling code and system entry
points. Seperate ASTs into a seperate C function.
(2) Add unaligned access fixup code to fix unaligned quad, long,
and IEEE S and T floating datum loads and stores. VAX floating data
types not yet supported, and in the future will only be supported if
FIX_UNALIGNED_VAX_FP is defined. (No point in wasting the space when
most of the time there will never be VAX FP loads and stores.) Right
now, these features can be controlled only by sysctl. The (boolean)
integer sysctls machdep.unaligned_print, machdep.unaligned_fix, and
machdep.unaligned_sigbus control printing about unaligned accesses
(defaults on), fixing up of unaligned accesses (defaults on), and
forcing a SIGBUS on unaligned accesses (defaults off). If an access
is not fixed up (for lack of method or explicit decision), a SIGBUS is
always generated to keep programs from using bogus data. At some point,
these three choices should be controlled by per-process flags, as well.
more naturally in terms of way the OSF/1 PALcode delivers traps and
interrupts. Clean up fault/exception handling code and system entry
points. Seperate ASTs into a seperate C function.
(2) Add a boot flag ('H' and 'h') to make sure the kernel never
reboots after panic. Useful for debugging kernels which panic early
on after user processes have started, to fend off infinite reboot cycles.
Sort boot flag switch.
(3) Add unaligned access fixup code to fix unaligned quad, long,
and IEEE S and T floating datum loads and stores. VAX floating data
types not yet supported, and in the future will only be supported if
FIX_UNALIGNED_VAX_FP is defined. (No point in wasting the space when
most of the time there will never be VAX FP loads and stores.) Right
now, these features can be controlled only by sysctl. The (boolean)
integer sysctls machdep.unaligned_print, machdep.unaligned_fix, and
machdep.unaligned_sigbus control printing about unaligned accesses
(defaults on), fixing up of unaligned accesses (defaults on), and
forcing a SIGBUS on unaligned accesses (defaults off). If an access
is not fixed up (for lack of method or explicit decision), a SIGBUS is
always generated to keep programs from using bogus data. At some point,
these three choices should be controlled by per-process flags, as well.
more naturally in terms of way the OSF/1 PALcode delivers traps and
interrupts. Clean up fault/exception handling code and system entry
points. Seperate ASTs into a seperate C function.
(2) Clean up interrupt handling slightly.
(3) Add machinery to make [fs]uswintr be a bit more careful when
determining if a fault was actually their fault. (Unfortunately, they're
not actually implemented now, anyway.)
(4) Minor cleanup.
handling based on information in the 2nd Ed. of the Alpha Architecture
Reference Manual.
(2) Clean up interrupt handling slightly.
(3) Clean up badaddr().
more naturally in terms of way the OSF/1 PALcode delivers traps and
interrupts. Clean up fault/exception handling code and system entry
points. Seperate ASTs into a seperate C function.
(2) Add machinery to make [fs]uswintr be a bit more careful when
determining if a fault was actually their fault. (Unfortunately, they're
not actually implemented now, anyway.)
and IEEE S and T floating datum loads and stores. VAX floating data
types not yet supported, and in the future will only be supported if
FIX_UNALIGNED_VAX_FP is defined. (No point in wasting the space when
most of the time there will never be VAX FP loads and stores.) Right
now, these features can be controlled only by sysctl. The (boolean)
integer sysctls machdep.unaligned_print, machdep.unaligned_fix, and
machdep.unaligned_sigbus control printing about unaligned accesses
(defaults on), fixing up of unaligned accesses (defaults on), and
forcing a SIGBUS on unaligned accesses (defaults off). If an access
is not fixed up (for lack of method or explicit decision), a SIGBUS is
always generated to keep programs from using bogus data. At some point,
these three choices should be controlled by per-process flags, as well.
more naturally in terms of way the OSF/1 PALcode delivers traps and
interrupts. Clean up fault/exception handling code and system entry
points. Seperate ASTs into a seperate C function.
(2) Restructure and improve machine check and correctable error
handling based on information in the 2nd Ed. of the Alpha Architecture
Reference Manual.
(3) Removed unused (and not likely useful) PALcode assembly stubs.
more naturally in terms of way the OSF/1 PALcode delivers traps and
interrupts. Clean up fault/exception handling code and system entry
points. Seperate ASTs into a seperate C function.
2441, and part of 2600. 2436 is left open to remind me that Chris's
comments are probably correct. This file should be built statically and
committed to the tree, not built on a per-kernel basis.
string with 0xFF instead of 0x20. Shorten the compare to 6 bytes to
take care of this.
Fixes PR #2617 by myself, which is based on a private problem report
by Neil Brewitt.
- Remove the kernel-jump-to-zero code as page zero mapping is removed
- Weed out cpu040 usage, use mmutype instead
- Fix doboot code
- add fill for page zero
- use m68k/sigreturn.s
- en_mfix shouldn't touch M_EXT mbufs. change to avoid this [at
the expense of allocating a new cluster mbuf to copy to].
XXX: en_mfix is getting called more often than I hoped it would
(seems to happen when TCP retransmits... we get all sorts of odd
sized, odd lengthed data mbufs, yuck). i may revise the xmit
DMA code to use non-word sized dma.
unnecessary, and given that there's no reason to waste time and
add complexity in trap handlers. This means that code which sets and
uses the USP has to be a bit more careful, but that doesn't happen much.
containing a substruct (the hardware frame) and an array of registers,
treat it like one big array of registers, for easier and prettier
access. Update everything to deal with that.
Process Control Block
Interrupt/Exception/Syscall Stack Frame
Machine Check Error Summary Register
Machine Check Logout Area
clean up some, and add prototypes for all of the CPU instruction and
PALcode function stubs.
- don't try and add a PDU trailer (or TBD for that matter) to an M_EXT
mbuf. when M_EXT is set, the data area of the mbuf can be shared
with other mbufs (see m_copym()), and writing to one M_EXT mbuf may
invalidate another M_EXT mbuf (saw this with PDU trailers).
- be sure to validate the length value from the PDU trailer so that it
doesn't throw us out of sync with the chip (fixes yet another source
of the dread "en_service: id mismatch" panic).
- on recv, don't bother allocating an mbuf if mlen is zero since we are
only going to toss the data anyway.
alpha_cpu.h, and this file is no longer necessary for the
Alpha. However, some machine-independent code (e.g.
/sys/compat/common/kern_exit_43.c) still wants a file with
this name to be around.
XID confusions with servers that cache them over a long period and
with clients that reboot quickly.
Problems: because of the sanity check that is done by comparing the system
time with filesystem time, XIDs will start at 0 until root is mounted,
which means it isn't completely safe for diskless setups. But it's clearly
better than it was. It would also be cleaner if all XID handling (more
generally, all RPC handling) within the kernel went through the
same functions.
matic media detection on Sun4m machines which support multiple media
(UTP and AUI). New function lenocarrier() switches media type when called
if no link? flags are set.
Redefine link flags for Lance ethernet (le):
<none>: switch between media as needed to find carrier (autodetect)
Preference to whatever the PROM is using (AUI if not booted
from the network)
link0: use UTP port only
link1: use AUI port only
This allows Sun4m machines with dual media Lance ethernet adapters to
boot from the network on the UTP port.
function is called when carrier is lost in lieu of a console message.
This is used by the sparc port to switch media types on Sun4m machines
if the appropriate link flags are set by ifconfig (see following commit
message). Should not affect ports that do not use sc_nocarrier().
we managed to kill the following SCSI-driver bugs for the Falcon:
- The Byte_Count_zero bit of the falcon DMA controller does not always
tell the truth! This caused the SCSI-driver to choke on devices that
disconnected in the middle of a DMA-transfer (mostly removables).
- Printing debug info about the 5380 on the Falcon is *only* permitted
when DMA is not active.
- Some functions forgot to remove possibly pending sofware interrupts
- Some debug options didn't allow debugging a single target while they
could easily be made to do so. This is fixed.
from the mach3 versions only as much as necessary to allow the old
NetBSD/Alpha pmap code to compile. THESE WILL NOT WORK AS-IS, and at
minimum will require code to implement reference- and modified-bit
emulation.
All Unibus dependencies are removed.
Can support different controllers on different buses.
Allows cloning of devices.
TODO:
Write support for MSCP tapes.
old config anymore, all devices should use new config by now.
Add structures to handle DMA devices using new config.
Fixed bug that caused unwanted ubareset's on 11/780.
Use new ldda() and stda() to make MultiCache initialization work on
SuperSparc-II machines (these machines require 64-bit access, even
to a 32-bit register).
existence of the SCSI hardware in the boards adress region.
Thanks to Oster Nerhus for the detailed bug report and to Ralph Schmidt for
the recommended probing method.
to ignore inbound data sizes less than the threshold. otherwise,
when connected to a video aal0 input the driver gives us a massive
stream of 56 byte mbufs each with one aal0 cell in it and the
system just can't keep up with it, especially if the socket buffer
size is large [it hangs until you turn off the video source].
fixes: when turning off a vc, try and check the freshest copy of the mode
when seeing if we need to enter the "drain" state. also, don't
panic if we get unexpected rx interrupt on a VCI (instead make sure
the VC is off, print a warning, and move on!).
- 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]