Add an "openbsd,gic-its-id" property to gic-its nodes containing the ITS ID.
authorjmatthew <jmatthew@openbsd.org>
Tue, 12 Sep 2023 08:22:07 +0000 (08:22 +0000)
committerjmatthew <jmatthew@openbsd.org>
Tue, 12 Sep 2023 08:22:07 +0000 (08:22 +0000)
ok kettenis@ patrick@

sys/arch/arm64/stand/efiboot/efiacpi.c

index 3eed816..4d20031 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: efiacpi.c,v 1.14 2022/01/02 02:13:33 jsg Exp $        */
+/*     $OpenBSD: efiacpi.c,v 1.15 2023/09/12 08:22:07 jmatthew Exp $   */
 
 /*
  * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
@@ -491,11 +491,13 @@ efi_acpi_madt_gic_its(struct acpi_madt_gic_its *its)
        static uint32_t phandle = 2;
        void *node, *child;
        uint64_t reg[2];
+       uint32_t its_id;
        char name[32];
 
        snprintf(name, sizeof(name), "gic-its@%llx", its->base_address);
        reg[0] = htobe64(its->base_address);
        reg[1] = htobe64(0x20000);
+       its_id = htobe32(its->gic_its_id);
 
        /* Create "gic-its" node. */
        node = fdt_find_node("/interrupt-controller");
@@ -504,6 +506,8 @@ efi_acpi_madt_gic_its(struct acpi_madt_gic_its *its)
        fdt_node_add_property(child, "msi-controller", NULL, 0);
        fdt_node_add_property(child, "reg", reg, sizeof(reg));
        fdt_node_add_property(child, "phandle", &phandle, sizeof(phandle));
+       fdt_node_add_property(child, "openbsd,gic-its-id", &its_id,
+           sizeof(its_id));
        phandle++;
 }