![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <acpi/acpi_ivrs.h>
#include <amdblocks/acpi.h>
#include <amdblocks/cpu.h>
#include <amdblocks/data_fabric.h>
#include <amdblocks/ioapic.h>
#include <arch/mmio.h>
#include <console/console.h>
#include <cpu/amd/cpuid.h>
#include <cpu/amd/msr.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <soc/acpi.h>
#include <soc/data_fabric.h>
#include <soc/pci_devs.h>
Go to the source code of this file.
Macros | |
#define | MAX_DEV_ID 0xFFFF |
Functions | |
unsigned long | acpi_fill_ivrs_ioapic (acpi_ivrs_t *ivrs, unsigned long current) |
static unsigned long | ivhd_describe_hpet (unsigned long current) |
static unsigned long | ivhd_describe_f0_device (unsigned long current, uint16_t dev_id, uint8_t datasetting) |
static unsigned long | ivhd_dev_range (unsigned long current, uint16_t start_devid, uint16_t end_devid, uint8_t setting) |
static unsigned long | add_ivhd_dev_entry (struct device *parent, struct device *dev, unsigned long *current, uint8_t type, uint8_t data) |
static void | ivrs_add_device_or_bridge (struct device *parent, struct device *dev, unsigned long *current, uint16_t *ivhd_length) |
static void | add_ivhd_device_entries (struct device *parent, struct device *dev, unsigned int depth, int linknum, int8_t *root_level, unsigned long *current, uint16_t *ivhd_length) |
static unsigned long | acpi_fill_ivrs40 (unsigned long current, acpi_ivrs_t *ivrs) |
static unsigned long | acpi_fill_ivrs11 (unsigned long current, acpi_ivrs_t *ivrs) |
unsigned long | acpi_fill_ivrs (acpi_ivrs_t *ivrs, unsigned long current) |
unsigned long acpi_fill_ivrs | ( | acpi_ivrs_t * | ivrs, |
unsigned long | current | ||
) |
Definition at line 323 of file ivrs.c.
References acpi_fill_ivrs11(), acpi_fill_ivrs_ioapic(), add_ivhd_device_entries(), all_devices, BIOS_WARNING, device::bus, CAP_OFFSET_0_IOTLB_SP, CAP_OFFSET_10_MSI_NUM_PPR, CAP_OFFSET_10_MSI_NUM_PPR_SHIFT, acpi_ivrs_ivhd::capability_offset, acpi_ivrs_ivhd::device_id, EFR_FEATURE_SUP, acpi_ivrs_ivhd::flags, acpi_ivrs_ivhd::iommu_base_high, acpi_ivrs_ivhd::iommu_base_low, IOMMU_CAP_ID, IOMMU_FEATURE_GA_SUP, IOMMU_FEATURE_GATS_SHIFT, IOMMU_FEATURE_GLX_SHIFT, IOMMU_FEATURE_GT_SUP, IOMMU_FEATURE_HATS_SHIFT, IOMMU_FEATURE_HE_SUP, IOMMU_FEATURE_IA_SUP, acpi_ivrs_ivhd::iommu_feature_info, IOMMU_FEATURE_MSI_NUM_PPR_SHIFT, IOMMU_FEATURE_NX_SUP, IOMMU_FEATURE_PA_SMAX_SHIFT, IOMMU_FEATURE_PN_BANKS_SHIFT, IOMMU_FEATURE_PN_COUNTERS_SHIFT, IOMMU_FEATURE_XT_SUP, acpi_ivrs_ivhd::iommu_info, IOMMU_INFO_UNIT_ID_SHIFT, acpi_ivrs::iv_info, acpi_ivrs::ivhd, IVHD_BLOCK_TYPE_LEGACY__FIXED, ivhd_describe_hpet(), ivhd_dev_range(), IVHD_FLAG_COHERENT, IVHD_FLAG_HT_TUN_EN, IVHD_FLAG_IOTLB_SUP, IVHD_FLAG_ISOC, IVHD_FLAG_PASS_PW, IVHD_FLAG_PPE_SUP, IVHD_FLAG_PREF_SUP, IVHD_FLAG_RES_PASS_PW, IVINFO_EFR_SUPPORTED, acpi_ivrs_ivhd::length, MAX_DEV_ID, MMIO_CNT_CFG_N_CNT_BANKS_SHIFT, MMIO_CNT_CFG_N_COUNTER, MMIO_CNT_CFG_N_COUNTER_BANKS, MMIO_CNT_CFG_N_COUNTER_SHIFT, MMIO_CTRL_COHERENT, MMIO_CTRL_HT_TUN_EN, MMIO_CTRL_ISOC, MMIO_CTRL_PASS_PW, MMIO_CTRL_RES_PASS_PW, MMIO_EXT_FEATURE_GA_SUP, MMIO_EXT_FEATURE_GATS_MASK, MMIO_EXT_FEATURE_GATS_SHIFT, MMIO_EXT_FEATURE_GLX_SHIFT, MMIO_EXT_FEATURE_GLX_SUP_MASK, MMIO_EXT_FEATURE_GT_SUP, MMIO_EXT_FEATURE_HATS_MASK, MMIO_EXT_FEATURE_HATS_SHIFT, MMIO_EXT_FEATURE_HE_SUP, MMIO_EXT_FEATURE_IA_SUP, MMIO_EXT_FEATURE_NX_SUP, MMIO_EXT_FEATURE_PAS_MAX_MASK, MMIO_EXT_FEATURE_PAS_MAX_SHIFT, MMIO_EXT_FEATURE_PPR_SUP, MMIO_EXT_FEATURE_PRE_F_SUP, MMIO_EXT_FEATURE_XT_SUP, NULL, PCI_DEVFN, pci_find_capability(), pci_read_config16(), pci_read_config32(), acpi_ivrs_ivhd::pci_segment_group, pcidev_on_root(), printk, read64(), bus::secondary, and acpi_ivrs_ivhd::type.
|
static |
Definition at line 257 of file ivrs.c.
References acpi_fill_ivrs40(), acpi_fill_ivrs_ioapic(), add_ivhd_device_entries(), all_devices, device::bus, acpi_ivrs_ivhd_11::capability_offset, acpi_ivrs_ivhd_11::device_id, EFR_FEATURE_SUP, acpi_ivrs_ivhd_11::efr_reg_image_high, acpi_ivrs_ivhd_11::efr_reg_image_low, acpi_ivrs_ivhd::flags, acpi_ivrs_ivhd_11::flags, acpi_ivrs_ivhd_11::iommu_attributes, acpi_ivrs_ivhd::iommu_base_high, acpi_ivrs_ivhd_11::iommu_base_high, acpi_ivrs_ivhd::iommu_base_low, acpi_ivrs_ivhd_11::iommu_base_low, IOMMU_CAP_ID, acpi_ivrs_ivhd::iommu_feature_info, acpi_ivrs_ivhd::iommu_info, acpi_ivrs_ivhd_11::iommu_info, acpi_ivrs::ivhd, IVHD_BLOCK_TYPE_FULL__FIXED, ivhd_describe_hpet(), ivhd_dev_range(), acpi_ivrs_ivhd_11::length, MAX_DEV_ID, memset(), ivhd11_iommu_attr::msi_num_ppr, NULL, PCI_DEVFN, pci_find_capability(), pci_read_config32(), acpi_ivrs_ivhd_11::pci_segment_group, pcidev_on_root(), ivhd11_iommu_attr::perf_counter_banks, ivhd11_iommu_attr::perf_counters, read32(), bus::secondary, and acpi_ivrs_ivhd_11::type.
Referenced by acpi_fill_ivrs().
|
static |
Definition at line 190 of file ivrs.c.
References acpi_fill_ivrs_ioapic(), add_ivhd_device_entries(), all_devices, device::bus, acpi_ivrs_ivhd_40::capability_offset, acpi_ivrs_ivhd_40::device_id, EFR_FEATURE_SUP, acpi_ivrs_ivhd_40::efr_reg_image_high, acpi_ivrs_ivhd_40::efr_reg_image_low, acpi_ivrs_ivhd::flags, acpi_ivrs_ivhd_40::flags, acpi_ivrs_ivhd_40::iommu_attributes, acpi_ivrs_ivhd::iommu_base_high, acpi_ivrs_ivhd_40::iommu_base_high, acpi_ivrs_ivhd::iommu_base_low, acpi_ivrs_ivhd_40::iommu_base_low, IOMMU_CAP_ID, acpi_ivrs_ivhd::iommu_feature_info, acpi_ivrs_ivhd::iommu_info, acpi_ivrs_ivhd_40::iommu_info, acpi_ivrs::ivhd, IVHD_BLOCK_TYPE_FULL__ACPI_HID, ivhd_describe_f0_device(), ivhd_describe_hpet(), ivhd_dev_range(), IVHD_DTE_EXT_INT_PASS, IVHD_DTE_INIT_PASS, IVHD_DTE_LINT_0_PASS, IVHD_DTE_LINT_1_PASS, IVHD_DTE_NMI_PASS, IVHD_DTE_SYS_MGT_TRANS, acpi_ivrs_ivhd_40::length, MAX_DEV_ID, memset(), NULL, PCI_DEVFN, pci_find_capability(), pci_read_config32(), acpi_ivrs_ivhd_40::pci_segment_group, pcidev_on_root(), read32(), bus::secondary, and acpi_ivrs_ivhd_40::type.
Referenced by acpi_fill_ivrs11().
unsigned long acpi_fill_ivrs_ioapic | ( | acpi_ivrs_t * | ivrs, |
unsigned long | current | ||
) |
Definition at line 21 of file ivrs.c.
References ALIGN_UP, ivrs_ivhd_special::dte_setting, FCH_IOAPIC_ID, GNB_IOAPIC_ID, ivrs_ivhd_special::handle, IVHD_DEV_8_BYTE_EXT_SPECIAL_DEV, IVHD_DTE_EXT_INT_PASS, IVHD_DTE_INIT_PASS, IVHD_DTE_LINT_0_PASS, IVHD_DTE_LINT_1_PASS, IVHD_DTE_NMI_PASS, IVHD_DTE_SYS_MGT_NO_TRANS, IVHD_SPECIAL_DEV_IOAPIC, memset(), PCI_DEVFN, ivrs_ivhd_special::reserved, SMBUS_DEV, SMBUS_FUNC, ivrs_ivhd_special::source_dev_id, ivrs_ivhd_special::type, and ivrs_ivhd_special::variety.
Referenced by acpi_fill_ivrs(), acpi_fill_ivrs11(), and acpi_fill_ivrs40().
|
static |
Definition at line 111 of file ivrs.c.
References ALIGN_UP, device::bus, ivrs_ivhd_generic::dev_id, ivrs_ivhd_alias::dev_id, pci_path::devfn, ivrs_ivhd_generic::dte_setting, ivrs_ivhd_alias::dte_setting, IVHD_DEV_4_BYTE_SELECT, IVHD_DEV_8_BYTE_ALIAS_SELECT, device::path, device_path::pci, ivrs_ivhd_alias::reserved1, ivrs_ivhd_alias::reserved2, bus::secondary, ivrs_ivhd_alias::source_dev_id, ivrs_ivhd_generic::type, ivrs_ivhd_alias::type, and type.
Referenced by ivrs_add_device_or_bridge().
|
static |
Definition at line 162 of file ivrs.c.
References device::bus, bus::children, bus::dev, pci_path::devfn, DEVICE_PATH_PCI, device::enabled, ivrs_add_device_or_bridge(), device::link_list, bus::next, device::path, device_path::pci, bus::secondary, device::sibling, and device_path::type.
Referenced by acpi_fill_ivrs(), acpi_fill_ivrs11(), and acpi_fill_ivrs40().
|
static |
Definition at line 62 of file ivrs.c.
References ivrs_ivhd_f0_entry::compatible_id, ivrs_ivhd_f0_entry::dev_id, dev_id, ivrs_ivhd_f0_entry::dte_setting, ivrs_ivhd_f0_entry::hardware_id, IVHD_DEV_VARIABLE, memset(), ivrs_ivhd_f0_entry::type, ivrs_ivhd_f0_entry::uuid_format, and ivrs_ivhd_f0_entry::uuid_length.
Referenced by acpi_fill_ivrs40().
Definition at line 47 of file ivrs.c.
References ivrs_ivhd_special::dte_setting, ivrs_ivhd_special::handle, IVHD_DEV_8_BYTE_EXT_SPECIAL_DEV, IVHD_SPECIAL_DEV_HPET, PCI_DEVFN, ivrs_ivhd_special::reserved, SMBUS_DEV, SMBUS_FUNC, ivrs_ivhd_special::source_dev_id, ivrs_ivhd_special::type, and ivrs_ivhd_special::variety.
Referenced by acpi_fill_ivrs(), acpi_fill_ivrs11(), and acpi_fill_ivrs40().
|
static |
Definition at line 88 of file ivrs.c.
References ALIGN_UP, ivrs_ivhd_generic::dev_id, ivrs_ivhd_generic::dte_setting, IVHD_DEV_4_BYTE_END_RANGE, IVHD_DEV_4_BYTE_START_RANGE, and ivrs_ivhd_generic::type.
Referenced by acpi_fill_ivrs(), acpi_fill_ivrs11(), and acpi_fill_ivrs40().
|
static |
Definition at line 139 of file ivrs.c.
References add_ivhd_dev_entry(), device::hdr_type, IVHD_DEV_4_BYTE_SELECT, IVHD_DEV_8_BYTE_ALIAS_SELECT, PCI_CAP_ID_PCIE, pci_find_capability(), PCI_HEADER_TYPE_BRIDGE, and PCI_HEADER_TYPE_NORMAL.
Referenced by add_ivhd_device_entries().