mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
fadump: Convert firmware-assisted cpu state dump data into elf notes.
When registered for firmware assisted dump on powerpc, firmware preserves the registers for the active CPUs during a system crash. This patch reads the cpu register data stored in Firmware-assisted dump format (except for crashing cpu) and converts it into elf notes and updates the PT_NOTE program header accordingly. The exact register state for crashing cpu is saved to fadump crash info structure in scratch area during crash_fadump() and read during second kernel boot. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
2df173d9e8
commit
ebaeb5ae24
4 changed files with 365 additions and 2 deletions
|
@ -61,6 +61,7 @@
|
|||
#include <asm/xmon.h>
|
||||
#include <asm/cputhreads.h>
|
||||
#include <mm/mmu_decl.h>
|
||||
#include <asm/fadump.h>
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@ -639,6 +640,11 @@ EXPORT_SYMBOL(check_legacy_ioport);
|
|||
static int ppc_panic_event(struct notifier_block *this,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
/*
|
||||
* If firmware-assisted dump has been registered then trigger
|
||||
* firmware-assisted dump and let firmware handle everything else.
|
||||
*/
|
||||
crash_fadump(NULL, ptr);
|
||||
ppc_md.panic(ptr); /* May not return */
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue