diff options
author | Pratik Prajapati <pratikkumar.v.prajapati@intel.com> | 2015-09-11 13:51:38 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-11-20 18:21:25 +0100 |
commit | b90b94d3efbbe969c019ab8bb8316e2c08ac4968 (patch) | |
tree | 66b36427232d4408f6706d00295837ec57bb3767 /src/soc/intel/common/Makefile.inc | |
parent | fb128734ec45b9ca7d3ed1a59ea05a81fa6ae360 (diff) |
intel: Add MMA feature in coreboot
This patch implements Memory Margin Analysis feature in coreboot.
Few things to note
(1) the feature is enabled by setting CONFIG_MMA=y in the config file
(2) coreboot reads mma_test_metadata.bin from cbfs during romstage and
gets the name of MMA test name and test config name. Then coreboot finds
these files in CBFS.
If found, coreboot passes location and size of these files to FSP via
UPD params. Sets MrcFastBoot to 0 so that MRC happens and then MMA test
would be executed during memory init.
(3) FSP passes MMA results data in HOB and coreboot saves it in cbmem
(4) when system boots to OS after test is executed cbmem tool is used
to grab the MMA results data.
BRANCH=none
BUG=chrome-os-partner:43731
TEST=Build and Boot kunimitsu (FAB3) and executed MMA tests
Not tested on Glados
CQ-DEPEND=CL:299476,CL:299475,CL:299474,CL:299473,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479
Change-Id: I0b4524abcf57db4d2440a06a79b5a0f4b60fa0ea
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4aba9b728c263b9d5da5746ede3807927c9cc2a7
Original-Change-Id: Ie2728154b49eac8695f707127334b12e345398dc
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/299476
Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: http://review.coreboot.org/12481
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/Makefile.inc')
-rw-r--r-- | src/soc/intel/common/Makefile.inc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc index 53d3b71ab3..a7218b71db 100644 --- a/src/soc/intel/common/Makefile.inc +++ b/src/soc/intel/common/Makefile.inc @@ -5,12 +5,14 @@ verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c romstage-y += util.c +romstage-$(CONFIG_MMA) += mma.c ramstage-y += hda_verb.c ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c ramstage-y += util.c +ramstage-$(CONFIG_MMA) += mma.c ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c # Create and add the MRC cache to the cbfs image @@ -26,4 +28,47 @@ mrc.cache-position := $(CONFIG_MRC_SETTINGS_CACHE_BASE) mrc.cache-type := mrc_cache endif +ifeq ($(CONFIG_MMA),y) +MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH)) +MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*)) +MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*)) + +# +# MMA_CBFS_template is the template to be expanded by eval +# where $(1) is file name +# $(2) is file path +# $(3) is file type, efi for test names (all .EFI files under $(MMA_BLOBS_PATH)/tests ) +# , mma for test param (all .BIN files under $(MMA_BLOBS_PATH)/configs/<test name>) +# +# $(MMA_BLOBS_PATH)/tests/<testX>.efi has coresponding test params +# at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin +# + + +define MMA_CBFS_template = + cbfs-files-y += $(1) + $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1) + $(1)-type := $(3) +endef + +# +# following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi +# +$(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi))) + + +# +# following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES +# +# foreach <testX> do following +# foreach <XYZ>.bin in <testX> do following +# call MMA_CBFS_template for each <XYZ>.bin under current <testX> with type = mma +# + +$(foreach mma_test, $(MMA_TEST_CONFIG_NAMES),\ + $(eval $(foreach mma_config,$(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/$(mma_test)/*)),\ + $(eval $(call MMA_CBFS_template,$(mma_config),configs/$(mma_test),mma))))) + +endif + endif |