Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59A43C6379F for ; Mon, 20 Feb 2023 19:51:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5BC25859F2; Mon, 20 Feb 2023 20:50:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PLyhCv15"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 10DFE858ED; Mon, 20 Feb 2023 20:49:52 +0100 (CET) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 422B18594B for ; Mon, 20 Feb 2023 20:49:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x135.google.com with SMTP id z3so792944ilm.0 for ; Mon, 20 Feb 2023 11:49:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LONQUWccufy17dmZDVTusr16pwpVmOI37JNomouGoKg=; b=PLyhCv15eun4M6kaR97K1iBQblkeV+6HzEoHq84idv/px8bBf5ju64DU55F53K1Mgg RhDE4XhVlCXg1G5BJShKlsz412r6BmhtZk3pt9L/hiM3k7J4aWnlr7jlkbQCGzdfpM+3 YiiWJ+QH+3NvND80Qd9dLGNL5y44R9hdQBoFI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LONQUWccufy17dmZDVTusr16pwpVmOI37JNomouGoKg=; b=B530yMjwIGUagM3a/U1yUhAkmjp2OgRfGZ/AUXkl/8gnhgj21sho3Z5k0S38sL974D v+Snky7ooickU5112SJDc7yhMXGsNiiiD2/0fSFX1ZT0uVvoSXpCelgLseczFOoatcG0 t2qOwS7KG/b5P1zOhmMWDBOq+3F7f6XM8FpeWXPc9Mk+NJ+Dg8w0wZmYaaIL7DJMaLnW LN2FVFZjZfDo9ZcVMZGSeyMAq1x2YRs/GOmOL1VTS0oera37HhLws9CVfj4eLG2EtGOQ Y3CsJ296y/EaNqpcCRvN3COlvjg+9sxSyxAhI3qLhk/DyfjjNSxI9niSpW9qF7r5ZA/3 MMoQ== X-Gm-Message-State: AO0yUKWq1Q1fK1Eb15OcCKrlAFihO6AywDa5C+i3JxLSL4KO3AiQyR+E bICMKvjbLa/ulQiRTQj4xPEPWDW0iDChsNEs X-Google-Smtp-Source: AK7set+HzZEICSi3jAFZlqOtekioOBEVyNoGhvVGbgWIBMaXX4iFNyIpj98WF6HM2MupFAI+bwSiKg== X-Received: by 2002:a05:6e02:154c:b0:314:5aa:94b4 with SMTP id j12-20020a056e02154c00b0031405aa94b4mr1376751ilu.7.1676922580493; Mon, 20 Feb 2023 11:49:40 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:9f65:93e2:a4c7:ed10]) by smtp.gmail.com with ESMTPSA id e7-20020a056638020700b003c4ec576030sm587521jaq.4.2023.02.20.11.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 11:49:40 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , AKASHI Takahiro , Heinrich Schuchardt , Ilias Apalodimas , Jason Liu , John Keeping , Masahisa Kojima , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Rasmus Villemoes , Stefan Roese Subject: [PATCH 04/13] x86: coreboot: Allow ACPI tables to be recorded Date: Mon, 20 Feb 2023 12:49:18 -0700 Message-Id: <20230220194927.476708-5-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230220194927.476708-1-sjg@chromium.org> References: <20230220194927.476708-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean At present any ACPI tables created by prior-stage firmware are ignored. It is useful to be able to view these in U-Boot. Add the acpi command for coreboot and use that to allow recording the ACPI-table start. Signed-off-by: Simon Glass --- cmd/Kconfig | 3 +-- cmd/acpi.c | 4 ++++ include/asm-generic/global_data.h | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index b2d75987170..97c8610e461 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -109,8 +109,7 @@ menu "Info commands" config CMD_ACPI bool "acpi" - depends on ACPIGEN - default y + default y if TARGET_COREBOOT || ACPIGEN help List and dump ACPI tables. ACPI (Advanced Configuration and Power Interface) is used mostly on x86 for providing information to the diff --git a/cmd/acpi.c b/cmd/acpi.c index d0fc062ef8c..991b5235e28 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -162,6 +162,10 @@ static int do_acpi_items(struct cmd_tbl *cmdtp, int flag, int argc, bool dump_contents; dump_contents = argc >= 2 && !strcmp("-d", argv[1]); + if (!IS_ENABLED(CONFIG_ACPIGEN)) { + printf("Not supported (enable ACPIGEN)\n"); + return CMD_RET_FAILURE; + } acpi_dump_items(dump_contents ? ACPI_DUMP_CONTENTS : ACPI_DUMP_LIST); return 0; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index da17ac8cbc8..2e3feb5a8c0 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -457,7 +457,7 @@ struct global_data { */ fdt_addr_t translation_offset; #endif -#ifdef CONFIG_GENERATE_ACPI_TABLE +#if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_CMD_ACPI) /** * @acpi_ctx: ACPI context pointer */ @@ -536,7 +536,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_dm_priv_base() NULL #endif -#ifdef CONFIG_GENERATE_ACPI_TABLE +#if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_CMD_ACPI) #define gd_acpi_ctx() gd->acpi_ctx #define gd_acpi_start() gd->acpi_start #define gd_set_acpi_start(addr) gd->acpi_start = addr -- 2.39.2.637.g21b0678d19-goog