Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\crash.c Create Date:2022-07-28 08:37:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Prepare memory map for crash dump kernel

Proto:int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)

Type:int

Parameter:

TypeParameterName
struct kimage *image
struct boot_params *params
334  ret = 0
340  cmem = vzalloc(sizeof(structcrash_mem))
341  If Not cmem Then Return -ENOMEM
344  memset( & cmd, 0, sizeof(structcrash_memmap_data))
345  params = params
348  Type of memory = E820_TYPE_RAM
349  flags = I/O resource extended types | Driver has marked this resource busy
350  walk_iomem_res_desc(IORES_DESC_NONE, flags, 0, (1 << 20) - 1, & cmd, memmap_entry_callback)
354  Type of memory = E820_TYPE_ACPI
355  flags = IORESOURCE_MEM | Driver has marked this resource busy
356  walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, - 1, & cmd, memmap_entry_callback)
360  Type of memory = E820_TYPE_NVS
361  walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, - 1, & cmd, memmap_entry_callback)
365  Type of memory = E820_TYPE_RESERVED
366  flags = IORESOURCE_MEM
367  walk_iomem_res_desc(IORES_DESC_RESERVED, flags, 0, - 1, & cmd, memmap_entry_callback)
371  If end Then
372  addr = start
373  size = end - start + 1
374  type = E820_TYPE_RAM
375  add_e820_entry(params, & ei)
379  ret = memmap_exclude_ranges(image, cmem, start, end)
380  If ret Then Go to out
383  When i < nr_ranges cycle
384  size = end - start + 1
387  If size < PAGE_SIZE Then Continue
389  addr = start
390  type = E820_TYPE_RAM
391  add_e820_entry(params, & ei)
394  out :
395  vfree(cmem)
396  Return ret
Caller
NameDescribe
setup_boot_parameters