Mario Scheithauer has uploaded this change for review.

View Change

sb/intel/common/firmware: Add an option to use IFDTOOL

This patch makes the use of the IFDTOOL to modify the flash descriptor
region selectable via a Kconfig option. This option is selected by
default so that nothing changes for all mainboards that have activate
'Lock ME/TXE section'. If you don't want to use IFDTOOL for modification
of flash descriptor, disable it. In this case, the preset values are
retained.

Change-Id: I46ec6339008edcc78fe76682eed5714f85354937
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
---
M src/southbridge/intel/common/firmware/Kconfig
M src/southbridge/intel/common/firmware/Makefile.inc
2 files changed, 21 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/31639/1
diff --git a/src/southbridge/intel/common/firmware/Kconfig b/src/southbridge/intel/common/firmware/Kconfig
index 31a3df3..7a1bd82 100644
--- a/src/southbridge/intel/common/firmware/Kconfig
+++ b/src/southbridge/intel/common/firmware/Kconfig
@@ -141,6 +141,18 @@
depends on HAVE_EC_BIN
default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/ec.bin"

+config MOD_INTEL_FLASH_DESCRIPTOR
+ bool "Use IFDTOOL to modifiy descriptor region"
+ default y
+ help
+ Read and write access permissions to different regions in the flash
+ can be controlled via dedicated bitfields in the flash descriptor.
+ These permissions can be modified with the Intel Flash Descriptor
+ Tool (IFDTOOL). If you don't want to change these permissions and
+ keep the ones provided in the initial descriptor, disable this switch.
+
+if MOD_INTEL_FLASH_DESCRIPTOR
+
config LOCK_MANAGEMENT_ENGINE
bool "Lock ME/TXE section"
default n
@@ -154,6 +166,8 @@

If unsure, say N.

+endif #MOD_INTEL_FLASH_DESCRIPTOR
+
config CBFS_SIZE
hex
default 0x100000
diff --git a/src/southbridge/intel/common/firmware/Makefile.inc b/src/southbridge/intel/common/firmware/Makefile.inc
index 774bb23..331382e 100644
--- a/src/southbridge/intel/common/firmware/Makefile.inc
+++ b/src/southbridge/intel/common/firmware/Makefile.inc
@@ -68,6 +68,8 @@
$(obj)/coreboot.pre
mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
endif
+
+ifeq ($(CONFIG_MOD_INTEL_FLASH_DESCRIPTOR),y)
ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y)
printf " IFDTOOL Locking Management Engine\n"
$(objutil)/ifdtool/ifdtool \
@@ -79,6 +81,11 @@
$(IFDTOOL_USE_CHIPSET) -u $(obj)/coreboot.pre
mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
endif
+else
+ printf " Don't touch Intel Flash Descriptor\n"
+ cp $(obj)/coreboot.pre $(obj)/coreboot.pre.new
+ mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
+endif

ifeq ($(CONFIG_EM100),y)
printf " IFDTOOL Setting EM100 mode\n"

To view, visit change 31639. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I46ec6339008edcc78fe76682eed5714f85354937
Gerrit-Change-Number: 31639
Gerrit-PatchSet: 1
Gerrit-Owner: Mario Scheithauer <mario.scheithauer@siemens.com>
Gerrit-MessageType: newchange