diff options
Diffstat (limited to '')
-rw-r--r-- | src/boot/efi/devicetree.c | 4 | ||||
-rw-r--r-- | src/boot/efi/devicetree.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/boot/efi/devicetree.c b/src/boot/efi/devicetree.c index 7e77ed6e60..f3563f296f 100644 --- a/src/boot/efi/devicetree.c +++ b/src/boot/efi/devicetree.c @@ -174,6 +174,10 @@ static const char* devicetree_get_compatible(const void *dtb) { return NULL; } +bool firmware_devicetree_exists(void) { + return !!find_configuration_table(MAKE_GUID_PTR(EFI_DTB_TABLE)); +} + /* This function checks if the firmware provided Devicetree * and a UKI provided Devicetree contain the same first entry * on their respective "compatible" fields (which usually defines diff --git a/src/boot/efi/devicetree.h b/src/boot/efi/devicetree.h index 44c61fff6f..5f6720f655 100644 --- a/src/boot/efi/devicetree.h +++ b/src/boot/efi/devicetree.h @@ -30,6 +30,7 @@ typedef struct FdtHeader { uint32_t size_dt_struct; } FdtHeader; +bool firmware_devicetree_exists(void); EFI_STATUS devicetree_match(const void *uki_dtb, size_t uki_dtb_length); EFI_STATUS devicetree_match_by_compatible(const void *uki_dtb, size_t uki_dtb_length, const char *compat); EFI_STATUS devicetree_install(struct devicetree_state *state, EFI_FILE *root_dir, char16_t *name); |