Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mtrr\generic.c Create Date:2022-07-28 08:06:16
Last Modify:2022-05-18 17:45:43 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Set the MSR pair relating to a var range.* Returns true if changes are made.

Proto:static bool set_mtrr_var_ranges(unsigned int index, struct mtrr_var_range *vr)

Type:bool

Parameter:

TypeParameterName
unsigned intindex
struct mtrr_var_range *vr
661  bool changed = false
663  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(MTRRphysBase_MSR(index), lo, hi)
664  If (base_lo & 0xfffff0ffUL) != (lo & 0xfffff0ffUL) || (base_hi & size_and_mask >> 32 - PAGE_SHIFT determines the page size ) != (hi & size_and_mask >> 32 - PAGE_SHIFT determines the page size ) Then
668  Doesn't attempt to pass an error out to MTRR users* because it's quite complicated in some cases and probably not* worth it because the best error handling is to ignore it.
669  changed = true
672  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(MTRRphysMask_MSR(index), lo, hi)
674  If (mask_lo & 0xfffff800UL) != (lo & 0xfffff800UL) || (mask_hi & size_and_mask >> 32 - PAGE_SHIFT determines the page size ) != (hi & size_and_mask >> 32 - PAGE_SHIFT determines the page size ) Then
677  Doesn't attempt to pass an error out to MTRR users* because it's quite complicated in some cases and probably not* worth it because the best error handling is to ignore it.
678  changed = true
680  Return changed
Caller
NameDescribe
set_mtrr_stateset_mtrr_state - Set the MTRR state for this CPU.* NOTE: The CPU must already be in a safe state for MTRR changes.* RETURNS: 0 if no changes made, else a mask indicating what was changed.