Subject: syscons-1.3
Date: Sat, 29 Jan 94 23:33:50 MET
But here is the (hopefully) final syscons-1.3....
....
I've changed sgetc so it works as the pccons parallel
(it now uses a scgetc internally).
[
There were a couple changes that Bruce Evans sent me that were applied
to this version along with some changes that S'ren didn't incorporate
into the final version. There will be only minor changes if anything
from this version to his final release.
]
o merged and fixed timeout code from sos.
o merged DOS partition support from sos.
o fixed "extra" interrupts.
o check if malloc retuns NULL :-(.
o print drive size as in NetBSD
o after an error, return the residual count, not 0.
o give up early for > 16 heads.
o cleaned up the old-drive detection in wdgetctlr().
o rewrote wddump(). I'd been putting this off because
I'd had the dump disabled since 0.0 and had no idea
if even the standard version worked. It didn't:
(0) syscons' sgetc() interface broke some keyboard
stuff.
(1) CADDR1 is mapped using pmap() and pmap got a NULL
pointer trap (at least when I got to wddump() using
call diediedie from ddb) because the pte for CADDR1
is only supposed to be hacked on directly (e.g. in
physcopyseg()).
(2) bad144 handling was not done.
(3) it was slooow (3600 sectors/minute) because my
controller doesn't cache writes.
o miscellaneous other cleanups, e.g., removed scattered
patchkit/terry dates.
o lots of reformatting.
To be done:
o Merge/fix TIH/NetBSD bad144 code (doesn't belong in any
particular driver. Why aren't we using i386/dkbad.c?).
o Merge/fix Dyson/NetBSD clustering code (large parts
should be shared).
o Fix/extend the partition in use bits. Support extended
partitions. This should be shared by all disk drivers. Swap
to a DOS partition so that the swap space can be shared with
linux.
o Don't use polling except for initialization. Need to
reorganise the state machine. Then "extra" interrupts
shouldn't happen (except maybe one for initialization).
o Fix disklabel, boot and driver inconsistencies with
bad144 in standard versions.
o Look at latest linux clustering methods. Our disksort()
gets in the way of clustering.
o cleaned up the ATA changes (needs more work. I think
the ATA specs say that the only thing really wrong with
the original version of wx is that there was no test
for drive-ready before some commands. 400 nsec delay
suffices for almost everything and 400 nsec delay is
usually "free").
netmask or impmask.
2) Fixes from Bruce:
o Changed name of schedsoftcom() to setsofttty() to match
setsoftclock()
o Bool_t isn't used.
o tx_fifo_size is 1 for chips without fifos, 16 for 16550's, to
help to output more efficiently for 16550's (LSR_TXRDY means
that the fifo is empty, not that it has space for one char).
o Changed name of softsio1() to siopoll() and merged compoll()
into siopoll().
o The probe forgot to clear com_mcr after it failed. This is
harmful for 4 single serial ports on 2 interrupts. It makes
partial misconfigurations worse.
o Don't bother initializing static variables that are 0 (bidir
stuff).
o Only initialize t_oflag to TTYDEF_OFLAG if unit == COMCONSOLE,
not if COMCONSOLE is defined.
o Don't call siointr() from comparam() if there is no output in
progress. For the call from sioopen(), there's no output in
progress, and siointr() often saw silo overflows for stale
input because it was called before sioopen() discarded the
input.
o Let ttselect() do the work for select(), so that the fixes for
ttselect() don't have to be duplicated in zillions of drivers.
Yes, I know that IFADDR ioctl is supposed to be deprecated... Note
that the patch was modified by me to fit better into the driver. -DG
...
While porting CAP to 386bsd/pk0.2.4 and now to FreeBSD Release 1.0
I found a couple of bugs associated with the packet filter. Here
are the fixes. I'm posting them here because they apply to
FreeBSD and 386bsd/pk0.2.4 and possibly to other *BSD.
The first occurs when using the packet filter to write raw
ethernet packets. The header consisting of the sender and
destination addresses and the protocol is removed and later
added back on, but with the byte order of the protocol reversed.
The fix ensures that the byte order in the protocol field is
swapped when it is removed.
The second fix ensures that SIOCGIFADDR works for BPF as claimed
in the man pages, by adding it to the ed driver. Similar fixes
will be needed for other ethernet drivers.
Dave Matthews.
file override to disable fifo on 16550s:
I bought a board with two 16550's, but one of those ports has a mouse
on it. The sio driver always enables the fifo, which is a bad thing
for mice and X. The mouse is jerky and hard to use. The simple thing
is be to treat one of the ports as a non-fifo'ed UART, and I use the
flags option in my config file.
So, my config file has:
device sio0 at isa? port "IO_COM1" tty irq 4 flags 0x2 vector siointr
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
(patch deleted)
following is a summary:
1) increased object cache back up to a more reasonable value.
2) removed old & bogus cruft from machdep.c (clearseg, copyseg,
physcopyseg, etc).
3) inlined many functions in pmap.c
4) changed "load_cr3(rcr3())" into tlbflush() and made tlbflush inline
assembly.
5) changed the way that modified pages are tracked - now vm_page struct
is kept updated directly - no more scanning page tables.
6) removed lots of unnecessary spl's
7) removed old unused functions from pmap.c
8) removed all use of page_size, page_shift, page_mask variables - replaced
with PAGE_ constants.
9) moved trunc/round_page, atop, ptoa, out of vm_param.h and into i386/
include/param.h, and optimized them.
10) numerous changes to sys/vm/ swap_pager, vnode_pager, pageout, fault
code to improve performance. LRU algorithm modified to be more
effective, read ahead/behind values tuned for better performance,
etc, etc...
cd.c:
Initialize channel info in CDIOCSETVOL ioctl.
Correct CDIOCSTOP and CDIOCEJCET ioctls to use scsi_stop_unit
instead of scsi_start_unit.
Add CDIOCALLOW and CDIOCPREVENT ioctls.
ch.h:
Return EBUSY instead of ENXIO if the device is already in use.
scsi_base.c:
Add scsi_stop_unit routine.
sd.c:
Add mising indirection through sc_link to sd_get_parms routine
when checking for media loaded.
st.c:
Return EBUSY instead of ENXIO if the device is already in use.
Clear the SDEV_WAITING flag in ststart if we do the wakeup call.
Cuddle { braces up where possible on if statements
Add missing splx(s) calls before some returns.
Remove extra semicolon that was keeping uha_init from returning
before the timeout occured. This should speed probing up quite
a bit!
0) FreeBSD additional include files additions
1) Rod's arpacom changes
2) Function type and return code cleanup, and all functions have correct
casting to the correct data types
3) Bugfix where driver would not function due to missing structure not
given a value.
4) General cleanup. (Theo did a lot already, I just did some more)