Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/64735 )
Change subject: cbfs: Rename TYPE_FIT to TYPE_FIT_PAYLOAD ......................................................................
cbfs: Rename TYPE_FIT to TYPE_FIT_PAYLOAD
There are too many "FIT" in firmware land. In order to reduce possible confusion of CBFS_TYPE_FIT with the Intel Firmware Interface Table, this patch renames it to CBFS_TYPE_FIT_PAYLOAD (including the cbfstool argument, so calling scripts will now need to replace `-t fit` with `-t fit_payload`).
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I826cefce54ade06c6612c8a7bb53e02092e7b11a Reviewed-on: https://review.coreboot.org/c/coreboot/+/64735 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/arch/arm/boot.c M src/arch/riscv/boot.c M src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h M src/lib/prog_loaders.c M src/security/tpm/tspi/crtm.c M util/cbfstool/cbfs.h M util/cbfstool/cbfstool.c M util/nvramtool/cbfs.h 8 files changed, 16 insertions(+), 16 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c index b18473b..7d9f960 100644 --- a/src/arch/arm/boot.c +++ b/src/arch/arm/boot.c @@ -13,7 +13,7 @@ cache_sync_instructions();
switch (prog_cbfs_type(prog)) { - case CBFS_TYPE_FIT: + case CBFS_TYPE_FIT_PAYLOAD: /* * We only load Linux payloads from the ramstage, so provide a hint to * the linker that the below functions do not need to be included in diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c index 119039d..a59f9d1 100644 --- a/src/arch/riscv/boot.c +++ b/src/arch/riscv/boot.c @@ -27,7 +27,7 @@ struct prog *prog = args->prog; void *fdt = HLS()->fdt;
- if (prog_cbfs_type(prog) == CBFS_TYPE_FIT) + if (prog_cbfs_type(prog) == CBFS_TYPE_FIT_PAYLOAD) fdt = prog_entry_arg(prog);
if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) { diff --git a/src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h b/src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h index dc80ed0..be5c9cd 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h +++ b/src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h @@ -23,7 +23,7 @@ CBFS_TYPE_LEGACY_STAGE = 0x10, CBFS_TYPE_STAGE = 0x11, CBFS_TYPE_SELF = 0x20, - CBFS_TYPE_FIT = 0x21, + CBFS_TYPE_FIT_PAYLOAD = 0x21, CBFS_TYPE_OPTIONROM = 0x30, CBFS_TYPE_BOOTSPLASH = 0x40, CBFS_TYPE_RAW = 0x50, diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 0b68805..0139ca4 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -160,7 +160,7 @@ case CBFS_TYPE_SELF: /* Simple ELF */ selfload_mapped(payload, mapping, BM_MEM_RAM); break; - case CBFS_TYPE_FIT: /* Flattened image tree */ + case CBFS_TYPE_FIT_PAYLOAD: /* Flattened image tree */ if (CONFIG(PAYLOAD_FIT_SUPPORT)) { fit_payload(payload, mapping); break; diff --git a/src/security/tpm/tspi/crtm.c b/src/security/tpm/tspi/crtm.c index 41f6a94..24133d9 100644 --- a/src/security/tpm/tspi/crtm.c +++ b/src/security/tpm/tspi/crtm.c @@ -131,7 +131,7 @@ case CBFS_TYPE_MRC: case CBFS_TYPE_STAGE: case CBFS_TYPE_SELF: - case CBFS_TYPE_FIT: + case CBFS_TYPE_FIT_PAYLOAD: pcr_index = TPM_CRTM_PCR; break; default: diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h index 21a5d6f..e1f705e 100644 --- a/util/cbfstool/cbfs.h +++ b/util/cbfstool/cbfs.h @@ -33,7 +33,7 @@ {CBFS_TYPE_CBFSHEADER, "cbfs header"}, {CBFS_TYPE_STAGE, "stage"}, {CBFS_TYPE_SELF, "simple elf"}, - {CBFS_TYPE_FIT, "fit"}, + {CBFS_TYPE_FIT_PAYLOAD, "fit_payload"}, {CBFS_TYPE_OPTIONROM, "optionrom"}, {CBFS_TYPE_BOOTSPLASH, "bootsplash"}, {CBFS_TYPE_RAW, "raw"}, diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index cebfef6..b2d5cdb 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -1196,7 +1196,7 @@ if (ret != 0) { ret = parse_fit_to_payload(buffer, &output, param.compression); if (ret == 0) - header->type = htobe32(CBFS_TYPE_FIT); + header->type = htobe32(CBFS_TYPE_FIT_PAYLOAD); }
/* If it's not an FIT, see if it's a UEFI FV */ diff --git a/util/nvramtool/cbfs.h b/util/nvramtool/cbfs.h index 35b98cf..0bded53 100644 --- a/util/nvramtool/cbfs.h +++ b/util/nvramtool/cbfs.h @@ -24,15 +24,15 @@ Users are welcome to use any other value for their components */
-#define CBFS_TYPE_STAGE 0x10 -#define CBFS_TYPE_SELF 0x20 -#define CBFS_TYPE_FIT 0x21 -#define CBFS_TYPE_OPTIONROM 0x30 -#define CBFS_TYPE_BOOTSPLASH 0x40 -#define CBFS_TYPE_RAW 0x50 -#define CBFS_TYPE_VSA 0x51 -#define CBFS_TYPE_MBI 0x52 -#define CBFS_TYPE_MICROCODE 0x53 +#define CBFS_TYPE_STAGE 0x10 +#define CBFS_TYPE_SELF 0x20 +#define CBFS_TYPE_FIT_PAYLOAD 0x21 +#define CBFS_TYPE_OPTIONROM 0x30 +#define CBFS_TYPE_BOOTSPLASH 0x40 +#define CBFS_TYPE_RAW 0x50 +#define CBFS_TYPE_VSA 0x51 +#define CBFS_TYPE_MBI 0x52 +#define CBFS_TYPE_MICROCODE 0x53 #define CBFS_COMPONENT_CMOS_DEFAULT 0xaa #define CBFS_COMPONENT_CMOS_LAYOUT 0x01aa