diff mbox

[Xen-devel,RFC,08/35] ACPI / table: Print GIC information when MADT is parsed

Message ID 1423058539-26403-9-git-send-email-parth.dixit@linaro.org
State New
Headers show

Commit Message

Parth Dixit Feb. 4, 2015, 2:01 p.m. UTC
From: Naresh Bhat <naresh.bhat@linaro.org>

When MADT is parsed, print GIC information to make the boot
log look pretty.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 xen/drivers/acpi/tables.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
diff mbox

Patch

diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
index 1beca79..6754933 100644
--- a/xen/drivers/acpi/tables.c
+++ b/xen/drivers/acpi/tables.c
@@ -190,6 +190,45 @@  void __init acpi_table_print_madt_entry(struct acpi_subtable_header *header)
 		}
 		break;
 
+        case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
+            {
+                struct acpi_madt_generic_interrupt *p =
+                    (struct acpi_madt_generic_interrupt *)header;
+                printk(KERN_INFO PREFIX
+                    "GIC (acpi_id[0x%04x] gic_id[0x%04x] %s)\n",
+                    p->uid, p->gic_id,
+                    (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
+            }
+            break;
+
+       case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
+            {
+                struct acpi_madt_generic_distributor *p =
+                    (struct acpi_madt_generic_distributor *)header;
+                printk(KERN_INFO PREFIX
+                    "GIC Distributor (id[0x%04x] address[0x%08llx] gsi_base[%d])\n",
+                    p->gic_id, (long long unsigned int)p->base_address, p->global_irq_base);
+            }
+            break;
+
+       case ACPI_MADT_TYPE_GIC_MSI_FRAME:
+            {
+                struct acpi_madt_gic_msi_frame *p =
+                    (struct acpi_madt_gic_msi_frame *)header;
+                printk("GIC MSI Frame (address[0x%08llx] msi_fame_id[%d])\n",
+                    (long long unsigned int)p->base_address, p->gic_msi_frame_id);
+            }
+            break;
+
+       case ACPI_MADT_TYPE_GIC_REDISTRIBUTOR:
+               {
+                    struct acpi_madt_gic_redistributor *p =
+                        (struct acpi_madt_gic_redistributor *)header;
+                    printk("GIC Redistributor (address[0x%08llx] region_size[0x%x])\n",
+                        (long long unsigned int)p->base_address, p->region_size);
+               }
+               break;
+
 	default:
 		printk(KERN_WARNING PREFIX
 		       "Found unsupported MADT entry (type = %#x)\n",