| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "sd-id128.h" |
| 5 |
|
| 6 |
#include "shared-forward.h" |
| 7 |
|
| 8 |
/* Various calls for interfacing with EFI variables from the official UEFI specs. */ |
| 9 |
|
| 10 |
int efi_reboot_to_firmware_supported(void); |
| 11 |
int efi_get_reboot_to_firmware(void); |
| 12 |
int efi_set_reboot_to_firmware(bool value); |
| 13 |
|
| 14 |
int efi_get_boot_option(uint16_t id, char **ret_title, sd_id128_t *ret_part_uuid, char **ret_path, bool *ret_active); |
| 15 |
int efi_add_boot_option(uint16_t id, const char *title, uint32_t part, uint64_t pstart, uint64_t psize, sd_id128_t part_uuid, const char *path); |
| 16 |
int efi_remove_boot_option(uint16_t id); |
| 17 |
int efi_get_boot_order(uint16_t **ret_order); |
| 18 |
int efi_set_boot_order(const uint16_t *order, size_t n); |
| 19 |
int efi_get_boot_options(uint16_t **ret_options); |
| 20 |
|
| 21 |
int efi_get_active_pcr_banks(uint32_t *ret); |
| 22 |
bool efi_has_tpm2(void); |
| 23 |
|
| 24 |
sd_id128_t efi_guid_to_id128(const void *guid); |
| 25 |
void efi_id128_to_guid(sd_id128_t id, void *ret_guid); |