I made the changes I sent you before. In the interests of cleanliness, I made
modifications to /sys/i386/isa/tw.c to kill the warnings and make it compile
clean. While I was at it, I also made a bunch of internal functions static.
Submitted by: Gene Stark <gene@starkhome.cs.sunysb.edu>
higher level scsi code.
Spls should never be conditionalized, so don't do so here.
Restructure the get_scb routine so that we can't get into an infinite
loop if the ccbs are exhausted and we are are called with SCSI_NOSLEEP set.
Other driver maintainer's that based their scb allocation routines on Julian's
code should look at these changes and implement them for their driver.
The aic7xxx driver inspired these changes because early revs of the
aic7770 chips have so few SCBs that you can actually run out. If you
have a rev C or aic7770 (as is reported by the driver probe) and had more
than 2 drives, you could get into an infinite loop when using up all of
the SCBs. Since the driver will only allow two SCBs per device and I
only had two devices, I never saw this problem on my Rev C card.
Bzero only 19 bytes of the scb instead of 2k (ack!). This was a hold
over from when a struct SCB only contained the information downloaded
to the board, but we now store kernel driver data in there as well. This
greatly lowers the overhead for small transactions (I get ~1MB/sec for
dds with a 512 byte block size).
Submitted by: John Dyson with the aic7xxx specific optimization by me
higher level scsi code.
Spls should never be conditionalized, so don't do so here.
Restructure the get_ccb routine so that we can't get into an infinite
loop if the ccbs are exhausted and we are are called with SCSI_NOSLEEP set.
Other driver maintainer's that based their ccb allocation routines on Julian's
code should look at these changes and implement them for their driver.
Submitted by: John Dyson
don't expect this to work yet.. but at least they're here..
(hey this cvs stuff is fun!)
activate with a line exactly like the isa line in the config file,
(but specifying eisa :)
patches to come..
Change the interfaces of these functions to save space. The code
that takes the least amount of space is often the opposite to what
you might expect. E.g., it helps to waste a few bytes passing
pointers so that the compiler can't see that certain addresses
are identical (gcc likes to waste space by reloading fat constants
even when the constant is already in a register).
Rewrite getbootdev() to save 80 bytes of space and to make it less
ugly. 32 bytes were saved simply by omitting the continue statements
in the pseudo-switch.
recently introduced bloat in just 2 calls to biosread(), although
very little in calls to putc() and serial_putc(). Gcc produces
amazingly bad code for unnecessary conversions. E.g., if it has
`int x' in register %edx and wants to pass a char, then it could
simply push %edx and access only one byte in the callee. Instead,
it sometimes unnecessarily spills %edx; it always sign extends
%edx and pushes the result.
Remove useless `extern' in function prototypes.
Remove unused declaration of `end'.
Declare pbzero() and pcpy() like the library bzero and bcopy().
Declare printf() properly.
do fit, and beeping in case of an overflow.
. Drop a comment about the ``FORCE_COMCONSOLE'' option into
README.serial.
. Increase the name buffer for the root directory from 100 bytes
to 8 KB; this is in no way ideal, but (IMHO) the best that can
be done by now. People did encounter problems with their root
dir name listing overflowing the allocated buffer space. Once
we've got the three-stage boot, we should implement some basic
malloc(). Swap space is already getting tight now, perhaps the
swap should go into another 64 KB segment instead.
. Make the keyboard probe less paranoid. It should not give up in
case of a keyboard that's continuously demanding RESEND's. Even
though the keyboard reset apparently has not been reported to be
complete, it's at the very least proven that there IS something
like a keyboard available.
This solves problems with the ``Gateway-2000 AllKey programmable''
(sp?) keyboard, that experienced a total hang with the previous
probe.
Thanks goes to Scott Blachowicz <scott@statsci.com> for his
extensive testing of my various interim (debugging) bootblocks
to get this working.
interested parties.
Make the loader refuse to load anything below 1 MB -- we didn't
support it since FreeBSD 2.0R. Avoid gratuitously wiping out the BIOS
variables or the loader.
the kernel at 0-640k; we haven't had the ability to do that since before
2.0R. Furthermore, I fail to see how putting an instruction at 0 and then
doing a .org 0x500 is going to prevent the stuff from getting clobbered
in the first place; a.out is just too stupid to know about sparse address
spaces.
Previously, this worked right if both AUTO_EOI_1 and AUTO_EOI_2 are
defined, but not if AUTO_EOI_1 is defined and AUTO_EOI_2 is not defined.
The latter case should be the default. DUMMY_NOPS should be the default
too. Currently there are only two NOPs slowing down rtcin() (although
there are no delays in writertc()) and several FASTER_NOPs slowing down
interrupt handling in vector.s.
Fix stack offsets for the (previously) unused untested
FAST_INTR_HANDLER_USES_ES case.
This should NOT go into 2.0.5 /phk
Support disk slices. This involves mainly replacing inline code with
function calls. Support for ST506 drives is temporarily broken since
the `setgeom' arg to dsopen() is not implemented completely enough to
use. The `setgeom' arg will go away and ST506 drives will be supported
in another way. A large amount of dead code is left in wdopen() as a
reminder of the problems here.
Close the device in wdsize(). Open tracking was broken on all drives
with a swap device.
Remove support for soft write protection. There are no ioctls to set
it. It was used to disable writing to unlabelled disks, but we want
to support writing to foreign partitions on unlabeled disks.
Use generic dkbad routines to do about 2/3 of the work for supporting
bad144.
Improve disk statistics: estimate 4MB/sec instead of 8MB/sec for
the transfer rate (ISA max is 4MB/sec, old IDE max is 3.3MB/sec);
fix dk_xfer[] (it counted sectors, not transfers); keep the estimate
dk_seek[] = dk_xfer[] (was sectors, is now transfers); only count
words actually transferred (the count is still too high after a
failed write and after retries). Remove wdxfer[].
Fix indentation in wdattach(). Fix resulting botched printing of the
disk size for ST506 drives. Print the disk geometry less cryptically.
o Fix the keyboard probe to properly wait for the ready bit before
sending a command to the keyboard controller. This should avoid the
problems some people are experiencing where the boot blocks hang the
system during keyboard probe. (It does solve it for me.)
o Fix a bug that effectively prevented the boot blocks from ever
passing control to the serial console. [while(--retries) instead of
while(retries--)]
o Gratuitously reduced the keyboard probe timeout from 500 to 5
seconds. :)
o Introduced a new option ``FORCE_COMCONSOLE'' as a commented-out
example in the Makefile, to force the usage of a serial console
regardless of a keyboard being connected or not.
o Moved all external declarations to boot.h, declared all functions
there, and ANSIfied all function declarations/definitions.
(printf() remains bogus, however -- i'm too lazy to fix this.)
We're in the ninetees, dunno why we should still support compilers
from the 70's.
and #if defined (I586_CPU) thingies into identifycpu() so that we only
compile in what's actually needed for a given CPU. So far as I can tell,
none of my 386 machines generate a cpu_vendor code, so I made the extra vendor
and feature line conditional on I486_CPU and I586_CPU. (Otherwise we
print out a blank line which looks silly.)