aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2014-07-10 14:45:19 +0100
committerdanh-arm <dan.handley@arm.com>2014-07-10 14:45:19 +0100
commit6a2231560b0243defba0721d15e824d21e5ae60b (patch)
tree69701cadcfb47c20202d65ad3e12e970d57c81a3 /include
parent3fc938b56a55985ba46c37cf5526df0a7daa775c (diff)
parent6063379902302dfcdfa9b8978b8a0dce44bd78f7 (diff)
downloadtrusted-firmware-a-6a2231560b0243defba0721d15e824d21e5ae60b.tar.gz
Merge pull request #157 from sandrine-bailleux/sb/tf-issue-109
TF issue 109
Diffstat (limited to 'include')
-rw-r--r--include/common/bl_common.h39
-rw-r--r--include/plat/common/platform.h6
2 files changed, 20 insertions, 25 deletions
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index f5e2a9a241..154c0f49d1 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -38,15 +38,11 @@
#define DOWN 0
/*******************************************************************************
- * Constants for loading images. When BLx wants to load BLy, it looks at a
- * meminfo structure to find the extents of free memory. Then depending upon
- * how it has been configured, it can either load BLy at the top or bottom of
- * the free memory. These constants indicate the choice.
- * TODO: Make this configurable while building the trusted firmware.
- ******************************************************************************/
-#define TOP_LOAD 0x1
-#define BOT_LOAD !TOP_LOAD
-#define LOAD_MASK (1 << 0)
+ * Constants to identify the location of a memory region in a given memory
+ * layout.
+******************************************************************************/
+#define TOP 0x1
+#define BOTTOM !TOP
/******************************************************************************
* Opcode passed in x0 to tell next EL that we want to run an image.
@@ -97,18 +93,17 @@
#include <cdefs.h> /* For __dead2 */
#include <cassert.h>
#include <stdint.h>
+#include <stddef.h>
/*******************************************************************************
* Structure used for telling the next BL how much of a particular type of
* memory is available for its use and how much is already used.
******************************************************************************/
typedef struct meminfo {
- unsigned long total_base;
- long total_size;
- unsigned long free_base;
- long free_size;
- unsigned long attr;
- unsigned long next;
+ uint64_t total_base;
+ size_t total_size;
+ uint64_t free_base;
+ size_t free_size;
} meminfo_t;
typedef struct aapcs64_params {
@@ -209,14 +204,16 @@ CASSERT(sizeof(unsigned long) ==
unsigned long page_align(unsigned long, unsigned);
void change_security_state(unsigned int);
unsigned long image_size(const char *);
-int load_image(meminfo_t *,
- const char *,
- unsigned int,
- unsigned long,
- image_info_t *,
- entry_point_info_t *);
+int load_image(meminfo_t *mem_layout,
+ const char *image_name,
+ uint64_t image_base,
+ image_info_t *image_data,
+ entry_point_info_t *entry_point_info);
extern const char build_message[];
+void reserve_mem(uint64_t *free_base, size_t *free_size,
+ uint64_t addr, size_t size);
+
#endif /*__ASSEMBLY__*/
#endif /* __BL_COMMON_H__ */
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index c087dc69a3..c130ae78df 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -90,10 +90,8 @@ void bl1_plat_set_bl2_ep_info(struct image_info *image,
/*******************************************************************************
* Optional BL1 functions (may be overridden)
******************************************************************************/
-void init_bl2_mem_layout(struct meminfo *,
- struct meminfo *,
- unsigned int,
- unsigned long);
+void bl1_init_bl2_mem_layout(const struct meminfo *bl1_mem_layout,
+ struct meminfo *bl2_mem_layout);
/*******************************************************************************
* Mandatory BL2 functions