soc/amd/{CZN,MDN,PCO}: Fix building with only single RW region
apu/amdfw_a was only getting added to CBFS when VBOOT_SLOTS_RW_AB was selected, but needs to be added in the RW_A only case as well (VBOOT_SLOTS_RW_A). Since VBOOT_SLOTS_RW_AB selects VBOOT_SLOTS_RW_A, we can guard amdfw_a and _b separately and both will be added in the RW_AB case. TEST=build google/zork with VBOOT_SLOTS_RW_A or VBOOT_SLOTS_RW_AB selected, ensure amdfw_a and amdfw_b are added to correct CBFS regions as appropriate. Change-Id: Ic8048e869d7449eeb1ac10bfec4a5646b848d6a8 Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68126 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
parent
1e54a1861c
commit
f9fea868ba
|
@ -484,7 +484,7 @@ config CMOS_RECOVERY_BYTE
|
||||||
This is the byte before the default first byte used by VBNV
|
This is the byte before the default first byte used by VBNV
|
||||||
(0x26 + 0x0E - 1)
|
(0x26 + 0x0E - 1)
|
||||||
|
|
||||||
if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
if VBOOT_SLOTS_RW_A && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
config RWA_REGION_ONLY
|
config RWA_REGION_ONLY
|
||||||
string
|
string
|
||||||
|
@ -493,6 +493,10 @@ config RWA_REGION_ONLY
|
||||||
Add a space-delimited list of filenames that should only be in the
|
Add a space-delimited list of filenames that should only be in the
|
||||||
RW-A section.
|
RW-A section.
|
||||||
|
|
||||||
|
endif # VBOOT_SLOTS_RW_A && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
|
if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
config RWB_REGION_ONLY
|
config RWB_REGION_ONLY
|
||||||
string
|
string
|
||||||
default "apu/amdfw_b"
|
default "apu/amdfw_b"
|
||||||
|
|
|
@ -280,13 +280,15 @@ apu/amdfw-file := $(obj)/amdfw.rom
|
||||||
apu/amdfw-position := $(CEZANNE_FWM_POSITION)
|
apu/amdfw-position := $(CEZANNE_FWM_POSITION)
|
||||||
apu/amdfw-type := raw
|
apu/amdfw-type := raw
|
||||||
|
|
||||||
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_A)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
cbfs-files-y += apu/amdfw_a
|
cbfs-files-y += apu/amdfw_a
|
||||||
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
||||||
# Ensure this ends up at the beginning of the FW_MAIN_A fmap region
|
# Ensure this ends up at the beginning of the FW_MAIN_A fmap region
|
||||||
apu/amdfw_a-position := $(AMD_FW_AB_POSITION)
|
apu/amdfw_a-position := $(AMD_FW_AB_POSITION)
|
||||||
apu/amdfw_a-type := raw
|
apu/amdfw_a-type := raw
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
cbfs-files-y += apu/amdfw_b
|
cbfs-files-y += apu/amdfw_b
|
||||||
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
||||||
# Ensure this ends up at the beginning of the FW_MAIN_B fmap region
|
# Ensure this ends up at the beginning of the FW_MAIN_B fmap region
|
||||||
|
|
|
@ -506,7 +506,7 @@ config CMOS_RECOVERY_BYTE
|
||||||
This is the byte before the default first byte used by VBNV
|
This is the byte before the default first byte used by VBNV
|
||||||
(0x26 + 0x0E - 1)
|
(0x26 + 0x0E - 1)
|
||||||
|
|
||||||
if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
if VBOOT_SLOTS_RW_A && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
config RWA_REGION_ONLY
|
config RWA_REGION_ONLY
|
||||||
string
|
string
|
||||||
|
@ -515,6 +515,10 @@ config RWA_REGION_ONLY
|
||||||
Add a space-delimited list of filenames that should only be in the
|
Add a space-delimited list of filenames that should only be in the
|
||||||
RW-A section.
|
RW-A section.
|
||||||
|
|
||||||
|
endif # VBOOT_SLOTS_RW_A && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
|
if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
config RWB_REGION_ONLY
|
config RWB_REGION_ONLY
|
||||||
string
|
string
|
||||||
default "apu/amdfw_b"
|
default "apu/amdfw_b"
|
||||||
|
|
|
@ -302,18 +302,21 @@ apu/amdfw-file := $(obj)/amdfw.rom
|
||||||
apu/amdfw-position := $(MENDOCINO_FWM_POSITION)
|
apu/amdfw-position := $(MENDOCINO_FWM_POSITION)
|
||||||
apu/amdfw-type := raw
|
apu/amdfw-type := raw
|
||||||
|
|
||||||
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_A)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
cbfs-files-y += apu/amdfw_a
|
cbfs-files-y += apu/amdfw_a
|
||||||
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
||||||
apu/amdfw_a-position := $(AMD_FW_AB_POSITION)
|
apu/amdfw_a-position := $(AMD_FW_AB_POSITION)
|
||||||
apu/amdfw_a-type := raw
|
apu/amdfw_a-type := raw
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
cbfs-files-y += apu/amdfw_b
|
cbfs-files-y += apu/amdfw_b
|
||||||
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
||||||
apu/amdfw_b-position := $(AMD_FW_AB_POSITION)
|
apu/amdfw_b-position := $(AMD_FW_AB_POSITION)
|
||||||
apu/amdfw_b-type := raw
|
apu/amdfw_b-type := raw
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SEPARATE_SIGNED_PSPFW),y)
|
ifeq ($(CONFIG_SEPARATE_SIGNED_PSPFW)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
build_complete:: $(obj)/amdfw_a.rom $(obj)/amdfw_b.rom
|
build_complete:: $(obj)/amdfw_a.rom $(obj)/amdfw_b.rom
|
||||||
@printf " Adding Signed ROM and HASH\n"
|
@printf " Adding Signed ROM and HASH\n"
|
||||||
$(CBFSTOOL) $(obj)/coreboot.rom write -u -r SIGNED_AMDFW_A -i 0 -f $(obj)/amdfw_a.rom.signed
|
$(CBFSTOOL) $(obj)/coreboot.rom write -u -r SIGNED_AMDFW_A -i 0 -f $(obj)/amdfw_a.rom.signed
|
||||||
|
@ -322,7 +325,6 @@ build_complete:: $(obj)/amdfw_a.rom $(obj)/amdfw_b.rom
|
||||||
-n apu/amdfw_a_hash -t raw
|
-n apu/amdfw_a_hash -t raw
|
||||||
$(CBFSTOOL) $(obj)/coreboot.rom add -r FW_MAIN_B -f $(obj)/amdfw_b.rom.signed.hash \
|
$(CBFSTOOL) $(obj)/coreboot.rom add -r FW_MAIN_B -f $(obj)/amdfw_b.rom.signed.hash \
|
||||||
-n apu/amdfw_b_hash -t raw
|
-n apu/amdfw_b_hash -t raw
|
||||||
endif # CONFIG_SEPARATE_SIGNED_PSPFW
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif # ($(CONFIG_SOC_AMD_MENDOCINO),y)
|
endif # ($(CONFIG_SOC_AMD_MENDOCINO),y)
|
||||||
|
|
|
@ -500,7 +500,7 @@ config CMOS_RECOVERY_BYTE
|
||||||
This is the byte before the default first byte used by VBNV
|
This is the byte before the default first byte used by VBNV
|
||||||
(0x26 + 0x0E - 1)
|
(0x26 + 0x0E - 1)
|
||||||
|
|
||||||
if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
if VBOOT_SLOTS_RW_A && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
config RWA_REGION_ONLY
|
config RWA_REGION_ONLY
|
||||||
string
|
string
|
||||||
|
@ -509,6 +509,10 @@ config RWA_REGION_ONLY
|
||||||
Add a space-delimited list of filenames that should only be in the
|
Add a space-delimited list of filenames that should only be in the
|
||||||
RW-A section.
|
RW-A section.
|
||||||
|
|
||||||
|
endif # VBOOT_SLOTS_RW_A && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
|
if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
|
||||||
|
|
||||||
config RWB_REGION_ONLY
|
config RWB_REGION_ONLY
|
||||||
string
|
string
|
||||||
default "apu/amdfw_b"
|
default "apu/amdfw_b"
|
||||||
|
|
|
@ -292,12 +292,14 @@ apu/amdfw-file := $(obj)/amdfw.rom
|
||||||
apu/amdfw-position := $(PICASSO_FWM_POSITION)
|
apu/amdfw-position := $(PICASSO_FWM_POSITION)
|
||||||
apu/amdfw-type := raw
|
apu/amdfw-type := raw
|
||||||
|
|
||||||
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_A)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
cbfs-files-y += apu/amdfw_a
|
cbfs-files-y += apu/amdfw_a
|
||||||
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
||||||
apu/amdfw_a-position := $(AMD_FW_AB_POSITION)
|
apu/amdfw_a-position := $(AMD_FW_AB_POSITION)
|
||||||
apu/amdfw_a-type := raw
|
apu/amdfw_a-type := raw
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
||||||
cbfs-files-y += apu/amdfw_b
|
cbfs-files-y += apu/amdfw_b
|
||||||
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
||||||
apu/amdfw_b-position := $(AMD_FW_AB_POSITION)
|
apu/amdfw_b-position := $(AMD_FW_AB_POSITION)
|
||||||
|
|
Loading…
Reference in New Issue