From patchwork Sun Feb 27 14:10:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 1598284 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K655W5fMsz9sG8 for ; Mon, 28 Feb 2022 01:10:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EC17783A6B; Sun, 27 Feb 2022 15:10:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5002B83B49; Sun, 27 Feb 2022 15:10:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from zulu616.server4you.de (mail.csgraf.de [85.25.223.15]) by phobos.denx.de (Postfix) with ESMTP id 9A78F82F8A for ; Sun, 27 Feb 2022 15:10:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=agraf@csgraf.de Received: from localhost.localdomain (dynamic-095-118-033-200.95.118.pool.telefonica.de [95.118.33.200]) by csgraf.de (Postfix) with ESMTPSA id 2EB0A60805FC; Sun, 27 Feb 2022 15:10:36 +0100 (CET) From: Alexander Graf To: u-boot@lists.denx.de Cc: Tuomas Tynkkynen , Simon Glass , Mark Kettenis Subject: [PATCH] lib/acpi: Enable QEMU special cases for ARM Date: Sun, 27 Feb 2022 15:10:35 +0100 Message-Id: <20220227141035.37088-1-agraf@csgraf.de> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean With QEMU, we receive ACPI tables from the hypervisor rather than build them ourselves in U-Boot. That logic however hard codes the target to the x86 QEMU target, leaving ARM out on the fun. Let's add the ARM QEMU config as well to the ifdefs so that we can consume QEMU provided firmware tables there as well. Signed-off-by: Alexander Graf Reviewed-by: Simon Glass --- lib/acpi/Makefile | 2 ++ lib/acpi/acpi_writer.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile index 956b5a0d72..66ba0e94ac 100644 --- a/lib/acpi/Makefile +++ b/lib/acpi/Makefile @@ -9,6 +9,7 @@ obj-y += acpi_writer.o # With QEMU the ACPI tables come from there, not from U-Boot ifndef CONFIG_QEMU +ifndef CONFIG_ARCH_QEMU obj-y += base.o obj-y += csrt.o obj-y += mcfg.o @@ -21,3 +22,4 @@ endif obj-y += facs.o obj-y += ssdt.o endif +endif diff --git a/lib/acpi/acpi_writer.c b/lib/acpi/acpi_writer.c index 946f90e8e7..9c252aa58d 100644 --- a/lib/acpi/acpi_writer.c +++ b/lib/acpi/acpi_writer.c @@ -48,7 +48,7 @@ int acpi_write_one(struct acpi_ctx *ctx, const struct acpi_writer *entry) return 0; } -#ifndef CONFIG_QEMU +#if !defined(CONFIG_QEMU) && !defined(CONFIG_ARCH_QEMU) static int acpi_write_all(struct acpi_ctx *ctx) { const struct acpi_writer *writer =