函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\crash.c Create Date:2022-07-27 09:36:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Prepare memory map for crash dump kernel

函数原型:int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)

返回类型:int

参数:

类型参数名称
struct kimage *image
struct boot_params *params
334  ret等于0
340  cmem等于vzalloc(sizeof(structcrash_mem))
341  如果非cmem则返回:负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  如果end
372  addr等于start
373  size等于endstart加1
374  type等于E820_TYPE_RAM
375  add_e820_entry(params, & ei)
379  ret等于memmap_exclude_ranges(image, cmem, start, end)
380  如果ret则转到:out
383 i小于nr_ranges循环
384  size等于endstart加1
387  如果size小于PAGE_SIZE则继续下一循环
389  addr等于start
390  type等于E820_TYPE_RAM
391  add_e820_entry(params, & ei)
394  out :
395  vfree(cmem)
396  返回:ret
调用者
名称描述
setup_boot_parameters