static struct mem_chunk *get_memory_layout(void) { struct mem_chunk *chunk_array; chunk_array = kzalloc_panic(MEMORY_CHUNKS * sizeof(struct mem_chunk)); detect_memory_layout(chunk_array); create_mem_hole(chunk_array, OLDMEM_BASE, OLDMEM_SIZE, CHUNK_CRASHK); return chunk_array; }
/* * Reserve kdump memory by creating a memory hole in the mem_chunk array */ static void __init reserve_kdump_bootmem(unsigned long addr, unsigned long size, int type) { create_mem_hole(memory_chunk, addr, size, type); }