summaryrefslogtreecommitdiff
path: root/util/ifdtool/ifdtool.c
diff options
context:
space:
mode:
authorLijian Zhao <lijian.zhao@intel.com>2019-01-26 16:48:38 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-01-29 12:29:35 +0000
commit9871b04183b78d8c64fbb823f4ec5834e2af3629 (patch)
treef8539364952e6faf18e64d3915ec20bd5042d6ed /util/ifdtool/ifdtool.c
parent3e88b18bb6e951625451e43a6dee4595c5714d35 (diff)
downloadcoreboot-9871b04183b78d8c64fbb823f4ec5834e2af3629.tar.xz
util/ifdtools: Consider EC region access
Version 2 IFD will have flmstr5 as EC region access control, consider it during descriptor lock/unlock process. BUG=N/A TEST=Build coreboot with CONFIG_LOCK_MANAGEMENT_ENGINE set, and check flmstr5 value by hexdump the SPI image at offset FMBA+0x90. Signed-off-by: Lijian Zhao <lijian.zhao@intel.com> Change-Id: I970064dcf6114a15f054ab7c44349841deb99dc8 Reviewed-on: https://review.coreboot.org/c/31111 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/ifdtool/ifdtool.c')
-rw-r--r--util/ifdtool/ifdtool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c
index 1181e8c817..85623fd3cb 100644
--- a/util/ifdtool/ifdtool.c
+++ b/util/ifdtool/ifdtool.c
@@ -943,6 +943,7 @@ static void lock_descriptor(const char *filename, char *image, int size)
fmba->flmstr1 &= 0xff;
fmba->flmstr2 &= 0xff;
fmba->flmstr3 &= 0xff;
+ fmba->flmstr5 &= 0xff;
} else {
wr_shift = FLMSTR_WR_SHIFT_V1;
rd_shift = FLMSTR_RD_SHIFT_V1;
@@ -1015,6 +1016,7 @@ static void unlock_descriptor(const char *filename, char *image, int size)
fmba->flmstr1 = 0xffffff00 | (fmba->flmstr1 & 0xff);
fmba->flmstr2 = 0xffffff00 | (fmba->flmstr2 & 0xff);
fmba->flmstr3 = 0xffffff00 | (fmba->flmstr3 & 0xff);
+ fmba->flmstr5 = 0xffffff00 | (fmba->flmstr5 & 0xff);
} else {
fmba->flmstr1 = 0xffff0000;
fmba->flmstr2 = 0xffff0000;