Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_fam10h_pci_mmconf_base

Proto:static void get_fam10h_pci_mmconf_base(void)

Type:void

Parameter:Nothing

63  base = d to avoid (0xfd<<32), (0xfe<<32), and (0xff<<32), ht used space
69  If fam10h_pci_mmconf_base Then Return
72  If Not early_pci_allowed() Then Return
75  found = 0
76  When i < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(pci_probes) cycle
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  If vendor == vendor && device == device Then
89  found = 1
90  Break
94  If Not found Then Return
98  address = MSR_K8_SYSCFG
99  rdmsrl(address, val)
102  If Not (val & 1 << 21 ) Then
103  tom2 = 1ULL << 32
104  Else
106  address = MSR_K8_TOP_MEM2
107  rdmsrl(address, val)
108  tom2 = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(val & 0xffffff800000ULL, 1ULL << 32)
111  If base <= tom2 Then base = tom2 + 2 * MMCONF_UNIT - 1 & MMCONF_MASK
118  hi_mmio_num = 0
119  When i < 8 cycle
123  reg = Direct PCI access. This is used for PCI accesses in early boot beforethe PCI subsystem works.
124  If Not (reg & 3) Then Continue
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  If end < tom2 Then Continue
134  start = start
135  end = end
136  hi_mmio_num++
139  If Not hi_mmio_num Then Go to out
143  sort(range, hi_mmio_num, size of range , cmp_range, NULL)
145  If end < base Then Go to out
147  If start > base + MMCONF_SIZE Then Go to out
151  base = (start & MMCONF_MASK) - MMCONF_UNIT
152  If base > tom2 && BASE_VALID(base) Then Go to out
154  base = end + MMCONF_UNIT & MMCONF_MASK
155  If BASE_VALID(base) Then Go to out
158  When i < hi_mmio_num cycle
159  base = end + MMCONF_UNIT & MMCONF_MASK
160  val = start & MMCONF_MASK
161  If val >= base + MMCONF_SIZE && BASE_VALID(base) Then Go to out
164  Return
166  out :
167  fam10h_pci_mmconf_base = base
Caller
NameDescribe
fam10h_check_enable_mmcfg