From 9871b04183b78d8c64fbb823f4ec5834e2af3629 Mon Sep 17 00:00:00 2001 From: Lijian Zhao Date: Sat, 26 Jan 2019 16:48:38 -0800 Subject: 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 Change-Id: I970064dcf6114a15f054ab7c44349841deb99dc8 Reviewed-on: https://review.coreboot.org/c/31111 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel --- util/ifdtool/ifdtool.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/ifdtool') 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; -- cgit v1.2.3