[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GRUB PATCH RFC 20/22] i386/skinit: Add AMD SKINIT definitions header fi
From: |
Krystian Hebel |
Subject: |
[GRUB PATCH RFC 20/22] i386/skinit: Add AMD SKINIT definitions header file |
Date: |
Tue, 10 Nov 2020 15:44:58 +0100 |
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
---
include/grub/i386/skinit.h | 46 ++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 include/grub/i386/skinit.h
diff --git a/include/grub/i386/skinit.h b/include/grub/i386/skinit.h
new file mode 100644
index 000000000000..3232d4c543cd
--- /dev/null
+++ b/include/grub/i386/skinit.h
@@ -0,0 +1,46 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2020 Oracle and/or its affiliates.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Main secure launch definitions header file.
+ */
+
+#ifndef GRUB_I386_SKINIT_H
+#define GRUB_I386_SKINIT_H 1
+
+// SLB is 64k, 64k-aligned
+#define GRUB_SKINIT_SLB_SIZE 0x10000
+#define GRUB_SKINIT_SLB_ALIGN 0x10000
+
+#ifndef ASM_FILE
+
+#include <grub/i386/slaunch.h>
+
+grub_err_t grub_skinit_boot_prepare (struct grub_slaunch_params *slparams);
+
+static inline grub_uint16_t grub_skinit_get_sl_size (void)
+{
+ grub_uint16_t *ptr = (grub_uint16_t *)grub_slaunch_module ();
+
+ if (ptr == NULL)
+ return 0;
+
+ return ptr[1];
+}
+
+#endif /* ASM_FILE */
+
+#endif /* GRUB_I386_SKINIT_H */
--
2.17.1
- [GRUB PATCH RFC 12/22] i386/efi: Report UEFI Secure Boot status to the Linux kernel, (continued)
- [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
- [GRUB PATCH RFC 20/22] i386/skinit: Add AMD SKINIT definitions header file,
Krystian Hebel <=
- [GRUB PATCH RFC 21/22] i386/skinit: Add AMD SKINIT core implementation, Krystian Hebel, 2020/11/10
- [GRUB PATCH RFC 22/22] i386/slaunch: Add support for AMD SKINIT, Krystian Hebel, 2020/11/10
- Re: [GRUB RFC PATCH 00/22] i386: Intel TXT and AMD SKINIT secure launcher, Konrad Rzeszutek Wilk, 2020/11/10