Support multiple memory ranges.

Bug: 114733240
Change-Id: Ifbad8688e0a0e17a4732b637711919fc18d68f7a
diff --git a/inc/hf/boot_params.h b/inc/hf/boot_params.h
index f338e84..0a6ab8c 100644
--- a/inc/hf/boot_params.h
+++ b/inc/hf/boot_params.h
@@ -4,17 +4,24 @@
 
 #include "hf/mm.h"
 
+#define MAX_MEM_RANGES 20
+
+struct mem_range {
+	paddr_t begin;
+	paddr_t end;
+};
+
 struct boot_params {
-	paddr_t mem_begin;
-	paddr_t mem_end;
+	struct mem_range mem_ranges[MAX_MEM_RANGES];
+	size_t mem_ranges_count;
 	paddr_t initrd_begin;
 	paddr_t initrd_end;
 	size_t kernel_arg;
 };
 
 struct boot_params_update {
-	paddr_t reserved_begin;
-	paddr_t reserved_end;
+	struct mem_range reserved_ranges[MAX_MEM_RANGES];
+	size_t reserved_ranges_count;
 	paddr_t initrd_begin;
 	paddr_t initrd_end;
 };
diff --git a/inc/hf/load.h b/inc/hf/load.h
index 5e4ead3..d1f239c 100644
--- a/inc/hf/load.h
+++ b/inc/hf/load.h
@@ -3,11 +3,13 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "hf/boot_params.h"
 #include "hf/cpio.h"
 #include "hf/memiter.h"
 #include "hf/mm.h"
 
 bool load_primary(const struct memiter *cpio, size_t kernel_arg,
 		  struct memiter *initrd);
-bool load_secondary(const struct memiter *cpio, paddr_t mem_begin,
-		    paddr_t *mem_end);
+bool load_secondary(const struct memiter *cpio,
+		    const struct boot_params *params,
+		    struct boot_params_update *update);