函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_fam10h_pci_mmconf_base

函数原型:static void get_fam10h_pci_mmconf_base(void)

返回类型:void

参数:

63  base等于d to avoid (0xfd<<32), (0xfe<<32), and (0xff<<32), ht used space
69  如果fam10h_pci_mmconf_base则返回
72  如果非early_pci_allowed()则返回
75  found等于0
76 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(pci_probes)循环
81  bus等于bus
82  slot等于slot
83  id等于Direct PCI access. This is used for PCI accesses in early boot beforethe PCI subsystem works.
85  vendor等于id按位与0xffff
86  device等于id右移16位按位与0xffff
87  如果vendor恒等于vendordevice恒等于device
89  found等于1
90  退出
94  如果非found则返回
98  address等于MSR_K8_SYSCFG
99  rdmsrl(address, val)
102  如果非val按位与1左移21位的值则
103  tom2等于1ULL左移32位
104  否则
106  address等于MSR_K8_TOP_MEM2
107  rdmsrl(address, val)
108  tom2等于两数取大(val & 0xffffff800000ULL, 1ULL << 32)
111  如果base小于等于tom2base等于tom2加2乘MMCONF_UNIT减1按位与MMCONF_MASK
118  hi_mmio_num等于0
119 i小于8循环
123  reg等于Direct PCI access. This is used for PCI accesses in early boot beforethe PCI subsystem works.
124  如果非reg按位与3的值则继续下一循环
127  start等于reg按位与0xffffff00的值左移8位
128  reg等于Direct PCI access. This is used for PCI accesses in early boot beforethe PCI subsystem works.
129  end等于reg按位与0xffffff00的值左移8位按位或0xffff
131  如果end小于tom2则继续下一循环
134  start等于start
135  end等于end
136  hi_mmio_num自加
139  如果非hi_mmio_num则转到:out
143  sort(range, hi_mmio_num, range的长度, cmp_range, NULL)
145  如果end小于base则转到:out
147  如果start大于baseMMCONF_SIZE则转到:out
151  base等于start按位与MMCONF_MASK的值减MMCONF_UNIT
152  如果base大于tom2BASE_VALID(base)则转到:out
154  base等于endMMCONF_UNIT按位与MMCONF_MASK
155  如果BASE_VALID(base)则转到:out
158 i小于hi_mmio_num循环
159  base等于endMMCONF_UNIT按位与MMCONF_MASK
160  val等于start按位与MMCONF_MASK
161  如果val大于等于baseMMCONF_SIZEBASE_VALID(base)则转到:out
164  返回
166  out :
167  fam10h_pci_mmconf_base等于base
调用者
名称描述
fam10h_check_enable_mmcfg