函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:x86_get_mtrr_mem_range

函数原型:static int __init x86_get_mtrr_mem_range(struct range *range, int nr_range, unsigned long extra_remove_base, unsigned long extra_remove_size)

返回类型:int

参数:

类型参数名称
struct range *range
intnr_range
unsigned longextra_remove_base
unsigned longextra_remove_size
73 i小于num_var_ranges循环
74  type等于type
75  如果type不等于MTRR_TYPE_WRBACK则继续下一循环
77  base等于base_pfn
78  size等于size_pfn
79  nr_range等于add_range_with_merge(range, Should be related to MTRR_VAR_RANGES nums , nr_range, base, base + size)
82  如果debug_print
83  pr_debug("After WB checking\n")
84 i小于nr_range循环pr_debug("MTRR MAP PFN: %016llx - %016llx\n", start, end)
90 i小于num_var_ranges循环
91  type等于type
92  如果type不等于MTRR memory types, which are defined in SDM type不等于MTRR_TYPE_WRPROT则继续下一循环
95  size等于size_pfn
96  如果非size则继续下一循环
98  base等于base_pfn
104  如果basesize小于等于1左移20减PAGE_SHIFT determines the page size 位则继续下一循环
106  size减等于1左移20减PAGE_SHIFT determines the page size 位的值减base
107  base等于1左移20减PAGE_SHIFT determines the page size
109  subtract_range(range, Should be related to MTRR_VAR_RANGES nums , base, base + size)
111  如果extra_remove_sizesubtract_range(range, Should be related to MTRR_VAR_RANGES nums , extra_remove_base, extra_remove_base + extra_remove_size)
115  如果debug_print
116  pr_debug("After UC checking\n")
118  如果非end则继续下一循环
120  pr_debug("MTRR MAP PFN: %016llx - %016llx\n", start, end)
126  nr_range等于clean_sort_range(range, Should be related to MTRR_VAR_RANGES nums )
127  如果debug_print
128  pr_debug("After sorting\n")
129 i小于nr_range循环pr_debug("MTRR MAP PFN: %016llx - %016llx\n", start, end)
134  返回:nr_range
调用者
名称描述
mtrr_trim_uncached_memorymtrr_trim_uncached_memory - trim RAM not covered by MTRRs*@end_pfn: ending page frame number* Some buggy BIOSes don't setup the MTRRs properly for systems with certain* memory configurations