Julien Viard de Galbert has uploaded this change for review.

View Change

FSP 2.0: Add fsp_relax_security

Change-Id: I972e7387c2612ee0053df21afb55b0b264961174
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
---
M src/drivers/intel/fsp2_0/include/fsp/api.h
M src/drivers/intel/fsp2_0/notify.c
2 files changed, 15 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/25437/1
diff --git a/src/drivers/intel/fsp2_0/include/fsp/api.h b/src/drivers/intel/fsp2_0/include/fsp/api.h
index 123db30..66e4291 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/api.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/api.h
@@ -62,6 +62,10 @@
uint8_t fsp_memory_mainboard_version(void);
uint8_t fsp_memory_soc_version(void);

+/* The following function is used to allow not calling FSP notify in
+ READY_TO_BOOT and END_OF_FIRMWARE phases. */
+bool fsp_relax_security(void);
+
/* Callback after processing FSP notify */
void platform_fsp_notify_status(enum fsp_notify_phase phase);

diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c
index 34a4262..3d18e83 100644
--- a/src/drivers/intel/fsp2_0/notify.c
+++ b/src/drivers/intel/fsp2_0/notify.c
@@ -67,10 +67,21 @@
platform_fsp_notify_status(phase);
}

+__attribute__((weak)) bool fsp_relax_security(void)
+{
+ return false;
+}
+
static void fsp_notify_dummy(void *arg)
{
enum fsp_notify_phase phase = (uint32_t)arg;

+ if ((phase == READY_TO_BOOT) && fsp_relax_security()) {
+ printk(BIOS_CRIT, "Relax Security Mode,"
+ " do not use in production!\n");
+ return;
+ }
+
/* Display the MTRRs */
if (IS_ENABLED(CONFIG_DISPLAY_MTRRS))
soc_display_mtrrs();

To view, visit change 25437. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I972e7387c2612ee0053df21afb55b0b264961174
Gerrit-Change-Number: 25437
Gerrit-PatchSet: 1
Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert@online.net>