函数逻辑报告

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:20
Last Modify:2022-05-18 17:45:43 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:print_mtrr_state

函数原型:static void __init print_mtrr_state(void)

返回类型:void

参数:

408  pr_debug("MTRR default type: %s\n", mtrr_attrib_to_str(def_type))
410  如果have_fixed
411  pr_debug("MTRR fixed ranges %sabled:\n", ((enabled & MTRR_STATE_MTRR_ENABLED) && (enabled & Bit fields for enabled in struct mtrr_state_type )) ? "en" : "dis")
415  print_fixed(0x00000, 0x10000, fixed_ranges + 0)
416 i小于2循环print_fixed(0x80000 + i * 0x20000, 0x04000, fixed_ranges + (i + 1) * 8)
419 i小于8循环print_fixed(0xC0000 + i * 0x08000, 0x01000, fixed_ranges + (i + 3) * 8)
424  print_fixed_last()
426  pr_debug("MTRR variable ranges %sabled:\n", enabled & MTRR_STATE_MTRR_ENABLED ? "en" : "dis")
428  high_width等于__ffs64 - find first set bit in a 64 bit word*@word: The 64 bit word* On 64 bit arches this is a synomyn for __ffs* The result is not defined if no bits are set, so check that @word* is non-zero before calling this.减32减PAGE_SHIFT determines the page size 加3的和除4
430 i小于num_var_ranges循环
431  如果mask_lo按位与1左移11位则pr_debug(" %u base %0*X%05X000 mask %0*X%05X000 %s\n", i, high_width, base_hi, base_lo >> 12, high_width, mask_hi, mask_lo >> 12, mtrr_attrib_to_str(base_lo & 0xff))
441  否则pr_debug(" %u disabled\n", i)
444  如果mtrr_tom2pr_debug("TOM2: %016llx aka %lldM\n", mtrr_tom2, mtrr_tom2 >> 20)
调用者
名称描述
get_mtrr_stateGrab all of the MTRR state for this CPU into *state