blob: b106f4d8473696d5a9e07dcba6211105766bcaa0 [file] [log] [blame]
/*
* Copyright: (C) Copyright 2015 Marvell International Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* publishhed by the Free Software Foundation.
*
* Author: Yan Markman (ymarkman@marvell.com)
*
* Utilities for ramdump.c debug capability extension:
* - Kernel-RO CRC16 check and reporting on panic
*/
#ifndef _RAMDUMP_UTIL_H
#define _RAMDUMP_UTIL_H
/* Configuration */
#define RAMDUMP_PHASE_1_1 /* allow KO's to work with older kernel */
#define RAMDUMP_RDI /* allow detecting RDI interface is present */
/* EXPORT from ramdump.c; "internal" between ramdump and ramdump_util */
extern unsigned ramdump_level;
/* 0: do not request ramdump at all
* 1: for panic only, ignore User-Space fatal signals and modems
* (used on "reboot" Graceful Shutdown)
* 2: always ramdump
* >2: same as 2, just for better debug
*/
#define RAMDUMP_LEVEL_PANIC_ONLY 1
#define RAMDUMP_LEVEL_FULL 2
#define RAMDUMP_LEVEL_FULL_IN_ADVANCE 3
int get_kernel_text_crc16_valid(void); /* returns:
*** 0 if OK, -1 if bad-crc, -2 if not accounted */
int get_kernel_text_crc16_threaded_req(void); /* runs on thread */
u16 get_kernel_text_crc16_on_panic(void); /* has huge blocking latency */
void ramdump_ignore_fatal_signals(int on_shutdown);
#endif/*_RAMDUMP_UTIL_H*/