/* * Copy the ascii values for first 8 characters from a string into u64 * variable at their respective indexes. * e.g. * The string "FADMPINF" will be converted into 0x4641444d50494e46
*/ staticinline u64 fadump_str_to_u64(constchar *str)
{
u64 val = 0; int i;
for (i = 0; i < sizeof(val); i++)
val = (*str) ? (val << 8) | *str++ : val << 8; return val;
}
#define FADUMP_CPU_UNKNOWN (~((u32)0))
/* * The introduction of new fields in the fadump crash info header has * led to a change in the magic key from `FADMPINF` to `FADMPSIG` for * identifying a kernel crash from an old kernel. * * To prevent the need for further changes to the magic number in the * event of future modifications to the fadump crash info header, a * version field has been introduced to track the fadump crash info * header version. * * Consider a few points before adding new members to the fadump crash info * header structure: * * - Append new members; avoid adding them in between. * - Non-primitive members should have a size member as well. * - For every change in the fadump header, increment the * fadump header version. This helps the updated kernel decide how to * handle kernel dumps from older kernels.
*/ #define FADUMP_CRASH_INFO_MAGIC_OLD fadump_str_to_u64("FADMPINF") #define FADUMP_CRASH_INFO_MAGIC fadump_str_to_u64("FADMPSIG") #define FADUMP_HEADER_VERSION 1
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.