amdfwtool: use SoC ID info instead of misleading comboable flag

Since it actually depends on the SoC type whether the old PSP
directory table pointer or the new comboable PSP directory table
pointer is used in EFS, get this information from the SoC ID instead
of passing the comboable flag for the SoCs that need to use the new
comboable PSP directory table pointer.

TEST=Binary identical on amd/majolica, pcengines/apu2, amd/gardenia

Change-Id: I0c3f21065939d1b13c2607aba16cbef74dd8d389
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73020
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Zheng Bao 2023-02-11 22:13:36 +08:00 committed by Felix Held
parent af69de494e
commit 4bfb36ed68
7 changed files with 17 additions and 23 deletions

View File

@ -200,7 +200,6 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_PSP_LOAD_MP2_FW) \
--use-pspsecureos \
--load-s0i3 \
--combo-capable \
$(OPT_TOKEN_UNLOCK) \
$(OPT_WHITELIST_FILE) \
$(OPT_SPL_TABLE_FILE) \

View File

@ -218,7 +218,6 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_PSP_LOAD_MP2_FW) \
--use-pspsecureos \
--load-s0i3 \
--combo-capable \
$(OPT_TOKEN_UNLOCK) \
$(OPT_WHITELIST_FILE) \
$(OPT_PSP_SHAREDMEM_BASE) \

View File

@ -221,7 +221,6 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_PSP_LOAD_MP2_FW) \
--use-pspsecureos \
--load-s0i3 \
--combo-capable \
$(OPT_TOKEN_UNLOCK) \
$(OPT_WHITELIST_FILE) \
$(OPT_PSP_SHAREDMEM_BASE) \

View File

@ -220,7 +220,6 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_PSP_LOAD_MP2_FW) \
--use-pspsecureos \
--load-s0i3 \
--combo-capable \
$(OPT_TOKEN_UNLOCK) \
$(OPT_WHITELIST_FILE) \
$(OPT_PSP_SHAREDMEM_BASE) \

View File

@ -221,7 +221,6 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_WHITELIST_FILE) \
$(OPT_PSP_SHAREDMEM_BASE) \
$(OPT_PSP_SHAREDMEM_SIZE) \
--combo-capable \
$(OPT_TOKEN_UNLOCK) \
$(OPT_EFS_SPI_READ_MODE) \
$(OPT_EFS_SPI_SPEED) \

View File

@ -122,14 +122,6 @@ SMUFWM_FN_FILE=
SMUFIRMWARE2_FN_FILE=
endif
ifeq ($(FIRMWARE_TYPE),ST)
OPT_COMBOCAPABLE=--combo-capable
endif
ifeq ($(FIRMWARE_TYPE),CZ)
OPT_COMBOCAPABLE=--combo-capable
endif
ifeq ($(CONFIG_USE_PSPSECUREOS),y)
PSP_USE_PSPSECUREOS="--use-pspsecureos"
endif
@ -148,7 +140,6 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(CONFIG_STONEYRIDGE_XHCI_FWM_FILE)) \
$(AMDFWTOOL) \
$(OPT_STONEYRIDGE_XHCI_FWM_FILE) \
$(OPT_STONEYRIDGE_GEC_FWM_FILE) \
$(OPT_COMBOCAPABLE)\
$(OPT_PSP_USE_PSPSECUREOS) \
$(OPT_EFS_SPI_READ_MODE) \
$(OPT_EFS_SPI_SPEED) \

View File

@ -1726,7 +1726,6 @@ enum {
AMDFW_OPT_XHCI = 128,
AMDFW_OPT_IMC,
AMDFW_OPT_GEC,
AMDFW_OPT_COMBO,
AMDFW_OPT_RECOVERY_AB,
AMDFW_OPT_RECOVERY_AB_SINGLE_COPY,
AMDFW_OPT_USE_COMBO,
@ -1781,7 +1780,6 @@ static struct option long_options[] = {
{"imc", required_argument, 0, AMDFW_OPT_IMC },
{"gec", required_argument, 0, AMDFW_OPT_GEC },
/* PSP Directory Table items */
{"combo-capable", no_argument, 0, AMDFW_OPT_COMBO },
{"recovery-ab", no_argument, 0, AMDFW_OPT_RECOVERY_AB },
{"recovery-ab-single-copy", no_argument, 0, AMDFW_OPT_RECOVERY_AB_SINGLE_COPY },
{"use-combo", no_argument, 0, AMDFW_OPT_USE_COMBO },
@ -2063,7 +2061,6 @@ int main(int argc, char **argv)
psp_directory_table *pspdir = NULL;
psp_directory_table *pspdir2 = NULL;
psp_directory_table *pspdir2_b = NULL;
bool comboable = false;
int fuse_defined = 0;
int targetfd;
char *output = NULL, *config = NULL;
@ -2107,9 +2104,6 @@ int main(int argc, char **argv)
register_fw_filename(AMD_FW_GEC, sub, optarg);
sub = instance = 0;
break;
case AMDFW_OPT_COMBO:
comboable = true;
break;
case AMDFW_OPT_RECOVERY_AB:
cb_config.recovery_ab = true;
break;
@ -2532,10 +2526,24 @@ int main(int argc, char **argv)
amd_psp_fw_table, PSP_COOKIE, &cb_config);
}
if (comboable)
amd_romsig->new_psp_directory = BUFF_TO_RUN(ctx, pspdir);
else
switch (cb_config.soc_id) {
case PLATFORM_UNKNOWN:
amd_romsig->psp_directory = BUFF_TO_RUN(ctx, pspdir);
break;
case PLATFORM_CEZANNE:
case PLATFORM_MENDOCINO:
case PLATFORM_PHOENIX:
case PLATFORM_GLINDA:
case PLATFORM_CARRIZO:
case PLATFORM_STONEYRIDGE:
case PLATFORM_RAVEN:
case PLATFORM_PICASSO:
case PLATFORM_LUCIENNE:
case PLATFORM_RENOIR:
default:
amd_romsig->new_psp_directory = BUFF_TO_RUN(ctx, pspdir);
break;
}
if (cb_config.use_combo) {
psp_combo_directory *combo_dir = new_combo_dir(&ctx);