Julien Viard de Galbert has uploaded this change for review.

View Change

mb/scaleway/tagada: Add bmcinfo field confMRC to configure FSP MRC code

The BMC now expose an extra field to give more control over the FSP MRC
options.

Change-Id: I2cad2ec24ff61d384e040c23a24782d8934b6f0b
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
---
M src/mainboard/scaleway/tagada/bmcinfo.c
M src/mainboard/scaleway/tagada/bmcinfo.h
M src/mainboard/scaleway/tagada/romstage.c
3 files changed, 21 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/47479/1
diff --git a/src/mainboard/scaleway/tagada/bmcinfo.c b/src/mainboard/scaleway/tagada/bmcinfo.c
index 9f30a7e..b2037fc 100644
--- a/src/mainboard/scaleway/tagada/bmcinfo.c
+++ b/src/mainboard/scaleway/tagada/bmcinfo.c
@@ -21,6 +21,7 @@
u8 bootOption;
u8 hwRev; // Note: Initial implementation ended here
u8 disableNic1;
+ u8 confMRC;
u8 endMarker; // Insert new fields before
} biosBmcInfo_t;

@@ -162,6 +163,15 @@
return 0;
}

+int bmcinfo_conf_mrc(void)
+{
+ if (IS_BMC_INFO_FIELD_VALID(confMRC)) {
+ printk(BIOS_DEBUG, "bmcInfo confMRC=%x\n", BMC_INFO->confMRC);
+ return BMC_INFO->confMRC;
+ }
+ return CONF_MRC_DEFAULT;
+}
+
/* Add override functions below */

/* Override default uart baudrate */
diff --git a/src/mainboard/scaleway/tagada/bmcinfo.h b/src/mainboard/scaleway/tagada/bmcinfo.h
index 016de9b..de014bb 100644
--- a/src/mainboard/scaleway/tagada/bmcinfo.h
+++ b/src/mainboard/scaleway/tagada/bmcinfo.h
@@ -13,6 +13,13 @@
// Reset after boot sequence (don't go to EFI shell)
#define BOOT_OPTION_NO_EFISHELL 0x80

+// Enable FastBoot
+#define CONF_MRC_FAST_BOOT 1
+// Enable MRC RMT reporting
+#define CONF_MRC_RMT_ENABLE 2
+
+#define CONF_MRC_DEFAULT (CONF_MRC_FAST_BOOT | CONF_MRC_RMT_ENABLE)
+
char *bmcinfo_serial(void);
u8 *bmcinfo_uuid(void);
int bmcinfo_slot(void);
@@ -23,5 +30,6 @@
int bmcinfo_relax_security(void);
int bmcinfo_boot_option(void);
int bmcinfo_disable_nic1(void);
+int bmcinfo_conf_mrc(void);

#endif /* MAINBOARD_BMCINFO_H */
diff --git a/src/mainboard/scaleway/tagada/romstage.c b/src/mainboard/scaleway/tagada/romstage.c
index f041b6f..6b3ac47 100644
--- a/src/mainboard/scaleway/tagada/romstage.c
+++ b/src/mainboard/scaleway/tagada/romstage.c
@@ -41,6 +41,7 @@

// Enable Rmt and Fast Boot by default, RMT will be run only on first
// boot or when dimms change
- mupd->FspmConfig.PcdMrcRmtSupport = 1;
- mupd->FspmConfig.PcdFastBoot = 1;
+ int confMRC = bmcinfo_conf_mrc();
+ mupd->FspmConfig.PcdMrcRmtSupport = (confMRC & CONF_MRC_RMT_ENABLE)?1:0;
+ mupd->FspmConfig.PcdFastBoot = (confMRC & CONF_MRC_FAST_BOOT)?1:0;
}

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2cad2ec24ff61d384e040c23a24782d8934b6f0b
Gerrit-Change-Number: 47479
Gerrit-PatchSet: 1
Gerrit-Owner: Julien Viard de Galbert <coreboot-review-ju@vdg.name>
Gerrit-MessageType: newchange