diff options
author | Zheng Bao <fishbaozi@gmail.com> | 2021-06-11 15:54:40 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-04-25 14:46:12 +0000 |
commit | 96a3371a721d0fe0925df2f264afbbf4bce32976 (patch) | |
tree | e89ec6b8b5e14d1fcff3ceecd7c68d9b8480c645 /util/amdfwtool | |
parent | 22ef1439dd6d3844c548367964238c963593f95a (diff) |
amdfwtool: Change the name of macros for 'BHD'
Use BHD instead of BDT as the name of cookie macro. Use L2 to make it
clear it is for level 2. The 'BHD2' is misleading, which is going to
be used for combo entry. The definition in psp_verstage is also changed.
Change-Id: Ia10ac5e873dab6db7d66e63773a7c63f504950b2
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55411
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/amdfwtool')
-rw-r--r-- | util/amdfwtool/amdfwtool.c | 16 | ||||
-rw-r--r-- | util/amdfwtool/amdfwtool.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index af89cadb20..f09a5a8438 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -492,8 +492,8 @@ static void fill_dir_header(void *directory, uint32_t count, uint32_t cookie, co + sizeof(dir->header.num_entries) + sizeof(dir->header.additional_info)); break; - case BDT1_COOKIE: - case BDT2_COOKIE: + case BHD_COOKIE: + case BHDL2_COOKIE: table_size = ctx->current - ctx->current_table; if ((table_size % TABLE_ALIGNMENT) != 0) { fprintf(stderr, "The BIOS table size should be 4K aligned\n"); @@ -1005,7 +1005,7 @@ static void integrate_bios_firmwares(context *ctx, */ if (!cb_config->multi_level) level = BDT_BOTH; - else if (cookie == BDT2_COOKIE) + else if (cookie == BHDL2_COOKIE) level = BDT_LVL2; else if (biosdir2) level = BDT_LVL1; @@ -1926,12 +1926,12 @@ int main(int argc, char **argv) biosdir2 = new_bios_dir(&ctx, cb_config.multi_level); integrate_bios_firmwares(&ctx, biosdir2, NULL, - amd_bios_table, BDT2_COOKIE, &cb_config); + amd_bios_table, BHDL2_COOKIE, &cb_config); if (cb_config.recovery_ab) { if (pspdir2_b != NULL) { biosdir2_b = new_bios_dir(&ctx, cb_config.multi_level); integrate_bios_firmwares(&ctx, biosdir2_b, NULL, - amd_bios_table, BDT2_COOKIE, &cb_config); + amd_bios_table, BHDL2_COOKIE, &cb_config); } add_psp_firmware_entry(&ctx, pspdir2, biosdir2, AMD_FW_BIOS_TABLE, TABLE_ALIGNMENT); @@ -1941,13 +1941,13 @@ int main(int argc, char **argv) } else { biosdir = new_bios_dir(&ctx, cb_config.multi_level); integrate_bios_firmwares(&ctx, biosdir, biosdir2, - amd_bios_table, BDT1_COOKIE, &cb_config); + amd_bios_table, BHD_COOKIE, &cb_config); } } else { - /* flat: BDT1 cookie and no pointer to 2nd table */ + /* flat: BHD1 cookie and no pointer to 2nd table */ biosdir = new_bios_dir(&ctx, cb_config.multi_level); integrate_bios_firmwares(&ctx, biosdir, NULL, - amd_bios_table, BDT1_COOKIE, &cb_config); + amd_bios_table, BHD_COOKIE, &cb_config); } switch (soc_id) { case PLATFORM_RENOIR: diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 22386386c9..dbce39282c 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -252,8 +252,8 @@ typedef struct _ish_directory_table { #define PSP_COOKIE 0x50535024 /* 'PSP$' */ #define PSPL2_COOKIE 0x324c5024 /* '2LP$' */ #define PSP2_COOKIE 0x50535032 /* 'PSP2' */ -#define BDT1_COOKIE 0x44484224 /* 'DHB$ */ -#define BDT2_COOKIE 0x324c4224 /* '2LB$ */ +#define BHD_COOKIE 0x44484224 /* 'DHB$ */ +#define BHDL2_COOKIE 0x324c4224 /* '2LB$ */ #define PSP_LVL1 (1 << 0) #define PSP_LVL2 (1 << 1) |