函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:amd_set_mtrr - Set variable MTRR register on the local CPU.*@reg The register to set.*@base The base address of the region.*@size The size of the region. If this is 0 the region is disabled.*@type The type of the region.* Returns nothing.

函数原型:static void amd_set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type)

返回类型:void

参数:

类型参数名称
unsigned intreg
unsigned longbase
unsigned longsize
mtrr_typetype
67  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(MSR_K6_UWCCR, regs[0], regs[1])
71  如果size恒等于0则
72  regs[reg]等于0
73  否则
83  regs[reg]等于负size右移15减PAGE_SHIFT determines the page size 位按位与0x0001FFFC按位或base左移PAGE_SHIFT determines the page size 位按位或type加1
91  wbinvd()
92  wrmsr(MSR_K6_UWCCR, regs[0], regs[1])