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.

TEST=Build and Boot kunimitsu (FAB3) and executed MMA tests
Not tested on Glados


Change-Id: I0b4524abcf57db4d2440a06a79b5a0f4b60fa0ea
Signed-off-by: Patrick Georgi <>
Original-Commit-Id: 4aba9b728c263b9d5da5746ede3807927c9cc2a7
Original-Change-Id: Ie2728154b49eac8695f707127334b12e345398dc
Original-Signed-off-by: Pratik Prajapati <>
Original-Commit-Ready: Pratikkumar V Prajapati <>
Original-Tested-by: Pratikkumar V Prajapati <>
Original-Reviewed-by: Aaron Durbin <>
Original-Reviewed-by: Pratikkumar V Prajapati <>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <>
7 files changed