函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:setup_bios_corruption_check

函数原型:void __init setup_bios_corruption_check(void)

返回类型:void

参数:

97  如果memory_corruption_check恒等于负1则
98  memory_corruption_check等于0
107  如果corruption_check_size恒等于0则memory_corruption_check等于0
110  如果非memory_corruption_check则返回
113  corruption_check_size等于und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(corruption_check_size, PAGE_SIZE)
115  r_each_free_mem_range - iterate through free memblock areas*@i: u64 used as loop variable*@nid: node selector, %NUMA_NO_NODE for all nodes*@flags: pick from blocks based on memory attributes*@p_start: ptr to phys_addr_t for start address of the range, can (i, NUMA_NO_NODE, MEMBLOCK_NONE, & start, & end, NULL)
117  start等于clamp_t - return a value clamped to a given range using a given type*@type: the type of variable to use*@val: current value*@lo: minimum allowable value*@hi: maximum allowable value* This macro does no typechecking and uses temporary variables of type(phys_addr_t, und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(start, PAGE_SIZE), PAGE_SIZE, corruption_check_size)
119  end等于clamp_t - return a value clamped to a given range using a given type*@type: the type of variable to use*@val: current value*@lo: minimum allowable value*@hi: maximum allowable value* This macro does no typechecking and uses temporary variables of type(phys_addr_t, und_down - round down to next specified power of 2*@x: the value to round*@y: multiple to round down to (must be a power of 2)* Rounds @x down to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding down, use rounddown() below.(end, PAGE_SIZE), PAGE_SIZE, corruption_check_size)
121  如果start大于等于end则继续下一循环
124  准备内存空间
125  addr等于start
126  size等于endstart
129  memset(__va(start), 0, end - start)
131  如果num_scan_areas先自加大于等于Some BIOSes seem to corrupt the low 64k of memory during events* like suspend/resume and unplugging an HDMI cable. Reserve all* remaining free memory in that area and fill it with a distinct* pattern.退出
135  如果num_scan_areas打印信息("Scanning %d areas for low memory corruption\n", num_scan_areas)