Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:setup_bios_corruption_check

Proto:void __init setup_bios_corruption_check(void)

Type:void

Parameter:Nothing

97  If memory_corruption_check == -1 Then
98  memory_corruption_check = 0
107  If corruption_check_size == 0 Then memory_corruption_check = 0
110  If Not memory_corruption_check Then Return
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  If start >= end Then Continue
124  memblock_reserve(start, end - start)
125  addr = start
126  size = end - start
129  memset(__va(start), 0, end - start)
131  If ++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. Then Break
135  If num_scan_areas Then pr_info("Scanning %d areas for low memory corruption\n", num_scan_areas)