函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mtrr\generic.c Create Date:2022-07-27 09:06:25
Last Modify:2022-05-18 17:45:43 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:generic_get_mtrr

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

返回类型:void

参数:

类型参数名称
unsigned intreg
unsigned long *base
unsigned long *size
mtrr_type *type
590  get_cpu()
592  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(reg), mask_lo, mask_hi)
594  如果mask_lo按位与0x800的值恒等于0则
596  base等于0
597  size等于0
598  type等于0
599  转到:out_put_cpu
602  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(reg), base_lo, base_hi)
605  tmp等于mask_hi左移32减PAGE_SHIFT determines the page size 位按位或mask_lo右移PAGE_SHIFT determines the page size
606  mask等于size_or_mask按位或tmp
609  hi等于ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit
610  如果hi大于0则
611  tmp或等于1ULL左移hi减1位的值减1的差的反
613  如果tmp不等于mask
614  打印警告信息("mtrr: your BIOS has configured an incorrect mask, fixing it.\n")
616  mask等于tmp
624  size等于负mask
625  base等于base_hi左移32减PAGE_SHIFT determines the page size 位按位或base_lo右移PAGE_SHIFT determines the page size
626  type等于base_lo按位与0xff
628  out_put_cpu :
629  put_cpu()