doesn't have to calculate it every call.
Rename `timer0_prescale' to `timer0_prescaler_count' and maintain it
correctly. Previously we lost a few 8253 cycles for every "prescaled"
clock interrupt, and the lossage grows rapidly at 16 KHz. Now we
only lose a few cycles for every standard clock interrupt.
Rename `*_divisor' to `*_max_count'.
Do the calculation of TIMER_DIV(rate) only once instead of 3 times each
time the rate is changed.
Don't allow preposterously large interrupt rates. Bug fixes elsewhere
should allow the system to survive rates that saturate the system, however.
Clean up declarations.
Include <machine/clock.h> to check our own declarations.
floppies now. I'm not sure why, but things hang when it gets to the
`changing root to fd0c' part. Without your latest commit, everything works
fine. Maybe you can figure out what you broke after ALPHA! :)
errors at a lower ipl. clist starvation problems can cause hundreds of
tty buffer overflows per second and logging them all amplified the
problems. This problem was less serious in 1.1.5.
Avoid a race in the check for starting a new block of output. com_events
was sometimes messed up and siopoll() looped endlessly. This bug was
introduced in 2.0.
Clean up previous 2 commits. Rename sio_registerdev() to sioregisterdev()
to match the (bad) surrounding naming conventions. There should be a
generic_registerdev().
. avoid resetting the FDC every time the last motor is going off;
instead, give it a 60-second period for possible later reactivation.
This prevents us from needing to recalibrate the FDC too often,
but still allows for an ``automagic error recovery', just in case the
controller is absolutely stuck. (Simply wait for 60 seconds, and
try it again.)
. made the floppy head settle time after a seek a constant
that might be overridden by a config option. (Well, actually the
divisor of the settle time). Pepople often reported problems with
their floppies, so i need a simply mechanism that allows them
to play with that value. (I personally cannot find any problem
on *my* drives.)
. implement the FD_DEBUG ioctl command, in case the driver
is compiled with DEBUG turned on.
. removed a bogus parameter from a printf; the remaining warnings
from gcc -Wall seem to be warnings about the %b format gcc cannot
understand
. rearrange Garett's code to fit better in the existing structure
of #define/type/function ordering.
. make everything fit into 79 columns again.
in the far pointers are multiples of 4K (as is normal when the video
BIOS is at seg 0xc000). Disallow mode switching if the pointer is bad.
Use a new pa_to_va() macro for all BIOS and video addresses in syscons.
Changed the fifth parameter to register_intr() from u_int mask into
u_int *maskptr in preparation for new features (shared interrupts and
removable devices, eg. for PCMCIA).
and all SCSI devices (except that it's not done quite the way I want). New
information added includes:
- A text description of the device
- A ``state''---unknown, unconfigured, idle, or busy
- A generic parent device (with support in the m.i. code)
- An interrupt mask type field (which will hopefully go away) so that
. ``doconfig'' can be written
This requires a new version of the `lsdev' program as well (next commit).
so i hope i've finally removed all the occasions where the driver
got stuck when there's no floppy in the drive.
Also attemmpting to omit the error mesage for ``recalib failed''
for the first time, since people tend to be confused about this.
else has been probed. This feature could go away again, if we can curb the
problem another way.
if_ed.c, syscons.c: Set the above flag. ed# because it needs it, syscons
because it looks stupid to "detect" the display you have already filled up
with text :-)
bt742a.c: Check bt_cmd() return-val during probe, thus failing on adaptec's.
Also silenced various printf's during the probe.
isa.c: Probe devices with the above flag set before the rest. Reduce the
number of "conflict" messages per device to one.
***
Please test the GENERIC-kernel now, if nobody can make it fail, GENERICAH
and GENERICBT has a finite and short life-expectancy...
***
Fix endless loop in siopoll() for an event on a tty with no tty struct.
Don't generate unwanted interrupts in the serial console driver. These
bugs probably don't matter unless the tty struct is dynamically allocated.
Support polled mode. To use it, leave out the irq and the vector in
the config file. It only causes extra overhead for open polled ports.
The maximum usable speed is approximately 1000 bps for a 16450 and
15000 bps for a 16550.
Other cosmetic changes.
This is needed for having the fdformat program no longer searching
non-public include paths.
Protect the definitions in fdreg.h against double inclusion.
more work required to grab all fonts
2)Make standard VGA font as default, make HARDFONTS an option
(load iso8859 fonts instead)
3)Check fonts_loaded for all restore (copy_font...palette)
sequences.
Restore the simple leap year calculation as a macro and document it so
that it doesn't become complicated again. The simple version works
for all leap years covered by 32-bit time_t's. The complicated version
doesn't work for all leap years covered by 64-bit time_t's since among
other reasons, the solar system is not stable for long enough.
Fix declarations.
Nuke spinwait().
This code is mostly taken from the 1.1 port (which was in turn taken from
Dave Mills's kern.tar.Z example). A few significant differences:
1) ntp_gettime() is now a MIB variable rather than a system call. A few
fiddles are done in libc to make it behave the same.
2) mono_time does not participate in the PLL adjustments.
3) A new interface has been defined (in <machine/clock.h>) for doing
possibly machine-dependent things around the time of the clock update.
This is used in Pentium kernels to disable interrupts, set `time', and
reset the CPU cycle counter as quickly as possible to avoid jitter in
microtime(). Measurements show an apparent resolution of a bit more than
8.14usec, which is reasonable given system-call overhead.
when the drive had been left on a cylinder > 67 after kernel boot. The
most common case for this is booting a kernel that is located on
the inner cylinders of a floppy.
Also removed all occurences of spinwait(), replaced by DELAY.
Nuked a return line saying nothing, this might make Bruce happy 8^)
Submitted by: partially by Bruce Evans