aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-04 03:51:12 -0700
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-01-15 10:57:22 +0100
commit25a326b0066b3c449a0a91889b0ce19cb7320237 (patch)
tree215cd3419424c42bcdea7c8ccbeac63103ea4416 /include
parentce1dc0cc17e94a0bf1c17bd1465cb0afd5bfb214 (diff)
downloadu-boot-25a326b0066b3c449a0a91889b0ce19cb7320237.zip
u-boot-25a326b0066b3c449a0a91889b0ce19cb7320237.tar.gz
u-boot-25a326b0066b3c449a0a91889b0ce19cb7320237.tar.bz2
efi: Support the efi command in the app
At present the 'efi' command only works in the EFI payload. Update it to work in the app too, so the memory map can be examined. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'include')
-rw-r--r--include/efi.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/efi.h b/include/efi.h
index 3508ff8..9b7ba0d 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -610,4 +610,19 @@ int efi_store_memory_map(struct efi_priv *priv);
*/
int efi_call_exit_boot_services(void);
+/**
+ * efi_get_mmap() - Get the memory map from EFI
+ *
+ * This is used in the app. The caller must free *@descp when done
+ *
+ * @descp: Returns allocated pointer to EFI memory map table
+ * @sizep: Returns size of table in bytes
+ * @keyp: Returns memory-map key
+ * @desc_sizep: Returns size of each @desc_base record
+ * @versionp: Returns version number of memory map
+ * @return 0 on success, -ve on error
+ */
+int efi_get_mmap(struct efi_mem_desc **descp, int *sizep, uint *keyp,
+ int *desc_sizep, uint *versionp);
+
#endif /* _LINUX_EFI_H */