util/amdfwtool: Move needs_ish and combo_new_rab to data_parse.c
Move these functions for better readability. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: Ib609d967e23b4ca1937e00ec72a669751ef09714 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87019 Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Ana Carolina Cabral <ana.cpmelo95@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
8449a15aed
commit
973d0faf65
3 changed files with 9 additions and 10 deletions
|
|
@ -1687,11 +1687,6 @@ static bool is_initial_alignment_required(enum platform soc_id)
|
|||
}
|
||||
}
|
||||
|
||||
static bool needs_new_combo_layout(enum platform soc_id)
|
||||
{
|
||||
return needs_ish(soc_id);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int retval = 0;
|
||||
|
|
@ -1719,9 +1714,6 @@ int main(int argc, char **argv)
|
|||
|
||||
open_process_config(cb_config.config, &cb_config);
|
||||
|
||||
if (cb_config.use_combo && needs_new_combo_layout(cb_config.soc_id))
|
||||
cb_config.combo_new_rab = true;
|
||||
|
||||
ctx.rom = malloc(ctx.rom_size);
|
||||
if (!ctx.rom) {
|
||||
fprintf(stderr, "Error: Failed to allocate memory\n");
|
||||
|
|
|
|||
|
|
@ -500,7 +500,6 @@ void process_signed_psp_firmwares(const char *signed_rom,
|
|||
uint64_t signed_start_addr,
|
||||
enum platform soc_id);
|
||||
int find_bios_entry(amd_bios_type type);
|
||||
bool needs_ish(enum platform platform_type);
|
||||
|
||||
#define EFS_FILE_SUFFIX ".efs"
|
||||
#define TMP_FILE_SUFFIX ".tmp"
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ static uint8_t process_one_line(char *oneline, regmatch_t *match, char *dir,
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool needs_ish(enum platform platform_type)
|
||||
static bool needs_ish(enum platform platform_type)
|
||||
{
|
||||
if (platform_type == PLATFORM_MENDOCINO || platform_type == PLATFORM_PHOENIX ||
|
||||
platform_type == PLATFORM_GLINDA || platform_type == PLATFORM_FAEGAN)
|
||||
|
|
@ -801,6 +801,11 @@ bool needs_ish(enum platform platform_type)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool needs_new_combo_layout(enum platform soc_id)
|
||||
{
|
||||
return needs_ish(soc_id);
|
||||
}
|
||||
|
||||
static bool is_second_gen(enum platform platform_type)
|
||||
{
|
||||
switch (platform_type) {
|
||||
|
|
@ -877,6 +882,9 @@ uint8_t process_config(FILE *config, amd_cb_config *cb_config)
|
|||
if (cb_config->need_ish)
|
||||
cb_config->recovery_ab = true;
|
||||
|
||||
if (cb_config->use_combo && needs_new_combo_layout(cb_config->soc_id))
|
||||
cb_config->combo_new_rab = true;
|
||||
|
||||
if (cb_config->recovery_ab)
|
||||
cb_config->multi_level = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue