util/amdfwtool: add Sabrina SoC type

Add PLATFORM_SABRINA to the enum of supported platforms and integrate it
into the existing code.

Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibe52b44395619f697686bd900a522562abbe7646
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63185
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Felix Held 2022-03-29 02:34:11 +02:00
parent 830add6e27
commit b18a4c7d0d
1 changed files with 6 additions and 0 deletions

View File

@ -558,6 +558,7 @@ enum platform {
PLATFORM_CEZANNE, PLATFORM_CEZANNE,
PLATFORM_MENDOCINO, PLATFORM_MENDOCINO,
PLATFORM_LUCIENNE, PLATFORM_LUCIENNE,
PLATFORM_SABRINA,
}; };
static uint32_t get_psp_id(enum platform soc_id) static uint32_t get_psp_id(enum platform soc_id)
@ -576,6 +577,7 @@ static uint32_t get_psp_id(enum platform soc_id)
psp_id = 0xBC0C0140; psp_id = 0xBC0C0140;
break; break;
case PLATFORM_MENDOCINO: case PLATFORM_MENDOCINO:
case PLATFORM_SABRINA:
psp_id = 0xBC0D0900; psp_id = 0xBC0D0900;
break; break;
case PLATFORM_STONEYRIDGE: case PLATFORM_STONEYRIDGE:
@ -1406,6 +1408,7 @@ static int set_efs_table(uint8_t soc_id, embedded_firmware *amd_romsig,
case PLATFORM_LUCIENNE: case PLATFORM_LUCIENNE:
case PLATFORM_CEZANNE: case PLATFORM_CEZANNE:
case PLATFORM_MENDOCINO: case PLATFORM_MENDOCINO:
case PLATFORM_SABRINA:
amd_romsig->efs_gen.gen = EFS_SECOND_GEN; amd_romsig->efs_gen.gen = EFS_SECOND_GEN;
amd_romsig->spi_readmode_f17_mod_30_3f = efs_spi_readmode; amd_romsig->spi_readmode_f17_mod_30_3f = efs_spi_readmode;
amd_romsig->spi_fastspeed_f17_mod_30_3f = efs_spi_speed; amd_romsig->spi_fastspeed_f17_mod_30_3f = efs_spi_speed;
@ -1448,6 +1451,8 @@ static int identify_platform(char *soc_name)
return PLATFORM_RENOIR; return PLATFORM_RENOIR;
else if (!strcasecmp(soc_name, "Lucienne")) else if (!strcasecmp(soc_name, "Lucienne"))
return PLATFORM_LUCIENNE; return PLATFORM_LUCIENNE;
else if (!strcasecmp(soc_name, "Sabrina"))
return PLATFORM_SABRINA;
else else
return PLATFORM_UNKNOWN; return PLATFORM_UNKNOWN;
@ -1898,6 +1903,7 @@ int main(int argc, char **argv)
amd_romsig->bios3_entry = BUFF_TO_RUN(ctx, biosdir); amd_romsig->bios3_entry = BUFF_TO_RUN(ctx, biosdir);
break; break;
case PLATFORM_MENDOCINO: case PLATFORM_MENDOCINO:
case PLATFORM_SABRINA:
break; break;
case PLATFORM_STONEYRIDGE: case PLATFORM_STONEYRIDGE:
case PLATFORM_RAVEN: case PLATFORM_RAVEN: