diff options
author | Dan Handley <dan.handley@arm.com> | 2014-04-23 13:47:06 +0100 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-05-06 17:55:38 +0100 |
commit | 625de1d4f04b30383354bee944d0a7ca3dba1e67 (patch) | |
tree | 3a9c8494e30f1d7475dbc69edef172a37f036594 /common | |
parent | 408c37682a0233c8c4fa88700b603f0b09d6361f (diff) |
Remove variables from .data section
Update code base to remove variables from the .data section,
mainly by using const static data where possible and adding
the const specifier as required. Most changes are to the IO
subsystem, including the framework APIs. The FVP power
management code is also affected.
Delay initialization of the global static variable,
next_image_type in bl31_main.c, until it is realy needed.
Doing this moves the variable from the .data to the .bss
section.
Also review the IO interface for inconsistencies, using
uintptr_t where possible instead of void *. Remove the
io_handle and io_dev_handle typedefs, which were
unnecessary, replacing instances with uintptr_t.
Fixes ARM-software/tf-issues#107.
Change-Id: I085a62197c82410b566e4698e5590063563ed304
Diffstat (limited to 'common')
-rw-r--r-- | common/bl_common.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/bl_common.c b/common/bl_common.c index af2b7b7..5361c38 100644 --- a/common/bl_common.c +++ b/common/bl_common.c @@ -251,9 +251,9 @@ static void dump_load_info(unsigned long image_load_addr, /* Generic function to return the size of an image */ unsigned long image_size(const char *image_name) { - io_dev_handle dev_handle; - io_handle image_handle; - void *image_spec; + uintptr_t dev_handle; + uintptr_t image_handle; + uintptr_t image_spec; size_t image_size = 0; int io_result = IO_FAIL; @@ -303,9 +303,9 @@ unsigned long load_image(meminfo_t *mem_layout, unsigned int load_type, unsigned long fixed_addr) { - io_dev_handle dev_handle; - io_handle image_handle; - void *image_spec; + uintptr_t dev_handle; + uintptr_t image_handle; + uintptr_t image_spec; unsigned long temp_image_base = 0; unsigned long image_base = 0; long offset = 0; @@ -504,7 +504,7 @@ unsigned long load_image(meminfo_t *mem_layout, /* We have enough space so load the image now */ /* TODO: Consider whether to try to recover/retry a partially successful read */ - io_result = io_read(image_handle, (void *)image_base, image_size, &bytes_read); + io_result = io_read(image_handle, image_base, image_size, &bytes_read); if ((io_result != IO_SUCCESS) || (bytes_read < image_size)) { WARN("Failed to load '%s' file (%i)\n", image_name, io_result); goto fail; |