@@ -32,6 +32,7 @@
#include <asm/page.h>
#define ITS_CMD_QUEUE_SZ SZ_1M
+#define ACPI_GICV3_ITS_MEM_SIZE (SZ_64K)
/*
* No lock here, as this list gets only populated upon boot while scanning
@@ -1020,6 +1021,19 @@ void gicv3_its_dt_init(const struct dt_device_node *node)
}
}
+#ifdef CONFIG_ACPI
+int gicv3_its_acpi_init(struct acpi_subtable_header *header,
+ const unsigned long end)
+{
+ struct acpi_madt_generic_translator *its;
+
+ its = (struct acpi_madt_generic_translator *)header;
+
+ return add_to_host_its_list(its->base_address,
+ ACPI_GICV3_ITS_MEM_SIZE, NULL);
+}
+#endif
+
/*
* Local variables:
* mode: C
@@ -1567,6 +1567,14 @@ static void __init gicv3_acpi_init(void)
gicv3.rdist_stride = 0;
+ /* Parse ITS information */
+ count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
+ gicv3_its_acpi_init, 0);
+
+ if ( count <= 0 )
+ panic("GICv3: Can't get ITS entry");
+
+
/*
* In ACPI, 0 is considered as the invalid address. However the rest
* of the initialization rely on the invalid address to be
@@ -105,6 +105,7 @@
#include <xen/device_tree.h>
#include <xen/rbtree.h>
+#include <xen/acpi.h>
#define HOST_ITS_FLUSH_CMD_QUEUE (1U << 0)
#define HOST_ITS_USES_PTA (1U << 1)
@@ -135,6 +136,10 @@ extern struct list_head host_its_list;
/* Parse the host DT and pick up all host ITSes. */
void gicv3_its_dt_init(const struct dt_device_node *node);
+#ifdef CONFIG_ACPI
+int gicv3_its_acpi_init(struct acpi_subtable_header *header,
+ const unsigned long end);
+#endif
bool gicv3_its_host_has_its(void);
unsigned int vgic_v3_its_count(const struct domain *d);
@@ -196,6 +201,14 @@ static inline void gicv3_its_dt_init(const struct dt_device_node *node)
{
}
+#ifdef CONFIG_ACPI
+static inline int gicv3_its_acpi_init(struct acpi_subtable_header *header,
+ const unsigned long end)
+{
+ return false;
+}
+#endif
+
static inline bool gicv3_its_host_has_its(void)
{
return false;