From: Sergiu Moga Date: Sat, 23 Sep 2023 12:21:30 +0000 (+0300) Subject: plat/common/arm: Check for offline GICC during ACPI MP enumeration X-Git-Tag: RELEASE-0.15.0~90 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6594ca77c31d4dfb568471060604cb3246e4b1c6;p=unikraft%2Funikraft.git plat/common/arm: Check for offline GICC during ACPI MP enumeration When we probe for available, valid GICC's, we only look for those that are already online and initialized, totally forgetting about those that are usable but offline. Therefore, check for powered off GICC's as well, since, during probe, we re-initialize GICC's anyway. Signed-off-by: Sergiu Moga Reviewed-by: Michalis Pappas Reviewed-by: Razvan Virtan Approved-by: Razvan Deaconescu GitHub-Closes: #1120 --- diff --git a/plat/common/arm/lcpu.c b/plat/common/arm/lcpu.c index 1a6a0f9d4..2d4021bd1 100644 --- a/plat/common/arm/lcpu.c +++ b/plat/common/arm/lcpu.c @@ -118,7 +118,8 @@ static int do_arch_mp_init(void *arg __unused) m.h = (struct acpi_subsdt_hdr *)(madt->entries + off); if (m.h->type != ACPI_MADT_GICC || - !(m.gicc->flags & ACPI_MADT_GICC_FLAGS_EN)) + (!(m.gicc->flags & ACPI_MADT_GICC_FLAGS_EN) && + !(m.gicc->flags & ACPI_MADT_GICC_FLAGS_ON_CAP))) continue; cpu_id = m.gicc->mpidr & CPU_ID_MASK; diff --git a/plat/common/include/uk/plat/common/madt.h b/plat/common/include/uk/plat/common/madt.h index aae94dda9..c4d791171 100644 --- a/plat/common/include/uk/plat/common/madt.h +++ b/plat/common/include/uk/plat/common/madt.h @@ -170,6 +170,7 @@ struct acpi_madt_x2apic_nmi { #define ACPI_MADT_GICC_FLAGS_EN 0x01 #define ACPI_MADT_GICC_FLAGS_PERF_IRQ_MODE 0x02 #define ACPI_MADT_GICC_FLAGS_VGIC_IRQ_MODE 0x04 +#define ACPI_MADT_GICC_FLAGS_ON_CAP 0x08 struct acpi_madt_gicc { struct acpi_subsdt_hdr hdr; __u16 reserved;