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>
This commit is contained in:
parent
3e88b18bb6
commit
9871b04183
|
@ -943,6 +943,7 @@ static void lock_descriptor(const char *filename, char *image, int size)
|
||||||
fmba->flmstr1 &= 0xff;
|
fmba->flmstr1 &= 0xff;
|
||||||
fmba->flmstr2 &= 0xff;
|
fmba->flmstr2 &= 0xff;
|
||||||
fmba->flmstr3 &= 0xff;
|
fmba->flmstr3 &= 0xff;
|
||||||
|
fmba->flmstr5 &= 0xff;
|
||||||
} else {
|
} else {
|
||||||
wr_shift = FLMSTR_WR_SHIFT_V1;
|
wr_shift = FLMSTR_WR_SHIFT_V1;
|
||||||
rd_shift = FLMSTR_RD_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->flmstr1 = 0xffffff00 | (fmba->flmstr1 & 0xff);
|
||||||
fmba->flmstr2 = 0xffffff00 | (fmba->flmstr2 & 0xff);
|
fmba->flmstr2 = 0xffffff00 | (fmba->flmstr2 & 0xff);
|
||||||
fmba->flmstr3 = 0xffffff00 | (fmba->flmstr3 & 0xff);
|
fmba->flmstr3 = 0xffffff00 | (fmba->flmstr3 & 0xff);
|
||||||
|
fmba->flmstr5 = 0xffffff00 | (fmba->flmstr5 & 0xff);
|
||||||
} else {
|
} else {
|
||||||
fmba->flmstr1 = 0xffff0000;
|
fmba->flmstr1 = 0xffff0000;
|
||||||
fmba->flmstr2 = 0xffff0000;
|
fmba->flmstr2 = 0xffff0000;
|
||||||
|
|
Loading…
Reference in New Issue