Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static void amd_set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type)

Type:void

Parameter:

TypeParameterName
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  If size == 0 Then
72  regs[reg] = 0
73  Else
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])