函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:reserve_crashkernel_low

函数原型:static int __init reserve_crashkernel_low(void)

返回类型:int

参数:

492  low_base等于0, low_size等于0
496  total_low_mem等于memblock_mem_size(1UL << (32 - PAGE_SHIFT determines the page size ))
499  ret等于parse_crashkernel_low(boot_command_line, total_low_mem, & low_size, & base)
500  如果ret
510  low_size等于两数取大(swiotlb_size_or_default() + (8UL << 20), 256UL << 20)
511  否则
513  如果非low_size则返回:0
517  low_base等于memblock_find_in_range(0, 1ULL << 32, low_size, 16M alignment for crash kernel regions )
518  如果非low_base
519  打印错误信息("Cannot reserve %ldMB crashkernel low memory, please try smaller size.\n", (unsignedlong)(low_size >> 20))
521  返回:负ENOMEM
524  ret等于准备内存空间
525  如果ret
526  打印错误信息("%s: Error reserving crashkernel low memblock.\n", __func__)
527  返回:ret
530  打印信息("Reserving %ldMB of low memory at %ldMB for crashkernel (System low RAM: %ldMB)\n", (unsignedlong)(low_size >> 20), (unsignedlong)(low_base >> 20), (unsignedlong)(total_low_mem >> 20))
535  start等于low_base
536  end等于low_baselow_size减1
537  insert_resource( & iomem_resource, & crashk_low_res)
539  返回:0
调用者
名称描述
reserve_crashkernel