From patchwork Tue Feb 23 10:35:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1443459 X-Patchwork-Delegate: bmeng.cn@gmail.com 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=K/S0M9Z7; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DlFpW0BMYz9s1l for ; Tue, 23 Feb 2021 21:36:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C97B829FF; Tue, 23 Feb 2021 11:36:24 +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="K/S0M9Z7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 94FFD829EE; Tue, 23 Feb 2021 11:36:07 +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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (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 6B59A829EE for ; Tue, 23 Feb 2021 11:35:59 +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-qv1-xf2f.google.com with SMTP id k8so7069154qvm.6 for ; Tue, 23 Feb 2021 02:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ecF0IAiybKeNhZQiQl7BZ/3MUcKnN8boY3+xqvEYdIc=; b=K/S0M9Z7pf9WCb5Z2mVHjM6tKu6mRIGRm5/cvnrQmMb1gYzR0bytKBJgSLUy9UaT/2 Qqy8weC2a+PL0C0BSYh83NkfxAPJQucxr1XQ3nxQWO3NU74ToPSC1u1tfwu79no+wxMU jj1kS7qCpz9A03tLPDvv9oQz/xHt/JObISl7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ecF0IAiybKeNhZQiQl7BZ/3MUcKnN8boY3+xqvEYdIc=; b=bC4VF10wbcN8/udTy8nYbWpo/XokaWp9YYk1JH6Af5Us3qNWlR2xmOlRAyZ9g7PvZ1 ZDEpTYXJVln80Vbbrz121FLAhDtsEfVMIgk45Uj8fSVrgAt2xHAiopsjhY0X7YUjc+1U 9uQ6qkkwTlCnyH4l1k/YhaS3DYCi3GmeF3YRKo+MRqR6+W5ad7WrGAxoaj8eo3uJ891N 8InOCCx/aE6hEB+ISdTFHO9blYbF24VFJqXLYkvvOjcpUim1b1ptuuU8U/mNKhM0LleD /bLNuK10ecMy9r5pbmCzkznjEPZj2aAHHgEQd5UUuEZTyNN3M+ZvBw34P1572YgCPv/2 oWsw== X-Gm-Message-State: AOAM530XSomjwjxZeEKUKgnu+NS7NK+Dt9c5w7u72med197ZO1VZEhbe mENYVxPcpgjvRXKdF5WoQ5c21dhO+n1bLjYk X-Google-Smtp-Source: ABdhPJxFCTWtushI/dt20N3xd13i7eUG2ZIx33ZswDfh2pb1Zh4mLjy9Fypv1bxQrmy5ArIe8Ht/WQ== X-Received: by 2002:a05:6214:52:: with SMTP id c18mr23902938qvr.54.1614076558066; Tue, 23 Feb 2021 02:35:58 -0800 (PST) Received: from sjg1.roam.corp.google.com ([70.127.249.40]) by smtp.gmail.com with ESMTPSA id f26sm14264099qkh.80.2021.02.23.02.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 02:35:57 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Andy Shevchenko , Heinrich Schuchardt , Simon Glass , Wolfgang Wallner Subject: [PATCH 3/3] x86: Select advanced Intel code only if allowed Date: Tue, 23 Feb 2021 05:35:42 -0500 Message-Id: <20210223103542.1386572-3-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.617.g56c4b15f3c-goog In-Reply-To: <20210223103542.1386572-1-sjg@chromium.org> References: <20210223103542.1386572-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean At present most of the Intel-specific code is built on all devices, even those which don't have software support for the features provided there. This means that any board can enable CONFIG_INTEL_ACPIGEN even if it does not have the required features. Add a new INTEL_SOC option to control this access. This must be selected by SoCs that can support the required features. Reported-by: Heinrich Schuchardt Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/Kconfig | 15 +++++++++++++++ arch/x86/cpu/apollolake/Kconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c8ce2fcb88d..b4a86f8fa05 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1001,6 +1001,19 @@ config PCIEX_LENGTH_128MB config PCIEX_LENGTH_64MB bool +config INTEL_SOC + bool + help + This is enabled on Intel SoCs that can support various advanced + features such as power management (requiring asm/arch/pm.h), system + agent (asm/arch/systemagent.h) and an I/O map for ACPI + (asm/arch/iomap.h). + + This cannot be seleted in a defconfig file. It must be enabled by a + 'select' in the SoC's Kconfig. + +if INTEL_SOC + config INTEL_ACPIGEN bool "Support ACPI table generation for Intel SoCs" depends on ACPIGEN @@ -1032,4 +1045,6 @@ config INTEL_GMA_SWSMISCI Select this option for Atom-based platforms which use the SWSMISCI register (0xe0) rather than the SWSCI register (0xe8). +endif # INTEL_SOC + endmenu diff --git a/arch/x86/cpu/apollolake/Kconfig b/arch/x86/cpu/apollolake/Kconfig index f5dbd6cbd34..590fe31dc4b 100644 --- a/arch/x86/cpu/apollolake/Kconfig +++ b/arch/x86/cpu/apollolake/Kconfig @@ -9,6 +9,7 @@ config INTEL_APOLLOLAKE select HAVE_FSP select ARCH_MISC_INIT select USE_CAR + select INTEL_SOC select INTEL_PMC select TPL_X86_TSC_TIMER_NATIVE select SPL_PCH_SUPPORT