mb/amd/chausie: Add EC blob into CBFS

Add chausie EC blob into CBFS at specified location

Change-Id: I48de08a18054efbda655e1563a539ff2ba7a38a6
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61972
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Fred Reitberger 2022-02-15 08:01:53 -05:00 committed by Felix Held
parent ca7c9cc3f2
commit c17330c1dd
3 changed files with 32 additions and 4 deletions

View File

@ -24,7 +24,6 @@ config MAINBOARD_PART_NUMBER
config AMD_FWM_POSITION_INDEX config AMD_FWM_POSITION_INDEX
int int
default 3 if CHROMEOS default 3 if CHROMEOS
default 4
help help
TODO: might need to be adapted for better placement of files in cbfs TODO: might need to be adapted for better placement of files in cbfs
@ -32,14 +31,32 @@ config CHAUSIE_HAVE_MCHP_FW
bool "Have Microchip EC firmware?" bool "Have Microchip EC firmware?"
default n default n
config CHAUSIE_MCHP_SIG_FILE
string
depends on CHAUSIE_HAVE_MCHP_FW
default "3rdparty/blobs/mainboard/amd/chausie/EC_chausie_sig.bin"
help
The EC sig blob is the first 4kBytes of the firmware image.
The first 4 bytes form a pointer (with CRC) to where the EC firmware
is located
config CHAUSIE_MCHP_FW_FILE config CHAUSIE_MCHP_FW_FILE
string string
depends on CHAUSIE_HAVE_MCHP_FW depends on CHAUSIE_HAVE_MCHP_FW
default "3rdparty/blobs/mainboard/amd/chausie/EC_chausie.bin" default "3rdparty/blobs/mainboard/amd/chausie/EC_chausie.bin"
help help
The EC firmware blob is usually the first 128kByte of the stock The EC firmware blob is at the CHAUSIE_MCHP_FW_OFFSET offset of the
firmware image. firmware image.
config CHAUSIE_MCHP_FW_OFFSET
hex
depends on CHAUSIE_HAVE_MCHP_FW
default 0x400000
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
generated with the updated offset.
config VBOOT config VBOOT
select VBOOT_NO_BOARD_SUPPORT select VBOOT_NO_BOARD_SUPPORT
select VBOOT_SEPARATE_VERSTAGE select VBOOT_SEPARATE_VERSTAGE

View File

@ -14,7 +14,18 @@ ramstage-y += gpio.c
ifeq ($(CONFIG_CHAUSIE_HAVE_MCHP_FW),y) ifeq ($(CONFIG_CHAUSIE_HAVE_MCHP_FW),y)
$(call add_intermediate, add_mchp_fw) $(call add_intermediate, add_mchp_fw)
$(CBFSTOOL) $(obj)/coreboot.pre write -r EC -f $(CONFIG_CHAUSIE_MCHP_FW_FILE) --fill-upward $(CBFSTOOL) $(obj)/coreboot.pre write -r EC -f $(CONFIG_CHAUSIE_MCHP_SIG_FILE) --fill-upward
# calculate the absolute position from the config offset
CHAUSIE_EC_POSITION=$(call int-add, \
$(call int-subtract, 0xffffffff \
$(CONFIG_ROM_SIZE)) $(CONFIG_CHAUSIE_MCHP_FW_OFFSET) 1)
cbfs-files-y += apu/ecfw
apu/ecfw-file := $(CONFIG_CHAUSIE_MCHP_FW_FILE)
apu/ecfw-position := $(CHAUSIE_EC_POSITION)
apu/ecfw-type := raw
else else
files_added:: warn_no_mchp files_added:: warn_no_mchp
endif # CONFIG_CHAUSIE_HAVE_MCHP_FW endif # CONFIG_CHAUSIE_HAVE_MCHP_FW

View File

@ -1,6 +1,6 @@
FLASH@0xFF000000 16M { FLASH@0xFF000000 16M {
BIOS { BIOS {
EC 128K EC 4K
RW_MRC_CACHE 64K RW_MRC_CACHE 64K
FMAP 4K FMAP 4K
COREBOOT(CBFS) COREBOOT(CBFS)