Lines Matching defs:table
92 * ACPI table definitions
94 * These data structures are laid over the table to parse the important values
99 * structure describing one IOMMU in the ACPI table. Typically followed by one
156 /* Guest page table level */
420 /* Programs the physical address of the device table into the IOMMU hardware */
538 * The functions below belong to the first pass of AMD IOMMU ACPI table
563 * this function looks if there is a higher device id defined in the ACPI table
606 static int __init check_ivrs_checksum(struct acpi_table_header *table)
609 u8 checksum = 0, *p = (u8 *)table;
611 for (i = 0; i < table->length; ++i)
614 /* ACPI table corrupt */
623 * Iterate over all IVHD entries in the ACPI table and find the highest device
625 * the ACPI table. So we check the checksum here.
627 static int __init find_last_devid_acpi(struct acpi_table_header *table, u16 pci_seg)
629 u8 *p = (u8 *)table, *end = (u8 *)table;
635 end += table->length;
656 * The following functions belong to the code path which parses the ACPI table
658 * data structures, initialize the per PCI segment device/alias/rlookup table
663 /* Allocate per PCI segment device table */
681 /* Allocate per PCI segment IOMMU rlookup table. */
1057 /* sets a specific bit in the device table entry. */
1101 /* Each IOMMU use separate device table with the same size */
1108 pr_err("The device table size of IOMMU:%d is not expected!\n",
1121 pr_err("The address of old device table is above 4G, not trustworthy!\n");
1136 pr_err("Failed to allocate memory for copying old device table!\n");
1150 /* If gcr3 table existed, mask it out */
1191 * All IOMMUs within PCI segment shares common device table.
1192 * Hence copy device table only once per PCI segment.
1220 * table and sets up the device table entry with that information
1353 * Takes a pointer to an AMD IOMMU entry in the ACPI table and
1805 * Copy data from ACPI table entry to the iommu struct
1899 * table tells us so, but this is a lie!
1933 * Iterates over all IOMMU entries in the ACPI table, allocates the
1936 static int __init init_iommu_all(struct acpi_table_header *table)
1938 u8 *p = (u8 *)table, *end = (u8 *)table;
1943 end += table->length;
1963 ret = init_iommu_one(iommu, h, table);
2140 pr_warn("Cannot enable v2 page table for DMA-API. Fallback to v1.\n");
2143 pr_warn("V2 page table doesn't support passthrough mode. Fallback to v1.\n");
2227 pr_info("V2 page table enabled (Paging mode : %d level)\n",
2252 * table during the iommu_init_pci() call.
2256 * of all IOMMUs to make sure the changes to the device table are
2540 * table. In this last pass the memory mapping requirements are
2602 * defined in ACPI table.
2621 /* iterates over all memory definitions we find in the ACPI table */
2622 static int __init init_memory_definitions(struct acpi_table_header *table)
2624 u8 *p = (u8 *)table, *end = (u8 *)table;
2627 end += table->length;
2633 init_unity_map_range(m, table);
2642 * Init the device table to not allow DMA access for devices
2821 * the old content of device table entries. Not this case or copy failed,
2831 * If come here because of failure in copying device table from old
2836 pr_err("Failed to copy DEV table from previous kernel.\n");
2851 pr_info("Copied DEV table from previous kernel.\n");
3029 pr_err("%s: IOAPIC[%d] not in IVRS table\n",
3041 * table. The system timer is connected to the SB IOAPIC
3075 * This function basically parses the ACPI table for AMD IOMMU (IVRS)
3085 * information in the ACPI table about available AMD IOMMUs
3091 * remapping requirements parsed out of the ACPI table in
3111 pr_err("IVRS table error: %s\n", err);
3117 * we actually parse the table
3128 /* Device table - directly used by all IOMMUs */
3145 * start the real acpi table scan
3151 /* 5 level guest page table */
3191 /* init the device table */
3234 pr_err("IVRS table error: %s\n", err);
3450 * layer. It just looks if there is an IVRS ACPI table to detect AMD
3694 /* CPU page table size should match IOMMU guest page table size */
3701 * (i.e. EFR[SNPSup]=1), IOMMUv2 page table cannot be used without
3702 * setting up IOMMUv1 page table.
3838 pr_warn("Force to using AMD IOMMU v1 page table due to SNP\n");