Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:x86_get_mtrr_mem_range

Proto:static int __init x86_get_mtrr_mem_range(struct range *range, int nr_range, unsigned long extra_remove_base, unsigned long extra_remove_size)

Type:int

Parameter:

TypeParameterName
struct range *range
intnr_range
unsigned longextra_remove_base
unsigned longextra_remove_size
73  When i < num_var_ranges cycle
74  type = type
75  If type != MTRR_TYPE_WRBACK Then Continue
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  If debug_print Then
83  pr_debug("After WB checking\n")
84  When i < nr_range cycle pr_debug("MTRR MAP PFN: %016llx - %016llx\n", start, end)
90  When i < num_var_ranges cycle
91  type = type
92  If type != MTRR memory types, which are defined in SDM && type != MTRR_TYPE_WRPROT Then Continue
95  size = size_pfn
96  If Not size Then Continue
98  base = base_pfn
104  If base + size <= 1 << 20 - PAGE_SHIFT determines the page size Then Continue
109  subtract_range(range, Should be related to MTRR_VAR_RANGES nums , base, base + size)
111  If extra_remove_size Then subtract_range(range, Should be related to MTRR_VAR_RANGES nums , extra_remove_base, extra_remove_base + extra_remove_size)
115  If debug_print Then
116  pr_debug("After UC checking\n")
118  If Not end Then Continue
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  If debug_print Then
128  pr_debug("After sorting\n")
129  When i < nr_range cycle pr_debug("MTRR MAP PFN: %016llx - %016llx\n", start, end)
134  Return nr_range
Caller
NameDescribe
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