diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-07-27 10:58:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-08-02 10:28:49 +0200 |
commit | 6017eee9ce495d0b12cfe2f6f7569a0808cd672d (patch) | |
tree | 1c042b2ed876e10035174820373930ccb14fa5d9 /src/fundamental/tpm-pcr.c | |
parent | aa323c090750408fc008bfcdc538d8cf54d15180 (diff) | |
download | systemd-6017eee9ce495d0b12cfe2f6f7569a0808cd672d.tar.gz |
boot: move unified kernel PE section definitions into 'fundamental' code
Le's share this code between userspace and uefispace. This is useful
later when pre-measuring expected PCRs from userspace.
Diffstat (limited to 'src/fundamental/tpm-pcr.c')
-rw-r--r-- | src/fundamental/tpm-pcr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fundamental/tpm-pcr.c b/src/fundamental/tpm-pcr.c new file mode 100644 index 0000000000..97b3c7b9d2 --- /dev/null +++ b/src/fundamental/tpm-pcr.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#include <stddef.h> + +#include "tpm-pcr.h" + +const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = { + [UNIFIED_SECTION_LINUX] = ".linux", + [UNIFIED_SECTION_OSREL] = ".osrel", + [UNIFIED_SECTION_CMDLINE] = ".cmdline", + [UNIFIED_SECTION_INITRD] = ".initrd", + [UNIFIED_SECTION_SPLASH] = ".splash", + [UNIFIED_SECTION_DTB] = ".dtb", + NULL, +}; |