@@ -336,6 +336,7 @@ void efi_apply_loadoptions_quirk(const void **load_options, u32 *load_options_si
enum efistub_event {
EFISTUB_EVT_INITRD,
+ EFISTUB_EVT_LOAD_OPTIONS,
EFISTUB_EVT_COUNT,
};
@@ -352,6 +353,11 @@ static const struct {
INITRD_EVENT_TAG_ID,
STR_WITH_SIZE("Linux initrd")
},
+ [EFISTUB_EVT_LOAD_OPTIONS] = {
+ 9,
+ LOAD_OPTIONS_EVENT_TAG_ID,
+ STR_WITH_SIZE("LOADED_IMAGE::LoadOptions")
+ },
};
static efi_status_t efi_measure_tagged_event(unsigned long load_addr,
@@ -423,6 +429,10 @@ char *efi_convert_cmdline(efi_loaded_image_t *image, int *cmd_line_len)
efi_status_t status;
u32 options_chars;
+ if (options_size > 0)
+ efi_measure_tagged_event((unsigned long)options, options_size,
+ EFISTUB_EVT_LOAD_OPTIONS);
+
efi_apply_loadoptions_quirk((const void **)&options, &options_size);
options_chars = options_size / sizeof(efi_char16_t);
@@ -762,6 +762,7 @@ union apple_properties_protocol {
typedef u32 efi_tcg2_event_log_format;
#define INITRD_EVENT_TAG_ID 0x8F3B22ECU
+#define LOAD_OPTIONS_EVENT_TAG_ID 0x8F3B22EDU
#define EV_EVENT_TAG 0x00000006U
#define EFI_TCG2_EVENT_HEADER_VERSION 0x1