Read device memory regions from the FDT.
If provided, rather than mapping a large chunk of address space as
device memory, allow the specific ranges to be provided and only map
those. Fall back to mapping a large chunk and carving out normal memory
if no device memory regions are provided so QEMU tests continue to work.
These ranges continue to only be mapped to the primary VM for the time
being.
Change-Id: Ia3acf3bb206bf0399ebc3be33d4696cd0450539d
diff --git a/inc/hf/boot_params.h b/inc/hf/boot_params.h
index a55ee73..35b6624 100644
--- a/inc/hf/boot_params.h
+++ b/inc/hf/boot_params.h
@@ -25,6 +25,7 @@
#include "hf/mpool.h"
#define MAX_MEM_RANGES 20
+#define MAX_DEVICE_MEM_RANGES 10
struct mem_range {
paddr_t begin;
@@ -36,6 +37,8 @@
size_t cpu_count;
struct mem_range mem_ranges[MAX_MEM_RANGES];
size_t mem_ranges_count;
+ struct mem_range device_mem_ranges[MAX_DEVICE_MEM_RANGES];
+ size_t device_mem_ranges_count;
paddr_t initrd_begin;
paddr_t initrd_end;
uintreg_t kernel_arg;