[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GRUB PATCH RFC 09/22] efi: Make shim_lock GUID and protocol type public
From: |
Krystian Hebel |
Subject: |
[GRUB PATCH RFC 09/22] efi: Make shim_lock GUID and protocol type public |
Date: |
Tue, 10 Nov 2020 15:44:47 +0100 |
From: Norbert Kaminski <norbert.kaminski@3mdeb.com>
The GUID will be used to properly detect and report UEFI Secure Boot
status to the x86 Linux kernel. The functionality will be added by
subsequent patches. The shim_lock protocol type is made public for
completeness.
Additionally, fix formatting of four preceding GUIDs.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Norbert Kaminski <norbert.kaminski@3mdeb.com>
---
grub-core/commands/efi/shim_lock.c | 12 ------------
include/grub/efi/api.h | 19 +++++++++++++++----
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/grub-core/commands/efi/shim_lock.c
b/grub-core/commands/efi/shim_lock.c
index 764098cfc83e..d8f52d721c30 100644
--- a/grub-core/commands/efi/shim_lock.c
+++ b/grub-core/commands/efi/shim_lock.c
@@ -27,18 +27,6 @@
GRUB_MOD_LICENSE ("GPLv3+");
-#define GRUB_EFI_SHIM_LOCK_GUID \
- { 0x605dab50, 0xe046, 0x4300, \
- { 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 } \
- }
-
-struct grub_efi_shim_lock_protocol
-{
- grub_efi_status_t
- (*verify) (void *buffer, grub_uint32_t size);
-};
-typedef struct grub_efi_shim_lock_protocol grub_efi_shim_lock_protocol_t;
-
static grub_efi_guid_t shim_lock_guid = GRUB_EFI_SHIM_LOCK_GUID;
static grub_efi_shim_lock_protocol_t *sl;
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 1dcaa12f59e8..39733585b580 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -321,22 +321,27 @@
#define GRUB_EFI_SAL_TABLE_GUID \
{ 0xeb9d2d32, 0x2d88, 0x11d3, \
- { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
+ { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
#define GRUB_EFI_HCDP_TABLE_GUID \
{ 0xf951938d, 0x620b, 0x42ef, \
- { 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 } \
+ { 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 } \
}
#define GRUB_EFI_DEVICE_TREE_GUID \
{ 0xb1b621d5, 0xf19c, 0x41a5, \
- { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } \
+ { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } \
}
#define GRUB_EFI_VENDOR_APPLE_GUID \
{ 0x2B0585EB, 0xD8B8, 0x49A9, \
- { 0x8B, 0x8C, 0xE2, 0x1B, 0x01, 0xAE, 0xF2, 0xB7 } \
+ { 0x8B, 0x8C, 0xE2, 0x1B, 0x01, 0xAE, 0xF2, 0xB7 } \
+ }
+
+#define GRUB_EFI_SHIM_LOCK_GUID \
+ { 0x605dab50, 0xe046, 0x4300, \
+ { 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 } \
}
struct grub_efi_sal_system_table
@@ -1694,6 +1699,12 @@ struct grub_efi_block_io
};
typedef struct grub_efi_block_io grub_efi_block_io_t;
+struct grub_efi_shim_lock_protocol
+{
+ grub_efi_status_t (*verify) (void *buffer, grub_uint32_t size);
+};
+typedef struct grub_efi_shim_lock_protocol grub_efi_shim_lock_protocol_t;
+
#if (GRUB_TARGET_SIZEOF_VOID_P == 4) || defined (__ia64__) \
|| defined (__aarch64__) || defined (__MINGW64__) || defined (__CYGWIN__) \
|| defined(__riscv)
--
2.17.1
- [GRUB RFC PATCH 00/22] i386: Intel TXT and AMD SKINIT secure launcher, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 01/22] i386/msr: Merge rdmsr.h and wrmsr.h into msr.h, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 03/22] i386/msr: Extract and improve MSR support detection code, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 02/22] i386/msr: Rename grub_msr_read() and grub_msr_write(), Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 04/22] i386/memory: Rename PAGE_SHIFT to GRUB_PAGE_SHIFT, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 06/22] mmap: Add grub_mmap_get_lowest() and grub_mmap_get_highest(), Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 05/22] i386/memory: Rename PAGE_SIZE to GRUB_PAGE_SIZE and make it global, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 07/22] i386/tpm: Rename tpm module to tpm_verifier, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 08/22] i386/tpm: Add TPM TIS and CRB driver, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 09/22] efi: Make shim_lock GUID and protocol type public,
Krystian Hebel <=
- [GRUB PATCH RFC 12/22] i386/efi: Report UEFI Secure Boot status to the Linux kernel, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 10/22] efi: Return grub_efi_status_t from grub_efi_get_variable(), Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 11/22] efi: Add a function to read EFI variables with attributes, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 15/22] i386/txt: Add Intel TXT core implementation, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 17/22] i386/txt: Add Intel TXT verification routines, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 16/22] i386/txt: Add Intel TXT ACM module support, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 14/22] i386/txt: Add Intel TXT definitions header file, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 13/22] i386/slaunch: Add basic platform support for secure launch, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 18/22] i386/slaunch: Add secure launch framework and commands, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 19/22] i386/slaunch: Add code for searching for DRTM event log in ACPI, Krystian Hebel, 2020/11/10