diff options
Diffstat (limited to 'util/cbfstool')
-rw-r--r-- | util/cbfstool/fit.c | 20 | ||||
-rw-r--r-- | util/cbfstool/fit.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c index 8ed24943b8..d4e48f1946 100644 --- a/util/cbfstool/fit.c +++ b/util/cbfstool/fit.c @@ -17,6 +17,7 @@ #define FIT_HEADER_VERSION 0x0100 #define FIT_HEADER_ADDRESS "_FIT_ " #define FIT_MICROCODE_VERSION 0x0100 +#define FIT_PLATFORM_BOOT_POLICY_VERSION 0x0100 #define FIT_TXT_VERSION 0x0100 #define FIT_SIZE_ALIGNMENT 16 @@ -367,6 +368,18 @@ static void update_fit_bios_acm_entry(struct fit_table *fit, fit_entry_add_size(&fit->header, sizeof(struct fit_entry)); } +static void update_fit_pbp_entry(struct fit_table *fit, + struct fit_entry *entry, + const uint64_t pbp_addr) +{ + entry->address = pbp_addr; + entry->size_reserved = 0; + entry->type_checksum_valid = FIT_TYPE_PLATFORM_BOOT_POLICY; + entry->version = FIT_PLATFORM_BOOT_POLICY_VERSION; + entry->checksum = 0; + fit_entry_add_size(&fit->header, sizeof(struct fit_entry)); +} + /* * In case there's a FIT_TYPE_BIOS_ACM entry, at least one * FIT_TYPE_BIOS_STARTUP entry must exist. @@ -607,6 +620,9 @@ int fit_dump(struct fit_table *fit) case FIT_TYPE_BIOS_ACM: name = "BIOS ACM"; break; + case FIT_TYPE_PLATFORM_BOOT_POLICY: + name = "Platform Boot Policy"; + break; case FIT_TYPE_BIOS_STARTUP: name = "BIOS Startup Module"; break; @@ -676,6 +692,7 @@ int fit_is_supported_type(const enum fit_type type) switch (type) { case FIT_TYPE_MICROCODE: case FIT_TYPE_BIOS_ACM: + case FIT_TYPE_PLATFORM_BOOT_POLICY: case FIT_TYPE_BIOS_STARTUP: case FIT_TYPE_BIOS_POLICY: case FIT_TYPE_TXT_POLICY: @@ -728,6 +745,9 @@ int fit_add_entry(struct fit_table *fit, case FIT_TYPE_BIOS_ACM: update_fit_bios_acm_entry(fit, entry, offset); break; + case FIT_TYPE_PLATFORM_BOOT_POLICY: + update_fit_pbp_entry(fit, entry, offset); + break; case FIT_TYPE_BIOS_STARTUP: update_fit_bios_startup_entry(fit, entry, offset, len); break; diff --git a/util/cbfstool/fit.h b/util/cbfstool/fit.h index a0c956cac5..6d7681f710 100644 --- a/util/cbfstool/fit.h +++ b/util/cbfstool/fit.h @@ -15,6 +15,7 @@ enum fit_type { FIT_TYPE_HEADER = 0, FIT_TYPE_MICROCODE = 1, FIT_TYPE_BIOS_ACM = 2, + FIT_TYPE_PLATFORM_BOOT_POLICY = 4, FIT_TYPE_BIOS_STARTUP = 7, FIT_TYPE_TPM_POLICY = 8, FIT_TYPE_BIOS_POLICY = 9, |