Attention is currently required from: Jason Glenesk, Zheng Bao, Fred Reitberger, Felix Held.

Bao Zheng would like Zheng Bao to review this change.

View Change

mb/amd/birman: Add EC fw to flash

Change-Id: I2e20f399c4bfe32ec43242619628f7775b4e659e
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
---
M src/mainboard/amd/birman/Kconfig
M src/mainboard/amd/birman/Makefile.inc
M src/mainboard/amd/birman/board.fmd
M src/mainboard/amd/birman/chromeos.fmd
4 files changed, 23 insertions(+), 8 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/70314/1
diff --git a/src/mainboard/amd/birman/Kconfig b/src/mainboard/amd/birman/Kconfig
index 412300d..8544f0a 100644
--- a/src/mainboard/amd/birman/Kconfig
+++ b/src/mainboard/amd/birman/Kconfig
@@ -60,7 +60,7 @@
config BIRMAN_MCHP_FW_OFFSET
hex
depends on BIRMAN_HAVE_MCHP_FW
- default 0xB80000
+ default 0x81000
help
The EC firmware blob defaults to the 4MByte offset of the firmware
image. If this offset needs to change, a new signature block must be
diff --git a/src/mainboard/amd/birman/Makefile.inc b/src/mainboard/amd/birman/Makefile.inc
index b0466e7..1bb6c0c 100644
--- a/src/mainboard/amd/birman/Makefile.inc
+++ b/src/mainboard/amd/birman/Makefile.inc
@@ -18,13 +18,16 @@

ifeq ($(CONFIG_BIRMAN_HAVE_MCHP_FW),y)
$(call add_intermediate, add_mchp_fw)
- $(CBFSTOOL) $(obj)/coreboot.pre write -r EC -f $(CONFIG_BIRMAN_MCHP_SIG_FILE) --fill-upward
+ $(CBFSTOOL) $(obj)/coreboot.pre write -r ECSIG -f $(CONFIG_BIRMAN_MCHP_SIG_FILE) --fill-upward

# calculate the absolute position from the config offset
-BIRMAN_EC_POSITION=$(call int-add, \
- $(call int-subtract, 0xffffffff \
- $(CONFIG_ROM_SIZE)) $(CONFIG_BIRMAN_MCHP_FW_OFFSET) 1)
+BIRMAN_EC_POSITION=$(call int-subtract, \
+ $(call _toint, $(CONFIG_BIRMAN_MCHP_FW_OFFSET)) \
+ $(call int-subtract, \
+ $(shell awk '$$2 == "FMAP_SECTION_EC_START" {print $$3}' $(obj)/fmap_config.h) \
+ $(shell awk '$$2 == "FMAP_SECTION_FLASH_START" {print $$3}' $(obj)/fmap_config.h)))

+regions-for-file-apu/ecfw=EC
cbfs-files-y += apu/ecfw
apu/ecfw-file := $(CONFIG_BIRMAN_MCHP_FW_FILE)
apu/ecfw-position := $(BIRMAN_EC_POSITION)
diff --git a/src/mainboard/amd/birman/board.fmd b/src/mainboard/amd/birman/board.fmd
index 21a86c0..2d222b2 100644
--- a/src/mainboard/amd/birman/board.fmd
+++ b/src/mainboard/amd/birman/board.fmd
@@ -1,7 +1,8 @@
FLASH@0xFE000000 32M {
BIOS {
- EC 4K
+ ECSIG 4K
AMDFW(CBFS) @131008
+ EC(CBFS) @512K 300K
FMAP @16M 3K
RW_MRC_CACHE 120K
COREBOOT(CBFS) @17M
diff --git a/src/mainboard/amd/birman/chromeos.fmd b/src/mainboard/amd/birman/chromeos.fmd
index c28070a..235a223 100644
--- a/src/mainboard/amd/birman/chromeos.fmd
+++ b/src/mainboard/amd/birman/chromeos.fmd
@@ -1,6 +1,7 @@
-FLASH@0xFF000000 16M {
+FLASH@0xFE000000 32M {
SI_BIOS {
EC 4K
+ AMDFW @131008
RW_MRC_CACHE(PRESERVE) 120K
RW_SECTION_A 4M {
VBLOCK_A 8K
@@ -21,7 +22,7 @@
RW_NVRAM(PRESERVE) 20K
SMMSTORE(PRESERVE) 64K
RW_LEGACY(CBFS)
- WP_RO@10M 6M {
+ WP_RO@16M 16M {
RO_VPD(PRESERVE) 16K
RO_SECTION {
FMAP 2K

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2e20f399c4bfe32ec43242619628f7775b4e659e
Gerrit-Change-Number: 70314
Gerrit-PatchSet: 1
Gerrit-Owner: Bao Zheng <fishbaozi@gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred@gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk@gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Attention: Jason Glenesk <jason.glenesk@gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Fred Reitberger <reitbergerfred@gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot@felixheld.de>
Gerrit-MessageType: newchange