All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] x86: Fix member check in intel_gnvs
@ 2021-02-23 10:35 Simon Glass
  2021-02-23 10:35 ` [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86 Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Simon Glass @ 2021-02-23 10:35 UTC (permalink / raw)
  To: u-boot

When CONFIG_CHROMEOS is not enabled this currently does not build. Fix it.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/include/asm/intel_gnvs.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/include/asm/intel_gnvs.h b/arch/x86/include/asm/intel_gnvs.h
index 69a20812e5e..fc743dc9285 100644
--- a/arch/x86/include/asm/intel_gnvs.h
+++ b/arch/x86/include/asm/intel_gnvs.h
@@ -107,6 +107,10 @@ struct __packed acpi_global_nvs {
 	u8	unused2[0x1000 - 0x100];	/* Pad out to 4096 bytes */
 #endif
 };
+#ifdef CONFIG_CHROMEOS
 check_member(acpi_global_nvs, chromeos, GNVS_CHROMEOS_ACPI_OFFSET);
+#else
+check_member(acpi_global_nvs, unused2, GNVS_CHROMEOS_ACPI_OFFSET);
+#endif
 
 #endif /* _INTEL_GNVS_H_ */
-- 
2.30.0.617.g56c4b15f3c-goog

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86
  2021-02-23 10:35 [PATCH 1/3] x86: Fix member check in intel_gnvs Simon Glass
@ 2021-02-23 10:35 ` Simon Glass
  2021-02-25 13:25   ` Bin Meng
  2021-02-23 10:35 ` [PATCH 3/3] x86: Select advanced Intel code only if allowed Simon Glass
  2021-02-25 13:25 ` [PATCH 1/3] x86: Fix member check in intel_gnvs Bin Meng
  2 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2021-02-23 10:35 UTC (permalink / raw)
  To: u-boot

This option is better placed in the x86 code since it is not generic
enough to be in the core code. Move it.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/Kconfig     | 9 +++++++++
 drivers/core/Kconfig | 9 ---------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index eddf2a774ef..c8ce2fcb88d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1001,6 +1001,15 @@ config PCIEX_LENGTH_128MB
 config PCIEX_LENGTH_64MB
 	bool
 
+config INTEL_ACPIGEN
+	bool "Support ACPI table generation for Intel SoCs"
+	depends on ACPIGEN
+	help
+	  This option adds some functions used for programatic generation of
+	  ACPI tables on Intel SoCs. This provides features for writing CPU
+	  information such as P states and T stages. Also included is a way
+	  to create a GNVS table and set it up.
+
 config INTEL_GMA_ACPI
 	bool "Generate ACPI table for Intel GMA graphics"
 	help
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 00554af4995..1eccac28c62 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -329,15 +329,6 @@ config ACPIGEN
 	  things like generating device-specific tables and returning the ACPI
 	  name of a device.
 
-config INTEL_ACPIGEN
-	bool "Support ACPI table generation for Intel SoCs"
-	depends on ACPIGEN
-	help
-	  This option adds some functions used for programatic generation of
-	  ACPI tables on Intel SoCs. This provides features for writing CPU
-	  information such as P states and T stages. Also included is a way
-	  to create a GNVS table and set it up.
-
 config BOUNCE_BUFFER
 	bool "Include bounce buffer API"
 	help
-- 
2.30.0.617.g56c4b15f3c-goog

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] x86: Select advanced Intel code only if allowed
  2021-02-23 10:35 [PATCH 1/3] x86: Fix member check in intel_gnvs Simon Glass
  2021-02-23 10:35 ` [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86 Simon Glass
@ 2021-02-23 10:35 ` Simon Glass
  2021-02-25 13:25   ` Bin Meng
  2021-02-25 13:25 ` [PATCH 1/3] x86: Fix member check in intel_gnvs Bin Meng
  2 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2021-02-23 10:35 UTC (permalink / raw)
  To: u-boot

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 <xypron.glpk@gmx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 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
-- 
2.30.0.617.g56c4b15f3c-goog

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/3] x86: Fix member check in intel_gnvs
  2021-02-23 10:35 [PATCH 1/3] x86: Fix member check in intel_gnvs Simon Glass
  2021-02-23 10:35 ` [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86 Simon Glass
  2021-02-23 10:35 ` [PATCH 3/3] x86: Select advanced Intel code only if allowed Simon Glass
@ 2021-02-25 13:25 ` Bin Meng
  2021-02-25 13:31   ` Bin Meng
  2 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2021-02-25 13:25 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 23, 2021 at 6:35 PM Simon Glass <sjg@chromium.org> wrote:
>
> When CONFIG_CHROMEOS is not enabled this currently does not build. Fix it.
>
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/include/asm/intel_gnvs.h | 4 ++++
>  1 file changed, 4 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86
  2021-02-23 10:35 ` [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86 Simon Glass
@ 2021-02-25 13:25   ` Bin Meng
  2021-02-25 13:32     ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2021-02-25 13:25 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 23, 2021 at 6:35 PM Simon Glass <sjg@chromium.org> wrote:
>
> This option is better placed in the x86 code since it is not generic
> enough to be in the core code. Move it.
>
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/Kconfig     | 9 +++++++++
>  drivers/core/Kconfig | 9 ---------
>  2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index eddf2a774ef..c8ce2fcb88d 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1001,6 +1001,15 @@ config PCIEX_LENGTH_128MB
>  config PCIEX_LENGTH_64MB
>         bool
>
> +config INTEL_ACPIGEN
> +       bool "Support ACPI table generation for Intel SoCs"
> +       depends on ACPIGEN
> +       help
> +         This option adds some functions used for programatic generation of

typo: programmatic

Will fix when applying

> +         ACPI tables on Intel SoCs. This provides features for writing CPU
> +         information such as P states and T stages. Also included is a way
> +         to create a GNVS table and set it up.
> +
>  config INTEL_GMA_ACPI
>         bool "Generate ACPI table for Intel GMA graphics"
>         help

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] x86: Select advanced Intel code only if allowed
  2021-02-23 10:35 ` [PATCH 3/3] x86: Select advanced Intel code only if allowed Simon Glass
@ 2021-02-25 13:25   ` Bin Meng
  2021-02-25 13:34     ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2021-02-25 13:25 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 23, 2021 at 6:35 PM Simon Glass <sjg@chromium.org> wrote:
>
> 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 <xypron.glpk@gmx.de>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  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

typo: selected

Will fix when applying

> +         '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
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] x86: Fix member check in intel_gnvs
  2021-02-25 13:25 ` [PATCH 1/3] x86: Fix member check in intel_gnvs Bin Meng
@ 2021-02-25 13:31   ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2021-02-25 13:31 UTC (permalink / raw)
  To: u-boot

On Thu, Feb 25, 2021 at 9:25 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Feb 23, 2021 at 6:35 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > When CONFIG_CHROMEOS is not enabled this currently does not build. Fix it.
> >
> > Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  arch/x86/include/asm/intel_gnvs.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86
  2021-02-25 13:25   ` Bin Meng
@ 2021-02-25 13:32     ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2021-02-25 13:32 UTC (permalink / raw)
  To: u-boot

On Thu, Feb 25, 2021 at 9:25 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Feb 23, 2021 at 6:35 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > This option is better placed in the x86 code since it is not generic
> > enough to be in the core code. Move it.
> >
> > Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  arch/x86/Kconfig     | 9 +++++++++
> >  drivers/core/Kconfig | 9 ---------
> >  2 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index eddf2a774ef..c8ce2fcb88d 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -1001,6 +1001,15 @@ config PCIEX_LENGTH_128MB
> >  config PCIEX_LENGTH_64MB
> >         bool
> >
> > +config INTEL_ACPIGEN
> > +       bool "Support ACPI table generation for Intel SoCs"
> > +       depends on ACPIGEN
> > +       help
> > +         This option adds some functions used for programatic generation of
>
> typo: programmatic
>
> Will fix when applying

Fixed the typo, and

>
> > +         ACPI tables on Intel SoCs. This provides features for writing CPU
> > +         information such as P states and T stages. Also included is a way
> > +         to create a GNVS table and set it up.
> > +
> >  config INTEL_GMA_ACPI
> >         bool "Generate ACPI table for Intel GMA graphics"
> >         help
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] x86: Select advanced Intel code only if allowed
  2021-02-25 13:25   ` Bin Meng
@ 2021-02-25 13:34     ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2021-02-25 13:34 UTC (permalink / raw)
  To: u-boot

On Thu, Feb 25, 2021 at 9:25 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Feb 23, 2021 at 6:35 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > 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 <xypron.glpk@gmx.de>
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  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
>
> typo: selected
>
> Will fix when applying

Fixed the typo, and

>
> > +         '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
> > --
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-02-25 13:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 10:35 [PATCH 1/3] x86: Fix member check in intel_gnvs Simon Glass
2021-02-23 10:35 ` [PATCH 2/3] x86: Move INTEL_ACPIGEN to arch/x86 Simon Glass
2021-02-25 13:25   ` Bin Meng
2021-02-25 13:32     ` Bin Meng
2021-02-23 10:35 ` [PATCH 3/3] x86: Select advanced Intel code only if allowed Simon Glass
2021-02-25 13:25   ` Bin Meng
2021-02-25 13:34     ` Bin Meng
2021-02-25 13:25 ` [PATCH 1/3] x86: Fix member check in intel_gnvs Bin Meng
2021-02-25 13:31   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.