From: kettenis Date: Tue, 10 Jul 2018 13:06:55 +0000 (+0000) Subject: Always use PSCI to enable secondary CPUs if it is detected. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c71246930d9cc14c69dc914304e0225e0ecce65a;p=openbsd Always use PSCI to enable secondary CPUs if it is detected. --- diff --git a/sys/arch/arm64/stand/efiboot/efiacpi.c b/sys/arch/arm64/stand/efiboot/efiacpi.c index 2c93e2c2053..1c5155ac7ca 100644 --- a/sys/arch/arm64/stand/efiboot/efiacpi.c +++ b/sys/arch/arm64/stand/efiboot/efiacpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiacpi.c,v 1.3 2018/07/09 14:01:13 kettenis Exp $ */ +/* $OpenBSD: efiacpi.c,v 1.4 2018/07/10 13:06:55 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis @@ -324,6 +324,8 @@ struct acpi_spcr { /* We'll never see ACPI 1.0 tables on ARM. */ static EFI_GUID acpi_guid = ACPI_20_TABLE_GUID; +static int psci = 0; + void efi_acpi_fadt(struct acpi_table_header *hdr) { @@ -337,6 +339,8 @@ efi_acpi_fadt(struct acpi_table_header *hdr) if (fadt->hdr_revision < 5) return; + psci = fadt->arm_boot_arch & FADT_PSCI_COMPLIANT; + node = fdt_find_node("/psci"); if (fadt->arm_boot_arch & FADT_PSCI_COMPLIANT) fdt_node_set_string_property(node, "status", "okay"); @@ -402,7 +406,7 @@ efi_acpi_madt_gic(struct acpi_madt_gic *gic) fdt_node_add_string_property(child, "device_type", "cpu"); fdt_node_add_string_property(child, "compatible", "arm,armv8"); fdt_node_add_property(child, "reg", ®, sizeof(reg)); - if (gic->parking_protocol_version == 0) + if (gic->parking_protocol_version == 0 || psci) fdt_node_add_string_property(child, "enable-method", "psci"); if ((gic->flags & ACPI_PROC_ENABLE) == 0) fdt_node_add_string_property(child, "status", "disabled");