the following patch was just integrated into master:
commit f7dd6d5da13131d5161185c60e757ae4c4406f46
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Wed May 4 17:52:56 2016 -0700
lib/reg_script: Fix braces
In If0d4d61ed8ef48ec20082b327f358fd1987e3fb9 the code
was changed from one to two lines in the body of an if()
statement, without adding braces.
Change-Id: Ibbbdf240157adae95151fb2ce0135948caa60108
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/14621
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Leroy P Leahy <leroy.p.leahy(a)intel.com>
See https://review.coreboot.org/14621 for details.
-gerrit
Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14623
-gerrit
commit 5772b062164f2f086ccca1abf777a902ceb97644
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed May 4 23:25:16 2016 -0700
xip: Do not pass --xip for romstage and verstage if CAR supports code
execution
On modern x86 platform like apollolake, pre-RAM stages verstage and
romstage run within the cache-as-ram region. Thus, we do not need to
pass in the --xip parameter to cbfstool while adding these
stages. Introduce a new Kconfig variable NO_XIP_EARLY_STAGES which is default
false for all x86 platforms. Apollolake selects this option since it
supports code execution with CAR.
Change-Id: I2848046472f40f09ce7fc230c258b0389851b2ea
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
Makefile.inc | 9 ++++++++-
src/Kconfig | 8 ++++++++
src/soc/intel/apollolake/Kconfig | 1 +
src/vendorcode/google/chromeos/vboot2/Makefile.inc | 10 ++++++++--
4 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 94273df..b02b8c3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -798,7 +798,14 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
#
# Make sure that segment for .car.data is ignored while adding romstage.
$(CONFIG_CBFS_PREFIX)/romstage-align := 64
-$(CONFIG_CBFS_PREFIX)/romstage-options := --xip -S .car.data -P $(CONFIG_XIP_ROM_SIZE)
+$(CONFIG_CBFS_PREFIX)/romstage-options := -S ".car.data"
+
+# If CAR does not support execution of code, romstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/romstage-options += --xip -P $(CONFIG_XIP_ROM_SIZE)
+endif
+
endif
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/ramstage
diff --git a/src/Kconfig b/src/Kconfig
index f9bd661..b56f0107 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -199,6 +199,14 @@ config INCLUDE_CONFIG_FILE
config 0x8d740 raw 3324
(empty) 0x8e480 null 3610440
+config NO_XIP_EARLY_STAGES
+ bool
+ default n if ARCH_X86
+ default y
+ help
+ Identify if --xip parameter needs to be passed into cbfstool for early
+ stages.
+
config EARLY_CBMEM_INIT
def_bool !LATE_CBMEM_INIT
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index bdb8eeb..b05c1da 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -19,6 +19,7 @@ config CPU_SPECIFIC_OPTIONS
select SUPPORT_CPU_UCODE_IN_CBFS
# Misc options
select C_ENVIRONMENT_BOOTBLOCK
+ select NO_XIP_EARLY_STAGES
select COLLECT_TIMESTAMPS
select HAVE_INTEL_FIRMWARE
select MMCONF_SUPPORT
diff --git a/src/vendorcode/google/chromeos/vboot2/Makefile.inc b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
index f934884..b0a3c12 100644
--- a/src/vendorcode/google/chromeos/vboot2/Makefile.inc
+++ b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
@@ -76,9 +76,15 @@ cbfs-files-$(CONFIG_SEPARATE_VERSTAGE) += $(CONFIG_CBFS_PREFIX)/verstage
$(CONFIG_CBFS_PREFIX)/verstage-file := $(objcbfs)/verstage.elf
$(CONFIG_CBFS_PREFIX)/verstage-type := stage
$(CONFIG_CBFS_PREFIX)/verstage-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
-# Verstage on x86 expected to be xip.
+
ifeq ($(CONFIG_ARCH_VERSTAGE_X86_32)$(CONFIG_ARCH_VERSTAGE_X86_64),y)
-$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 --xip -S ".car.data"
+$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 -S ".car.data"
+
+# If CAR does not support execution of code, verstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/verstage-options += --xip
+endif
endif
Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14623
-gerrit
commit 7f13c55c39624ab79b0ac32781e7bf8b5df46cc7
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed May 4 23:25:16 2016 -0700
xip: Do not pass --xip for romstage and verstage if CAR supports code
execution
On modern x86 platform like apollolake, pre-RAM stages verstage and
romstage run within the cache-as-ram region. Thus, we do not need to
pass in the --xip parameter to cbfstool while adding these
stages. Introduce a new Kconfig variable NO_XIP_EARLY_STAGES which is default
false for all x86 platforms. Apollolake selects this option since it
supports code execution with CAR.
Change-Id: I2848046472f40f09ce7fc230c258b0389851b2ea
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
Makefile.inc | 9 ++++++++-
src/Kconfig | 5 +++++
src/soc/intel/apollolake/Kconfig | 1 +
src/vendorcode/google/chromeos/vboot2/Makefile.inc | 10 ++++++++--
4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 94273df..b02b8c3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -798,7 +798,14 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
#
# Make sure that segment for .car.data is ignored while adding romstage.
$(CONFIG_CBFS_PREFIX)/romstage-align := 64
-$(CONFIG_CBFS_PREFIX)/romstage-options := --xip -S .car.data -P $(CONFIG_XIP_ROM_SIZE)
+$(CONFIG_CBFS_PREFIX)/romstage-options := -S ".car.data"
+
+# If CAR does not support execution of code, romstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/romstage-options += --xip -P $(CONFIG_XIP_ROM_SIZE)
+endif
+
endif
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/ramstage
diff --git a/src/Kconfig b/src/Kconfig
index f9bd661..aa9fa36 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -199,6 +199,11 @@ config INCLUDE_CONFIG_FILE
config 0x8d740 raw 3324
(empty) 0x8e480 null 3610440
+config NO_XIP_EARLY_STAGES
+ bool
+ default n if ARCH_X86
+ default y
+
config EARLY_CBMEM_INIT
def_bool !LATE_CBMEM_INIT
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index bdb8eeb..b05c1da 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -19,6 +19,7 @@ config CPU_SPECIFIC_OPTIONS
select SUPPORT_CPU_UCODE_IN_CBFS
# Misc options
select C_ENVIRONMENT_BOOTBLOCK
+ select NO_XIP_EARLY_STAGES
select COLLECT_TIMESTAMPS
select HAVE_INTEL_FIRMWARE
select MMCONF_SUPPORT
diff --git a/src/vendorcode/google/chromeos/vboot2/Makefile.inc b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
index f934884..b0a3c12 100644
--- a/src/vendorcode/google/chromeos/vboot2/Makefile.inc
+++ b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
@@ -76,9 +76,15 @@ cbfs-files-$(CONFIG_SEPARATE_VERSTAGE) += $(CONFIG_CBFS_PREFIX)/verstage
$(CONFIG_CBFS_PREFIX)/verstage-file := $(objcbfs)/verstage.elf
$(CONFIG_CBFS_PREFIX)/verstage-type := stage
$(CONFIG_CBFS_PREFIX)/verstage-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
-# Verstage on x86 expected to be xip.
+
ifeq ($(CONFIG_ARCH_VERSTAGE_X86_32)$(CONFIG_ARCH_VERSTAGE_X86_64),y)
-$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 --xip -S ".car.data"
+$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 -S ".car.data"
+
+# If CAR does not support execution of code, verstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/verstage-options += --xip
+endif
endif
Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14623
-gerrit
commit 0b7e2af1166d9c389a0bdc90690c702dfe62d017
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed May 4 23:25:16 2016 -0700
xip: Do not pass --xip for romstage and verstage if CAR supports code
execution
On modern x86 platform like apollolake, pre-RAM stages verstage and
romstage run within the cache-as-ram region. Thus, we do not need to
pass in the --xip parameter to cbfstool while adding these
stages. Introduce a new Kconfig variable NO_XIP_EARLY_STAGES which is default
false for all x86 platforms. Apollolake selects this option since it
supports code execution with CAR.
Change-Id: I2848046472f40f09ce7fc230c258b0389851b2ea
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
Makefile.inc | 9 ++++++++-
src/Kconfig | 8 ++++++++
src/soc/intel/apollolake/Kconfig | 1 +
src/vendorcode/google/chromeos/vboot2/Makefile.inc | 10 ++++++++--
4 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 94273df..b02b8c3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -798,7 +798,14 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
#
# Make sure that segment for .car.data is ignored while adding romstage.
$(CONFIG_CBFS_PREFIX)/romstage-align := 64
-$(CONFIG_CBFS_PREFIX)/romstage-options := --xip -S .car.data -P $(CONFIG_XIP_ROM_SIZE)
+$(CONFIG_CBFS_PREFIX)/romstage-options := -S ".car.data"
+
+# If CAR does not support execution of code, romstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/romstage-options += --xip -P $(CONFIG_XIP_ROM_SIZE)
+endif
+
endif
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/ramstage
diff --git a/src/Kconfig b/src/Kconfig
index f9bd661..b56f0107 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -199,6 +199,14 @@ config INCLUDE_CONFIG_FILE
config 0x8d740 raw 3324
(empty) 0x8e480 null 3610440
+config NO_XIP_EARLY_STAGES
+ bool
+ default n if ARCH_X86
+ default y
+ help
+ Identify if --xip parameter needs to be passed into cbfstool for early
+ stages.
+
config EARLY_CBMEM_INIT
def_bool !LATE_CBMEM_INIT
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index bdb8eeb..b05c1da 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -19,6 +19,7 @@ config CPU_SPECIFIC_OPTIONS
select SUPPORT_CPU_UCODE_IN_CBFS
# Misc options
select C_ENVIRONMENT_BOOTBLOCK
+ select NO_XIP_EARLY_STAGES
select COLLECT_TIMESTAMPS
select HAVE_INTEL_FIRMWARE
select MMCONF_SUPPORT
diff --git a/src/vendorcode/google/chromeos/vboot2/Makefile.inc b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
index f934884..b0a3c12 100644
--- a/src/vendorcode/google/chromeos/vboot2/Makefile.inc
+++ b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
@@ -76,9 +76,15 @@ cbfs-files-$(CONFIG_SEPARATE_VERSTAGE) += $(CONFIG_CBFS_PREFIX)/verstage
$(CONFIG_CBFS_PREFIX)/verstage-file := $(objcbfs)/verstage.elf
$(CONFIG_CBFS_PREFIX)/verstage-type := stage
$(CONFIG_CBFS_PREFIX)/verstage-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
-# Verstage on x86 expected to be xip.
+
ifeq ($(CONFIG_ARCH_VERSTAGE_X86_32)$(CONFIG_ARCH_VERSTAGE_X86_64),y)
-$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 --xip -S ".car.data"
+$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 -S ".car.data"
+
+# If CAR does not support execution of code, verstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/verstage-options += --xip
+endif
endif
Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14623
-gerrit
commit 48b8466407730bd98c8c927f4158f2198cba63d5
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed May 4 23:25:16 2016 -0700
xip: Do not pass --xip for romstage and verstage if CAR supports code
execution
On modern x86 platform like apollolake, pre-RAM stages verstage and
romstage run within the cache-as-ram region. Thus, we do not need to
pass in the --xip parameter to cbfstool while adding these
stages. Introduce a new Kconfig variable NO_XIP_EARLY_STAGES which is default
false for all x86 platforms. Apollolake selects this option since it
supports code execution with CAR.
Change-Id: I2848046472f40f09ce7fc230c258b0389851b2ea
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
Makefile.inc | 9 ++++++++-
src/Kconfig | 8 ++++++++
src/soc/intel/apollolake/Kconfig | 1 +
src/vendorcode/google/chromeos/vboot2/Makefile.inc | 10 ++++++++--
4 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 94273df..b02b8c3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -798,7 +798,14 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
#
# Make sure that segment for .car.data is ignored while adding romstage.
$(CONFIG_CBFS_PREFIX)/romstage-align := 64
-$(CONFIG_CBFS_PREFIX)/romstage-options := --xip -S .car.data -P $(CONFIG_XIP_ROM_SIZE)
+$(CONFIG_CBFS_PREFIX)/romstage-options := -S ".car.data"
+
+# If CAR does not support execution of code, romstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/romstage-options += --xip -P $(CONFIG_XIP_ROM_SIZE)
+endif
+
endif
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/ramstage
diff --git a/src/Kconfig b/src/Kconfig
index f9bd661..0ec4852 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -199,6 +199,14 @@ config INCLUDE_CONFIG_FILE
config 0x8d740 raw 3324
(empty) 0x8e480 null 3610440
+config NO_XIP_EARLY_STAGES
+ bool "Identify if a platform uses xip early stages."
+ default n if ARCH_X86
+ default y
+ help
+ Identify if --xip parameter needs to be passed into cbfstool for early
+ stages.
+
config EARLY_CBMEM_INIT
def_bool !LATE_CBMEM_INIT
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index bdb8eeb..b05c1da 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -19,6 +19,7 @@ config CPU_SPECIFIC_OPTIONS
select SUPPORT_CPU_UCODE_IN_CBFS
# Misc options
select C_ENVIRONMENT_BOOTBLOCK
+ select NO_XIP_EARLY_STAGES
select COLLECT_TIMESTAMPS
select HAVE_INTEL_FIRMWARE
select MMCONF_SUPPORT
diff --git a/src/vendorcode/google/chromeos/vboot2/Makefile.inc b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
index f934884..b0a3c12 100644
--- a/src/vendorcode/google/chromeos/vboot2/Makefile.inc
+++ b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
@@ -76,9 +76,15 @@ cbfs-files-$(CONFIG_SEPARATE_VERSTAGE) += $(CONFIG_CBFS_PREFIX)/verstage
$(CONFIG_CBFS_PREFIX)/verstage-file := $(objcbfs)/verstage.elf
$(CONFIG_CBFS_PREFIX)/verstage-type := stage
$(CONFIG_CBFS_PREFIX)/verstage-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
-# Verstage on x86 expected to be xip.
+
ifeq ($(CONFIG_ARCH_VERSTAGE_X86_32)$(CONFIG_ARCH_VERSTAGE_X86_64),y)
-$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 --xip -S ".car.data"
+$(CONFIG_CBFS_PREFIX)/verstage-options := -a 64 -S ".car.data"
+
+# If CAR does not support execution of code, verstage on x86 is expected to be
+# xip.
+ifneq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
+$(CONFIG_CBFS_PREFIX)/verstage-options += --xip
+endif
endif
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14605
-gerrit
commit bff8ea8d3d32ddbe87431fb616012ab397e61004
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed May 4 09:00:13 2016 -0500
{cpu,soc}/intel: remove unused smm_init() function
There used to be a need for an empty smm_init() function
because initialize_cpus() called it even though nothing
called initialize_cpus(). However, garbage collection at
link time is implemented so there's no reason to provide an
empty function to satisfy a symbol that is completely culled
during link. Remove it.
Change-Id: Ic13c85f1d3d57e38e7132e4289a98a95829f765a
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/intel/haswell/smmrelocate.c | 9 ---------
src/soc/intel/baytrail/placeholders.c | 3 ---
src/soc/intel/braswell/smm.c | 4 ----
src/soc/intel/broadwell/smmrelocate.c | 9 ---------
src/soc/intel/fsp_baytrail/placeholders.c | 4 ----
src/soc/intel/skylake/smmrelocate.c | 11 -----------
6 files changed, 40 deletions(-)
diff --git a/src/cpu/intel/haswell/smmrelocate.c b/src/cpu/intel/haswell/smmrelocate.c
index 5c50ad1c..34a3551 100644
--- a/src/cpu/intel/haswell/smmrelocate.c
+++ b/src/cpu/intel/haswell/smmrelocate.c
@@ -352,15 +352,6 @@ void smm_relocate(void)
smm_initiate_relocation();
}
-void smm_init(void)
-{
- /* smm_init() is normally called from initialize_cpus() in
- * lapic_cpu_init.c. However, that path is no longer used. Don't reuse
- * the function name because that would cause confusion.
- * The smm_initialize() function above is used to setup SMM at the
- * appropriate time. */
-}
-
void smm_lock(void)
{
/* LOCK the SMM memory window and enable normal SMM.
diff --git a/src/soc/intel/baytrail/placeholders.c b/src/soc/intel/baytrail/placeholders.c
index 500ced2..b110f5f 100644
--- a/src/soc/intel/baytrail/placeholders.c
+++ b/src/soc/intel/baytrail/placeholders.c
@@ -17,8 +17,5 @@
#include <device/pci_rom.h>
#include <soc/acpi.h>
-
-void smm_init(void) {}
-
/* Rmodules don't like weak symbols. */
u32 map_oprom_vendev(u32 vendev) { return vendev; }
diff --git a/src/soc/intel/braswell/smm.c b/src/soc/intel/braswell/smm.c
index 8318050..3a7ab1c 100644
--- a/src/soc/intel/braswell/smm.c
+++ b/src/soc/intel/braswell/smm.c
@@ -29,10 +29,6 @@
/* Save settings which will be committed in SMI functions. */
static uint32_t smm_save_params[SMM_SAVE_PARAM_COUNT];
-void smm_init(void)
-{
-}
-
void southcluster_smm_save_param(int param, uint32_t data)
{
smm_save_params[param] = data;
diff --git a/src/soc/intel/broadwell/smmrelocate.c b/src/soc/intel/broadwell/smmrelocate.c
index 0cc6399..6fd609b 100644
--- a/src/soc/intel/broadwell/smmrelocate.c
+++ b/src/soc/intel/broadwell/smmrelocate.c
@@ -316,15 +316,6 @@ void smm_relocate(void)
smm_initiate_relocation();
}
-void smm_init(void)
-{
- /* smm_init() is normally called from initialize_cpus() in
- * lapic_cpu_init.c. However, that path is no longer used. Don't reuse
- * the function name because that would cause confusion.
- * The smm_initialize() function above is used to setup SMM at the
- * appropriate time. */
-}
-
void smm_lock(void)
{
/* LOCK the SMM memory window and enable normal SMM.
diff --git a/src/soc/intel/fsp_baytrail/placeholders.c b/src/soc/intel/fsp_baytrail/placeholders.c
index 248aba2..587f0e9 100644
--- a/src/soc/intel/fsp_baytrail/placeholders.c
+++ b/src/soc/intel/fsp_baytrail/placeholders.c
@@ -20,9 +20,5 @@
void acpi_create_serialio_ssdt(acpi_header_t *ssdt) {}
-#if IS_ENABLED(CONFIG_HAVE_SMI_HANDLER)
-void smm_init(void) {}
-#endif
-
/* Rmodules don't like weak symbols. */
u32 map_oprom_vendev(u32 vendev) { return vendev; }
diff --git a/src/soc/intel/skylake/smmrelocate.c b/src/soc/intel/skylake/smmrelocate.c
index 0c08068..807aaa3 100644
--- a/src/soc/intel/skylake/smmrelocate.c
+++ b/src/soc/intel/skylake/smmrelocate.c
@@ -305,17 +305,6 @@ void smm_relocate(void)
smm_initiate_relocation();
}
-void smm_init(void)
-{
- /*
- * smm_init() is normally called from initialize_cpus() in
- * lapic_cpu_init.c. However, that path is no longer used. Don't reuse
- * the function name because that would cause confusion.
- * The smm_initialize() function above is used to setup SMM at the
- * appropriate time.
- */
-}
-
void smm_lock(void)
{
/*
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14598
-gerrit
commit cc25601a5782d94ae1edfabcd3003412f60c83e0
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue May 3 17:49:57 2016 -0500
cpu/x86/mp_init: reduce exposure of internal implementation
With all users converted to using the mp_ops callbacks there's
no need to expose that surface area. Therefore, keep it all
within the mp_init compilation unit.
Change-Id: Ia1cc5326c1fa5ffde86b90d805b8379f4e4f46cd
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/x86/mp_init.c | 78 ++++++++++++++++++++++++++++++++++++++++++++--
src/include/cpu/x86/mp.h | 81 ------------------------------------------------
2 files changed, 75 insertions(+), 84 deletions(-)
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 362cda3..b9084c7 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -38,6 +38,57 @@
#include <thread.h>
#define MAX_APIC_IDS 256
+
+typedef void (*mp_callback_t)(void);
+
+/*
+ * A mp_flight_record details a sequence of calls for the APs to perform
+ * along with the BSP to coordinate sequencing. Each flight record either
+ * provides a barrier for each AP before calling the callback or the APs
+ * are allowed to perform the callback without waiting. Regardless, each
+ * record has the cpus_entered field incremented for each record. When
+ * the BSP observes that the cpus_entered matches the number of APs
+ * the bsp_call is called with bsp_arg and upon returning releases the
+ * barrier allowing the APs to make further progress.
+ *
+ * Note that ap_call() and bsp_call() can be NULL. In the NULL case the
+ * callback will just not be called.
+ */
+struct mp_flight_record {
+ atomic_t barrier;
+ atomic_t cpus_entered;
+ mp_callback_t ap_call;
+ mp_callback_t bsp_call;
+} __attribute__((aligned(CACHELINE_SIZE)));
+
+#define _MP_FLIGHT_RECORD(barrier_, ap_func_, bsp_func_) \
+ { \
+ .barrier = ATOMIC_INIT(barrier_), \
+ .cpus_entered = ATOMIC_INIT(0), \
+ .ap_call = ap_func_, \
+ .bsp_call = bsp_func_, \
+ }
+
+#define MP_FR_BLOCK_APS(ap_func_, bsp_func_) \
+ _MP_FLIGHT_RECORD(0, ap_func_, bsp_func_)
+
+#define MP_FR_NOBLOCK_APS(ap_func_, bsp_func_) \
+ _MP_FLIGHT_RECORD(1, ap_func_, bsp_func_)
+
+/* The mp_params structure provides the arguments to the mp subsystem
+ * for bringing up APs. */
+struct mp_params {
+ int num_cpus; /* Total cpus include BSP */
+ int parallel_microcode_load;
+ const void *microcode_pointer;
+ /* adjust_apic_id() is called for every potential apic id in the
+ * system up from 0 to CONFIG_MAX_CPUS. Return adjusted apic_id. */
+ int (*adjust_apic_id)(int index, int apic_id);
+ /* Flight plan for APs and BSP. */
+ struct mp_flight_record *flight_plan;
+ int num_records;
+};
+
/* This needs to match the layout in the .module_parametrs section. */
struct sipi_params {
uint16_t gdtlimit;
@@ -514,7 +565,26 @@ static void init_bsp(struct bus *cpu_bus)
cpus[info->index].apic_id = cpu_path.apic.apic_id;
}
-int mp_init(struct bus *cpu_bus, struct mp_params *p)
+/*
+ * mp_init() will set up the SIPI vector and bring up the APs according to
+ * mp_params. Each flight record will be executed according to the plan. Note
+ * that the MP infrastructure uses SMM default area without saving it. It's
+ * up to the chipset or mainboard to either e820 reserve this area or save this
+ * region prior to calling mp_init() and restoring it after mp_init returns.
+ *
+ * At the time mp_init() is called the MTRR MSRs are mirrored into APs then
+ * caching is enabled before running the flight plan.
+ *
+ * The MP initialization has the following properties:
+ * 1. APs are brought up in parallel.
+ * 2. The ordering of coreboot cpu number and APIC ids is not deterministic.
+ * Therefore, one cannot rely on this property or the order of devices in
+ * the device tree unless the chipset or mainboard know the APIC ids
+ * a priori.
+ *
+ * mp_init() returns < 0 on error, 0 on success.
+ */
+static int mp_init(struct bus *cpu_bus, struct mp_params *p)
{
int num_cpus;
int num_aps;
@@ -563,14 +633,16 @@ int mp_init(struct bus *cpu_bus, struct mp_params *p)
return bsp_do_flight_plan(p);
}
-void mp_initialize_cpu(void)
+/* Calls cpu_initialize(info->index) which calls the coreboot CPU drivers. */
+static void mp_initialize_cpu(void)
{
/* Call back into driver infrastructure for the AP initialization. */
struct cpu_info *info = cpu_info();
cpu_initialize(info->index);
}
-int mp_get_apic_id(int cpu_slot)
+/* Returns apic id for coreboot cpu number or < 0 on failure. */
+static int mp_get_apic_id(int cpu_slot)
{
if (cpu_slot >= CONFIG_MAX_CPUS || cpu_slot < 0)
return -1;
diff --git a/src/include/cpu/x86/mp.h b/src/include/cpu/x86/mp.h
index ff88a20..9742df0 100644
--- a/src/include/cpu/x86/mp.h
+++ b/src/include/cpu/x86/mp.h
@@ -29,56 +29,6 @@ static inline void mfence(void)
__asm__ __volatile__("mfence\t\n": : :"memory");
}
-typedef void (*mp_callback_t)(void);
-
-/*
- * A mp_flight_record details a sequence of calls for the APs to perform
- * along with the BSP to coordinate sequencing. Each flight record either
- * provides a barrier for each AP before calling the callback or the APs
- * are allowed to perform the callback without waiting. Regardless, each
- * record has the cpus_entered field incremented for each record. When
- * the BSP observes that the cpus_entered matches the number of APs
- * the bsp_call is called with bsp_arg and upon returning releases the
- * barrier allowing the APs to make further progress.
- *
- * Note that ap_call() and bsp_call() can be NULL. In the NULL case the
- * callback will just not be called.
- */
-struct mp_flight_record {
- atomic_t barrier;
- atomic_t cpus_entered;
- mp_callback_t ap_call;
- mp_callback_t bsp_call;
-} __attribute__((aligned(CACHELINE_SIZE)));
-
-#define _MP_FLIGHT_RECORD(barrier_, ap_func_, bsp_func_) \
- { \
- .barrier = ATOMIC_INIT(barrier_), \
- .cpus_entered = ATOMIC_INIT(0), \
- .ap_call = ap_func_, \
- .bsp_call = bsp_func_, \
- }
-
-#define MP_FR_BLOCK_APS(ap_func_, bsp_func_) \
- _MP_FLIGHT_RECORD(0, ap_func_, bsp_func_)
-
-#define MP_FR_NOBLOCK_APS(ap_func_, bsp_func_) \
- _MP_FLIGHT_RECORD(1, ap_func_, bsp_func_)
-
-/* The mp_params structure provides the arguments to the mp subsystem
- * for bringing up APs. */
-struct mp_params {
- int num_cpus; /* Total cpus include BSP */
- int parallel_microcode_load;
- const void *microcode_pointer;
- /* adjust_apic_id() is called for every potential apic id in the
- * system up from 0 to CONFIG_MAX_CPUS. Return adjusted apic_id. */
- int (*adjust_apic_id)(int index, int apic_id);
- /* Flight plan for APs and BSP. */
- struct mp_flight_record *flight_plan;
- int num_records;
-};
-
/* The sequence of the callbacks are in calling order. */
struct mp_ops {
/*
@@ -175,37 +125,6 @@ struct mp_ops {
int mp_init_with_smm(struct bus *cpu_bus, const struct mp_ops *mp_ops);
/*
- * mp_init() will set up the SIPI vector and bring up the APs according to
- * mp_params. Each flight record will be executed according to the plan. Note
- * that the MP infrastructure uses SMM default area without saving it. It's
- * up to the chipset or mainboard to either e820 reserve this area or save this
- * region prior to calling mp_init() and restoring it after mp_init returns.
- *
- * At the time mp_init() is called the MTRR MSRs are mirrored into APs then
- * caching is enabled before running the flight plan.
- *
- * The MP initialization has the following properties:
- * 1. APs are brought up in parallel.
- * 2. The ordering of coreboot cpu number and APIC ids is not deterministic.
- * Therefore, one cannot rely on this property or the order of devices in
- * the device tree unless the chipset or mainboard know the APIC ids
- * a priori.
- *
- * mp_init() returns < 0 on error, 0 on success.
- */
-int mp_init(struct bus *cpu_bus, struct mp_params *params);
-
-/*
- * Useful functions to use in flight records when sequencing APs.
- */
-
-/* Calls cpu_initialize(info->index) which calls the coreboot CPU drivers. */
-void mp_initialize_cpu(void);
-
-/* Returns apic id for coreboot cpu number or < 0 on failure. */
-int mp_get_apic_id(int cpu_slot);
-
-/*
* SMM helpers to use with initializing CPUs.
*/
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14625
-gerrit
commit b84b37b15de0256faa039568bf57a32e57002b67
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 5 10:34:22 2016 -0500
cpu/x86: don't treat all chipsets the same regarding XIP_ROM_SIZE
Previously, the XIP_ROM_SIZE Kconfig variable is used globally on
x86 platforms with the assumption that all chipsets utilize this
value. For the chipsets which do not use the variable it can lead
to unnecessary alignment constraints in cbfs for romstage. Therefore,
allow those chipsets a path to not be burdened by not passing
'-P $(XIP_ROM_SIZE)' to cbfstool when adding romstage.
Change-Id: Id8692df5ecec116a72b8e5886d86648ca959c78b
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
Makefile.inc | 7 ++++++-
src/cpu/x86/Kconfig | 11 +++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/Makefile.inc b/Makefile.inc
index 94273df..9890e14 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -798,7 +798,12 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
#
# Make sure that segment for .car.data is ignored while adding romstage.
$(CONFIG_CBFS_PREFIX)/romstage-align := 64
-$(CONFIG_CBFS_PREFIX)/romstage-options := --xip -S .car.data -P $(CONFIG_XIP_ROM_SIZE)
+$(CONFIG_CBFS_PREFIX)/romstage-options := --xip -S .car.data
+# If XIP_ROM_SIZE isn't being used don't overly constrain romstage by passing
+# -P with a default value.
+ifneq ($(CONFIG_NO_FIXED_XIP_ROM_SIZE),y)
+$(CONFIG_CBFS_PREFIX)/romstage-options += -P $(CONFIG_XIP_ROM_SIZE)
+endif
endif
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/ramstage
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig
index e80f02b..74d87e2 100644
--- a/src/cpu/x86/Kconfig
+++ b/src/cpu/x86/Kconfig
@@ -69,8 +69,19 @@ config TSC_SYNC_MFENCE
to execute an mfence instruction in order to synchronize
rdtsc. This is true for all modern Intel CPUs.
+config NO_FIXED_XIP_ROM_SIZE
+ bool
+ default n
+ help
+ The XIP_ROM_SIZE Kconfig variable is used globally on x86
+ with the assumption that all chipsets utilize this value.
+ For the chipsets which do not use the variable it can lead
+ to unnecessary alignment constraints in cbfs for romstage.
+ Therefore, allow those chipsets a path to not be burdened.
+
config XIP_ROM_SIZE
hex
+ depends on !NO_FIXED_XIP_ROM_SIZE
default ROM_SIZE if ROMCC
default 0x10000