[coreboot-gerrit] Change in coreboot[master]: util/ifdtool: Fix region access control for SKL/KBL
Furquan Shaikh (Code Review)
gerrit at coreboot.org
Wed Mar 21 18:50:03 CET 2018
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/25306
Change subject: util/ifdtool: Fix region access control for SKL/KBL
......................................................................
util/ifdtool: Fix region access control for SKL/KBL
The default values used by ifdtool for setting region access control
do not match the expected values for SKL/KBL as per the SPI
programming guide. This change adds platform "sklkbl" that sets region
access control bits differently for SKL/KBL images.
BUG=b:76098647
BRANCH=poppy
TEST=Verified that the access control bits on KBL images is set
correctly.
Change-Id: I1328d8006c25be282b3223268d8f1fd0a64e2ed3
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
M util/ifdtool/ifdtool.c
M util/ifdtool/ifdtool.h
2 files changed, 18 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/25306/1
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c
index 8397f5c..290c777 100644
--- a/util/ifdtool/ifdtool.c
+++ b/util/ifdtool/ifdtool.c
@@ -826,6 +826,20 @@
/* TXE can only write Device Expansion */
fmba->flmstr2 |= 0x20 << wr_shift;
break;
+ case PLATFORM_SKLKBL:
+ /* CPU/BIOS can read descriptor, BIOS and GbE. */
+ fmba->flmstr1 |= 0xb << rd_shift;
+ /* CPU/BIOS can write BIOS and Gbe. */
+ fmba->flmstr1 |= 0xa << wr_shift;
+ /* ME can read descriptor, ME and GbE. */
+ fmba->flmstr2 |= 0xd << rd_shift;
+ /* ME can write ME. */
+ fmba->flmstr2 |= 0x4 << wr_shift;
+ /* GbE can read GbE and descriptor. */
+ fmba->flmstr3 |= 0x9 << rd_shift;
+ /* GbE can write GbE. */
+ fmba->flmstr3 |= 0x8 << wr_shift;
+ break;
default:
/* CPU/BIOS can read descriptor, BIOS, and GbE. */
fmba->flmstr1 |= 0xb << rd_shift;
@@ -1325,6 +1339,8 @@
case 'p':
if (!strcmp(optarg, "aplk")) {
platform = PLATFORM_APOLLOLAKE;
+ } else if (!strcmp(optarg, "sklkbl")) {
+ platform = PLATFORM_SKLKBL;
} else {
fprintf(stderr, "Unknown platform: %s\n", optarg);
exit(EXIT_FAILURE);
diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h
index cd5af79..ad299a9 100644
--- a/util/ifdtool/ifdtool.h
+++ b/util/ifdtool/ifdtool.h
@@ -22,7 +22,8 @@
};
enum platform {
- PLATFORM_APOLLOLAKE
+ PLATFORM_APOLLOLAKE,
+ PLATFORM_SKLKBL,
};
#define LAYOUT_LINELEN 80
--
To view, visit https://review.coreboot.org/25306
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1328d8006c25be282b3223268d8f1fd0a64e2ed3
Gerrit-Change-Number: 25306
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180321/57cad081/attachment.html>
More information about the coreboot-gerrit
mailing list