fadump.c (a3b2cb30f252b21a6f962e0dd107c8b897ca65e4) | fadump.c (6fcd6baa90aeec9dcbe30786e15c125bf50503b2) |
---|---|
1/* 2 * Firmware Assisted dump: A robust mechanism to get reliable kernel crash 3 * dump with assistance from firmware. This approach does not use kexec, 4 * instead firmware assists in booting the kdump kernel while preserving 5 * memory contents. The most of the code implementation has been adapted 6 * from phyp assisted dump implementation written by Linas Vepstas and 7 * Manish Ahuja 8 * --- 111 unchanged lines hidden (view full) --- 120int is_fadump_boot_memory_area(u64 addr, ulong size) 121{ 122 if (!fw_dump.dump_registered) 123 return 0; 124 125 return (addr + size) > RMA_START && addr <= fw_dump.boot_memory_size; 126} 127 | 1/* 2 * Firmware Assisted dump: A robust mechanism to get reliable kernel crash 3 * dump with assistance from firmware. This approach does not use kexec, 4 * instead firmware assists in booting the kdump kernel while preserving 5 * memory contents. The most of the code implementation has been adapted 6 * from phyp assisted dump implementation written by Linas Vepstas and 7 * Manish Ahuja 8 * --- 111 unchanged lines hidden (view full) --- 120int is_fadump_boot_memory_area(u64 addr, ulong size) 121{ 122 if (!fw_dump.dump_registered) 123 return 0; 124 125 return (addr + size) > RMA_START && addr <= fw_dump.boot_memory_size; 126} 127 |
128int should_fadump_crash(void) 129{ 130 if (!fw_dump.dump_registered || !fw_dump.fadumphdr_addr) 131 return 0; 132 return 1; 133} 134 |
|
128int is_fadump_active(void) 129{ 130 return fw_dump.dump_active; 131} 132 133/* 134 * Returns 1, if there are no holes in boot memory area, 135 * 0 otherwise. --- 377 unchanged lines hidden (view full) --- 513 return err; 514} 515 516void crash_fadump(struct pt_regs *regs, const char *str) 517{ 518 struct fadump_crash_info_header *fdh = NULL; 519 int old_cpu, this_cpu; 520 | 135int is_fadump_active(void) 136{ 137 return fw_dump.dump_active; 138} 139 140/* 141 * Returns 1, if there are no holes in boot memory area, 142 * 0 otherwise. --- 377 unchanged lines hidden (view full) --- 520 return err; 521} 522 523void crash_fadump(struct pt_regs *regs, const char *str) 524{ 525 struct fadump_crash_info_header *fdh = NULL; 526 int old_cpu, this_cpu; 527 |
521 if (!fw_dump.dump_registered || !fw_dump.fadumphdr_addr) | 528 if (!should_fadump_crash()) |
522 return; 523 524 /* 525 * old_cpu == -1 means this is the first CPU which has come here, 526 * go ahead and trigger fadump. 527 * 528 * old_cpu != -1 means some other CPU has already on it's way 529 * to trigger fadump, just keep looping here. --- 976 unchanged lines hidden --- | 529 return; 530 531 /* 532 * old_cpu == -1 means this is the first CPU which has come here, 533 * go ahead and trigger fadump. 534 * 535 * old_cpu != -1 means some other CPU has already on it's way 536 * to trigger fadump, just keep looping here. --- 976 unchanged lines hidden --- |