altfmt was abused to sometimes screw up the disassembly of the bytes
following unconditional jump instructions. Gas doesn't pad to a longword
boundary like the comment said - that is the programmer's responsibility.
wdp_fixedcyl) gives it directly. wdp_removedcyl is "reserved" except
in ancient ATA-1 drafts and shouldn't be added. This fixes PR 1288.
Changed some fields and comments in struct wdparams to match a less-
ancient ATA draft.
Fixed bit number for `rdy' in status string.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these. I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized. Now it is only used for one struct
copy in si.c.
queue in vm_fault.
Move the PG_BUSY in vm_fault to the correct place.
Remove redundant/unnecessary code in pmap.c.
Properly block on rundown of page table pages, if they are busy.
I think that the VM system is in pretty good shape now, and the following
individuals (among others, in no particular order) have helped with this
recent bunch of bugs, thanks! If I left anyone out, I apologize!
Stephen McKay, Stephen Hocking, Eric J. Chet, Dan O'Brien, James Raynard,
Marc Fournier.
name (ie; strip off the domain). Given a hostname 'fooey.bar.com', the
previous code returned a system name of 'fooey.ba', instead of the more
correct 'fooey'. SCO uses 'uname' for many things, including some of
it's socket code so this patch is necessary for running certain legacy
SCO apps. :)
A variant of this code has been running on my box for 2 months now.
some problems with the page-table page management code, since it can't
deal with the notion of page-table pages being paged out or in transit.
Also, clean up some stylistic issues per some suggestions from
Stephen McKay.
process during pmap_copy. This minimizes unnecessary swapping or creation of
swap space. If there is a hold_count flaw for page-table
pages, clear the page before freeing it to lessen the chance of a system
crash -- this is a robustness thing only, NOT a fix.
close some windows that are opened up by page table allocations. The
prefaulting code no longer uses hold counts, but now uses the busy
flag for synchronization.
before clearing the SELTO interrupt. We used to do this in the past, but
this outb got lost.
Turn ATN on ourselves as appropriate during a parity error instead of relying
on ENAUTOATNP.
Don't use a loop in RESTART_SEQUENCER. Its not necessary.
ansi and traditional cpp.
The nesting rules of macros are different, which required some changes.
Use __CONCAT(x,y) instead of /**/.
Redo some comments to use /* */ rather than "# comment" because the ansi
cpp cares about those, and also cares about quote matching.
cc -c -x assembler-with-cpp -o file.o file.s.
This means that any cpp fatal errors will now be detected, as well as
running *.s files through an ansi cpp instead of a traditional cpp.
(fixes to allow *.s to compile under both ansi and traditional to follow)
queue corruption problems, and to apply Gary Palmer's code cleanups.
David Greenman helped with these problems also. There is still
a hang problem using X in small memory machines.
to be allocated at boot time. This is an expensive option, as they
consume physical ram and are not pageable etc. In certain situations,
this kind of option is quite useful, especially for news servers that
access a large number of directories at random and torture the name cache.
Defining 5000 or 10000 extra vnodes should cut down the amount of vnode
recycling somewhat, which should allow better name and directory caching
etc.
This is a "your mileage may vary" option, with no real indication of
what works best for your machine except trial and error. Too many will
cost you ram that you could otherwise use for disk buffers etc.
This is based on something John Dyson mentioned to me a while ago.
on the baud rate, dont get upset if it's been hung up by setting B0.
Instead, sleep for a short time, as the host controller takes a while
to go through the state changes.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
Pete Bentley <pete@demon.net>,
Charles M. Hannum <mycroft@mit.edu>,
Theo de Raadt <deraadt@theos.com>
Add a panic for attempts to page in a non paged out SCB.
Re-order some of the interrupt routine for better performance.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
Pete Bentley <pete@demon.net>,
Charles M. Hannum <mycroft@mit.edu>,
Theo de Raadt <deraadt@theos.com>
guru out there can find a way to take advantage of little-endianness to
make this computation more efficient. (I am certain that it can be done,
but haven't managed to make it work myself.)
call of ahc_scsirate. Otherwise, the proper setting may not get set until
the next reconnection/selection.
The saved_queue used to re-order the QINFIFO during error recovery or
certain SCB paging operations should be an array of u_chars not ints.
saved_queue type error pointed out by: Noriyuki Soda <soda@sra.co.jp>
comparing the PTD pointers, they needed to be masked by PG_FRAME, and
they weren't. Also, the "improved" non-386 code wasn't really an
improvement, so I simplified and fixed the code. This might have
caused some of the panics caused by the VM megacommit.
to use the full range of settings from 3.6-20MHz on any target.
Remove all Ultra settings except for the top three that are documented
to work. This fixes some problem reports with the last revision of the
driver since at least the 5.7MHz entry doesn't work in Ultra mode.
With this fix from Stephen, we are getting the target fork performance
that I have been trying to attain: P5-166, before the mega-commit: 700-800usecs,
after: 600usecs, with Stephen's fix: 500usecs!!! Also, this could be the
solution of some strange panic problems...
Reviewed by: dyson@freebsd.org
Submitted by: Stephen McKay <syssgm@devetir.qld.gov.au>
is enabled by having an "device ed0 at isa? [...]" config line.
The first PCI card will get a unit number one higher than the highest
defined for any ISA card of the ED type, e.g. if ed0 and ed1 are
configured, then the PCI cards will be ed2, ed3, ...
BEWARE: If you have configured your kernel as ed0 with the port address
as assigned by the PCI BIOS, then your card will be found by both the
PCI and ISA probes, and bad things may happen. Make sure to restore
the original port address form the GENERIC kernel for the ed0 device!
Reviewed by: davidg
contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>,
Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me:
More usage of the TAILQ macros. Additional minor fix to queue.h.
Performance enhancements to the pageout daemon.
Addition of a wait in the case that the pageout daemon
has to run immediately.
Slightly modify the pageout algorithm.
Significant revamp of the pmap/fork code:
1) PTE's and UPAGES's are NO LONGER in the process's map.
2) PTE's and UPAGES's reside in their own objects.
3) TOTAL elimination of recursive page table pagefaults.
4) The page directory now resides in the PTE object.
5) Implemented pmap_copy, thereby speeding up fork time.
6) Changed the pv entries so that the head is a pointer
and not an entire entry.
7) Significant cleanup of pmap_protect, and pmap_remove.
8) Removed significant amounts of machine dependent
fork code from vm_glue. Pushed much of that code into
the machine dependent pmap module.
9) Support more completely the reuse of already zeroed
pages (Page table pages and page directories) as being
already zeroed.
Performance and code cleanups in vm_map:
1) Improved and simplified allocation of map entries.
2) Improved vm_map_copy code.
3) Corrected some minor problems in the simplify code.
Implemented splvm (combo of splbio and splimp.) The VM code now
seldom uses splhigh.
Improved the speed of and simplified kmem_malloc.
Minor mod to vm_fault to avoid using pre-zeroed pages in the case
of objects with backing objects along with the already
existant condition of having a vnode. (If there is a backing
object, there will likely be a COW... With a COW, it isn't
necessary to start with a pre-zeroed page.)
Minor reorg of source to perhaps improve locality of ref.
1) A spelling error pointed out by Paco Hope.
2) A bug in the range checking routing pointed out by Jim Bray.
3) Enables the setting of frames per second.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
unreasonable time. I've got a PCI mainboard that simply doesn't grok
it, so continuing with a warning (and a keyboard that's working
nevertheless :) seems to be better than spin-looping forever.
channel B first as approriate.
Only reset the SCSI bus if the RESET_SCSI bit of SCSICONF is set. This
makes the aic7xxx driver honor all of the configuration settings availible
in SCSI-Select or the ECU.
Fix a benign bug in the reset code that caused us to always wait a full
second after the chip reset. This should shave some time off the probe.
Bug found by pedrosal@nce.ufrj.br (Pedro Salenbauch)
It seems that only the top three sync rates are doubled when in ultra mode,
so update the syncrates table as appropriate.
Found by "Dan Willis" <dan@plutotech.com> and his SCSI bus analyzer
channel B first as approriate.
Even if the BIOS is diabled, the ECU will still set the primary channel
bit, SCSI ID, RESET_SCSI bit, and BOFF_TIME, so use them.
boundary, which means that it doesn't mark the start of the data
section (which is then inaccessible to the programmer ??).
Hopefully fixes recent locore reboot problems.
second delay. My ps/2 mouse is now found reliably on my ThinkPad (it
didn't before) and still works on my NEC Versa.
Submitted by: Richard Wiwatowski <rjwiwat@adelaide.on.net>
config file instead of hard-coding it in the driver. No functional
differences.
This is based on the code Richard Wiwatowski <rjwiwat@adelaide.on.net>
sent to the mailing list.
- Prepend PSM_ to some defines to avoid any possible name-space problems
- Use some already defined constants instead of magic #'s where appropriate.
[ No functional changes (yet) ]
it empties all of the 256 byte incoming fifo, as it can spend more time
processing one port than intended, especially if data is streaming in
at 115.2K. The port fifo will be emptied and dumped into the tty system
and left until next time. I've been running this for quite some time on
one of my systems here.
Also, if the tty layer is blocked or full it lets the hardware assert the
flow control rather than loosing the data.
Compile for FreeBSD-2.2
Fix some compile warnings about function declarations
-current's VM include files have changed lately, this needed to be updated.
Use correct major number.
This is now two seperate drivers that support (I think) all of Stallions's
range, including the high performance intelligent cards, and their older
cards.
Submitted by: Greg Ungerer (gerg@stallion.oz.au)
(User-mode parts and patches to follow)
boards by Greg Ungerer (gerg@stallion.oz.au). (v0.0.1 alpha)
This is a multiple import of all revisions available to build up
a history.
This driver supports only some of the Stallion range, in particular, not
the highly intelligent cards. That comes in shortly.
Submitted by: Greg Ungerer (gerg@stallion.oz.au)
Macroize locore.s' page table setup even more, now it's almost readable.
Rename PG_U to PG_A (so that I can...)
Rename PG_u to PG_U. "PG_u" was just too ugly...
Remove some unused vars in pmap.c
Remove PG_KR and PG_KW
Remove SSIZE
Remove SINCR
Remove BTOPKERNBASE
This concludes my spring cleaning, modulus any bug fixes for messes I
have made on the way.
(Funny to be back here in pmap.c, that's where my first significant
contribution to 386BSD was... :-)
time. The results are currently ignored unless certain temporary options
are used.
Added sysctls to support reading and writing the clock frequency variables
(not the frequencies themselves). Writing is supposed to atomically
adjust all related variables.
machdep.c:
Fixed spelling of a function name in a comment so that I can log this
message which should have been with the previous commit.
Initialize `cpu_class' earlier so that it can be used in startrtclock()
instead of in calibrate_cyclecounter() (which no longer exists).
Removed range checking of `cpu'. It is always initialized to CPU_XXX
so it is less likely to be out of bounds than most variables.
clock.h:
Removed I586_CYCLECTR(). Use rdtsc() instead.
clock.c:
TIMER_FREQ is now a variable timer_freq that defaults to the old value of
TIMER_FREQ. #define'ing TIMER_FREQ should still work and may be the best
way of setting the frequency.
Calibration involves counting cycles while watching the RTC for one second.
This gives values correct to within (a few ppm) + (the innaccuracy of the
RTC) on my systems.
Fixed longstanding namespace convolution involving rune_t vs wchar_t...
This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions. Ports of gcc should avoid using the
gcc headers.
page dir+table index.
pmap.h: remove NUPDE, it was wrong and not used. Sanitize KSTKPTEOFF.
vmparam.h: Calculate virtual addr from PDI+PTI from pmap.h rather than
using magic math. Remove UPDT, not used.
Ensure that queued commands are not touched by the abort code by setting
the SCB status to indicate what queue it is in.
Fix deadlocks when using SCB paging by using SCBs from the assigned_scbs
queue or an SCB that completed during the same interrupt if needed.
Don't ever use insl to pull SCBs from any of the controllers. You can
only do 8bit PIO reads. This only affected SCB paging.
With this checkin, SCB paging works quite a bit better, but I still have
some problems with it that may be caused by a firmware problem in my
PD1800s. It seems that using a tag number higher than the maximum number
of tags allowed by the device, confuses it. For example, if I queue
two commands, tagged 3 and 36, it never reconnects for tag 36.
mapped to semi-random place(s) depending on the content(s) of physical
address 0xA0000. This was fatal at least on my system with a some
memory-mapped devices. Console syscons somehow wasn't affected. It
bogusly hardcodes the address. Sigh.
implementations, and synchronizes us with the Nomad's latest code.
This code is based on the Nomad code, but heavily hacked by me.
Reviewed by: phk
Submitted by: the 'Nomads'
in place device drivers can now register power-down/power-up routines so
that we can use common routines to power-up/power-down cards for
insert/removals, suspend/resume, etc..
Reviewed by: phk
Submitted by: the 'Nomads'
strange results. This bug has been in here for a loooong time.
Many thanks to Pedro Salenbauch for finding this.
Submitted by: pedrosal@nce.ufrj.br (Pedro Salenbauch)
regarding apm to LINT
- Disabled the statistics clock on machines which have an APM BIOS and
have the options "APM_BROKEN_STATCLOCK" enabled (which is default
in GENERIC now)
- move around some of the code in clock.c dealing with the rtc to make
it more obvios the effects of disabling the statistics clock
Reviewed by: bde
8 not the 18 I was using during some of my own testing. Ooops.
For those that want to change the number for experimentation, you can
set the value on line 1553 of this file.
One of the manifiestations of the problem includes the -4 RSS problem
in ps.
Reviewed by: dyson
Submitted by: Stephen McKay <syssgm@devetir.qld.gov.au>
(Rev E or greater), aic7850, aic7860, aic7870, and aic7880 controllers.
SCB paging is enabled with the option "AHC_SCBPAGING_ENABLE". Full
comments on the algorithm are at the top of i386/scsi/aic7xxx.c.
options "AHC_TAGENABLE" and "AHC_QUEUE_FULL" have been removed. The
default is 4 tags without SCB paging, 8 with.
Clear the SCSIRSTI bit after throwing a bus reset. Some cards seem to get
confused otherwise.
Handle SCSIRSTI interrupts before checking to see if there is a valid
SCB in use since this can happen. (Clears PR# i386/1123)
Clean up the way we determine the number of SCBs on the card
(courtesy of Dan Eischen).
Guard against attempts to negotiate wide to a narrow controller.
Fix some comments.
Update my copyrights.