]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Switch AMD64 and i386 platforms to using ELF as their kernel crash
authorPeter Wemm <peter@FreeBSD.org>
Wed, 29 Jun 2005 22:28:46 +0000 (22:28 +0000)
committerPeter Wemm <peter@FreeBSD.org>
Wed, 29 Jun 2005 22:28:46 +0000 (22:28 +0000)
commit235a54de9dba1127b8cf6564007b9d70439a1a44
treee189aafad3d106d28b146f6d568bf20ca8795202
parent0a389eab226dfe89be0b831fe454e2cd9a9e9705
Switch AMD64 and i386 platforms to using ELF as their kernel crash
dump format.  The key reason to do this is so that we can dump sparse
address space.  For example, we need to be able to skip the PCI hole
just below the 4GB boundary.  Trying to destructively dump MMIO device
registers is Really Bad(TM).  The frequent result of trying to do a
crash dump on a machine with 4GB or more ram was ugly (lockup or reboot).

This code has been taken directly from the IA64 dump_machdep.c code,
with just a few (mostly minor) mods.

Introduce a dump_avail[] array in the machdep.c code so that we have a
source of truth for what memory is present in a machine that needs to be
dumped.  We can't use phys_avail[] because all sorts of things slice
memory out of it that we really need to dump.  eg: the vm page array
and the dmesg buffer.  dump_avail[] is pretty much an unmolested version
of phys_avail[].  It does have Maxmem correction.

Bump the i386 and amd64 dump format to version 2, but nothing actually
uses this.  amd64 was actually using the i386 dump version number.

libkvm support to follow.

Approved by: re
sys/amd64/amd64/dump_machdep.c
sys/amd64/amd64/machdep.c
sys/amd64/include/pmap.h
sys/i386/i386/dump_machdep.c
sys/i386/i386/machdep.c
sys/i386/include/pmap.h
sys/sys/kerneldump.h