Xixi Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75818?usp=email )
Change subject: soc/mediatek: Enable scramble feature support on fast-k flow ......................................................................
soc/mediatek: Enable scramble feature support on fast-k flow
Originally, scramble feature is only enabled on full-k. For fast-k flow, needs to add the header config DRAMC_CONFIG_SCRAMBLE.
BUG=b:285474337 TEST=Check the scramble feature is disabled on serial build
Signed-off-by: Xi Chen xixi.chen@mediatek.corp-partner.google.com Change-Id: I907bccd4e68e040179e1971db6bf7a57b88dec1b --- M src/soc/mediatek/common/Kconfig M src/soc/mediatek/common/memory.c 2 files changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/75818/1
diff --git a/src/soc/mediatek/common/Kconfig b/src/soc/mediatek/common/Kconfig index 8092aa7..348b9a5 100644 --- a/src/soc/mediatek/common/Kconfig +++ b/src/soc/mediatek/common/Kconfig @@ -32,7 +32,7 @@
config MEDIATEK_DRAM_SCRAMBLE bool "Enable DRAM scramble feature" - default n + default y help This option enables DRAM data scramble, which can prevent DRAM data from being hacked. diff --git a/src/soc/mediatek/common/memory.c b/src/soc/mediatek/common/memory.c index b6f7dde..1a627dd 100644 --- a/src/soc/mediatek/common/memory.c +++ b/src/soc/mediatek/common/memory.c @@ -202,6 +202,8 @@
printk(BIOS_INFO, "DRAM-K: DRAM calibration data valid pass\n");
+ if (CONFIG(MEDIATEK_DRAM_SCRAMBLE)) + dparam->header.config |= DRAMC_CONFIG_SCRAMBLE; if (CONFIG(MEDIATEK_DRAM_BLOB_FAST_INIT)) { printk(BIOS_INFO, "DRAM-K: Run fast calibration run in blob mode\n");