aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbfs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index ec5156c09c..cb66f81d99 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -99,10 +99,20 @@ static inline bool fsps_env(void)
return false;
}
+static inline bool fspm_env(void)
+{
+ /* FSP-M is assumed to be loaded in romstage. */
+ if (ENV_ROMSTAGE)
+ return true;
+ return false;
+}
+
static inline bool cbfs_lz4_enabled(void)
{
if (fsps_env() && CONFIG(FSP_COMPRESS_FSP_S_LZ4))
return true;
+ if (fspm_env() && CONFIG(FSP_COMPRESS_FSP_M_LZ4))
+ return true;
if ((ENV_BOOTBLOCK || ENV_SEPARATE_VERSTAGE) && !CONFIG(COMPRESS_PRERAM_STAGES))
return false;
@@ -114,6 +124,8 @@ static inline bool cbfs_lzma_enabled(void)
{
if (fsps_env() && CONFIG(FSP_COMPRESS_FSP_S_LZMA))
return true;
+ if (fspm_env() && CONFIG(FSP_COMPRESS_FSP_M_LZMA))
+ return true;
/* We assume here romstage and postcar are never compressed. */
if (ENV_BOOTBLOCK || ENV_SEPARATE_VERSTAGE)
return false;