freebsd-dev/sys/amd64
Marcel Moolenaar 5116398a06 Fix a buglet that was present in the ia64 code and that got inherited
by amd64 and i386: For buffered writes we collect data and write it
out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used
to keep track of how much data we have collected in the buffer so far
and it's reset to zero immediately after writing a block to the dump
device.
When the last, possibly partially filled buffer is flushed, we didn't
reset fragsz to 0 and as such would stop reflecting reality. Since we
currently only need to do buffered writes once, this isn't a problem.
However, when kernel dumps are made by hand (say by callling doadump
from within DDB), the improperly cleared state from the first call to
dumpsys causes the next call to dumpsys to create an invalid code file.
This change resets fragsz after flushing the partially filled buffer so
that it fixes the two problems at once.

Approved by: re (scottl)
2005-07-02 19:57:31 +00:00
..
acpica MFi386: use the lapic timer for UP systems that are using the apic so that 2005-04-15 18:44:53 +00:00
amd64 Fix a buglet that was present in the ia64 code and that got inherited 2005-07-02 19:57:31 +00:00
compile Make space for compilations. 2002-07-06 02:49:07 +00:00
conf Sync i386->amd64. 2005-06-30 05:33:26 +00:00
ia32 Jumbo-commit to enhance 32 bit application support on 64 bit kernels. 2005-06-30 07:49:22 +00:00
include Switch AMD64 and i386 platforms to using ELF as their kernel crash 2005-06-29 22:28:46 +00:00
isa MFi386: r1.221: use simple timecounter that is aware of irq0 being off. 2005-07-01 20:13:19 +00:00
linux32 Correct the amount of data to allocate in these local copies of 2005-06-24 17:41:28 +00:00
pci MFi386: whitespace, copyright header, etc updates 2005-01-21 05:56:41 +00:00
Makefile