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:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fam10h_check_enable_mmcfg

Proto:void fam10h_check_enable_mmcfg(void)

Type:void

Parameter:Nothing

175  If Not (pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF) Then Return
178  address = Fam 10h MSRs
179  rdmsrl(address, val)
182  If val & FAM10H_MMIO_CONF_ENABLE Then
184  busnbits = val >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT & FAM10H_MMIO_CONF_BUSRANGE_MASK
189  base = val & MMCONF_MASK
191  If Not fam10h_pci_mmconf_base Then
193  Return
194  Else if fam10h_pci_mmconf_base == base Then Return
203  get_fam10h_pci_mmconf_base()
204  If Not fam10h_pci_mmconf_base Then
205  pci_probe &= ~PCI_CHECK_ENABLE_AMD_MMCONF
206  Return
209  printk(formational "Enable MMCONFIG on AMD Family 10h\n")
210  val &= ~( FAM10H_MMIO_CONF_BASE_MASK << FAM10H_MMIO_CONF_BASE_SHIFT | FAM10H_MMIO_CONF_BUSRANGE_MASK << FAM10H_MMIO_CONF_BUSRANGE_SHIFT )
212  val |= fam10h_pci_mmconf_base | 8 << FAM10H_MMIO_CONF_BUSRANGE_SHIFT | FAM10H_MMIO_CONF_ENABLE
214  wrmsrl(address, val)