pci_region
int hl_access_dev_mem(struct hl_device *hdev, enum pci_region region_type,
enum debugfs_access_type acc_type, enum pci_region region_type, bool set_dram_bar)
enum pci_region region_id;
enum pci_region region_id;
int (*access_dev_mem)(struct hl_device *hdev, enum pci_region region_type,
enum debugfs_access_type acc_type, enum pci_region region_type, bool set_dram_bar);
int hl_access_dev_mem(struct hl_device *hdev, enum pci_region region_type,
struct hl_inbound_pci_region *pci_region);
struct hl_outbound_pci_region *pci_region);
enum pci_region hl_get_pci_memory_region(struct hl_device *hdev, u64 addr);
struct hl_inbound_pci_region *pci_region)
if (pci_region->mode == PCI_ADDRESS_MATCH_MODE) {
bar_phys_base = hdev->pcie_bar_phys[pci_region->bar];
region_base = bar_phys_base + pci_region->offset_in_bar;
region_end_address = region_base + pci_region->size - 1;
rc |= hl_pci_iatu_write(hdev, offset + 0x14, lower_32_bits(pci_region->addr));
rc |= hl_pci_iatu_write(hdev, offset + 0x18, upper_32_bits(pci_region->addr));
ctrl_reg_val |= FIELD_PREP(IATU_REGION_CTRL_MATCH_MODE_MASK, pci_region->mode);
if (pci_region->mode == PCI_BAR_MATCH_MODE)
ctrl_reg_val |= FIELD_PREP(IATU_REGION_CTRL_BAR_NUM_MASK, pci_region->bar);
pci_region->bar, pci_region->addr);
struct hl_outbound_pci_region *pci_region)
pci_region->addr + pci_region->size - 1;
lower_32_bits(pci_region->addr));
upper_32_bits(pci_region->addr));
enum pci_region hl_get_pci_memory_region(struct hl_device *hdev, u64 addr)
struct hl_inbound_pci_region pci_region;
pci_region.mode = PCI_BAR_MATCH_MODE;
pci_region.bar = HBM_BAR_ID;
pci_region.addr = addr;
rc = hl_pci_set_inbound_region(hdev, 2, &pci_region);
struct hl_inbound_pci_region pci_region;
pci_region.mode = PCI_BAR_MATCH_MODE;
pci_region.bar = DRAM_BAR_ID;
pci_region.addr = addr;
rc = hl_pci_set_inbound_region(hdev, 2, &pci_region);
struct hl_inbound_pci_region pci_region;
pci_region.mode = PCI_BAR_MATCH_MODE;
pci_region.bar = DDR_BAR_ID;
pci_region.addr = addr;
rc = hl_pci_set_inbound_region(hdev, 1, &pci_region);
acpi_handle root_pci_device, acpi_handle pci_region);
acpi_handle pci_region)
acpi_hw_build_pci_list(root_pci_device, pci_region, &list_head);
acpi_handle pci_region,
current_device = pci_region;
acpi_handle pci_region,
acpi_handle root_pci_device, acpi_handle pci_region)