summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2021-04-10 13:03:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-04-13 09:30:45 +0200
commit5b537db03b3e73a8c1b465168d85b9cc3e045498 (patch)
treee218488d7506a7eb9905914b8d2d2f4e91451ff5 /include
parentf630fef413ae1a941a672e6fb1890585d8270bf1 (diff)
downloadbarebox-5b537db03b3e73a8c1b465168d85b9cc3e045498.tar.gz
barebox-5b537db03b3e73a8c1b465168d85b9cc3e045498.tar.xz
resource: enable use of iomem command on EFI systems
iomem was so far unimplemented for EFI, because barebox didn't know what to put there as the UEFI implementation does the heavy lifting. Add an initcall that uses the EFI get_memory_map entry point to remedy this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.pengutronix.de/20210410110355.2105448-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/efi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/efi.h b/include/efi.h
index b9f3428dc5..439803c294 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -91,6 +91,15 @@ typedef struct {
* Memory map descriptor:
*/
+struct efi_memory_desc {
+ u32 type; /* enum efi_memory_type */
+ u32 _padding;
+ efi_physical_addr_t phys_start;
+ void *virt_start;
+ u64 npages;
+ u64 attrs;
+};
+
/* Memory types: */
enum efi_memory_type {
EFI_RESERVED_TYPE,