summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2021-08-13 16:12:39 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-08-14 20:54:41 +0200
commitcfbcf054a323b692e85e73fc2a57400ee92f6b63 (patch)
tree109598db349ecabe1bb4264c3fef415ba5da33ab /include
parent17a50bd689ab7e506c71df0856fed5935cf323d1 (diff)
efi_loader: add secure boot variable measurement
TCG PC Client PFP spec requires to measure the secure boot policy before validating the UEFI image. This commit adds the secure boot variable measurement of "SecureBoot", "PK", "KEK", "db", "dbx", "dbt", and "dbr". Note that this implementation assumes that secure boot variables are pre-configured and not be set/updated in runtime. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/efi_tcg2.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h
index bcfb98168a..497ba3ce94 100644
--- a/include/efi_tcg2.h
+++ b/include/efi_tcg2.h
@@ -142,6 +142,26 @@ struct efi_tcg2_final_events_table {
struct tcg_pcr_event2 event[];
};
+/**
+ * struct tdUEFI_VARIABLE_DATA - event log structure of UEFI variable
+ * @variable_name: The vendorGUID parameter in the
+ * GetVariable() API.
+ * @unicode_name_length: The length in CHAR16 of the Unicode name of
+ * the variable.
+ * @variable_data_length: The size of the variable data.
+ * @unicode_name: The CHAR16 unicode name of the variable
+ * without NULL-terminator.
+ * @variable_data: The data parameter of the efi variable
+ * in the GetVariable() API.
+ */
+struct efi_tcg2_uefi_variable_data {
+ efi_guid_t variable_name;
+ u64 unicode_name_length;
+ u64 variable_data_length;
+ u16 unicode_name[1];
+ u8 variable_data[1];
+};
+
struct efi_tcg2_protocol {
efi_status_t (EFIAPI * get_capability)(struct efi_tcg2_protocol *this,
struct efi_tcg2_boot_service_capability *capability);