aboutsummaryrefslogtreecommitdiff
path: root/lib/semihosting/semihosting.c
diff options
context:
space:
mode:
authorJames Morrissey <james.morrissey@arm.com>2014-02-10 17:04:32 +0000
committerDan Handley <dan.handley@arm.com>2014-02-17 18:51:43 +0000
commit9d72b4ea9c7d9cac386f70d8a6581d4b1a45d7b0 (patch)
tree603de7f9d7c6f74b09108a2539d1658f44e7bcfc /lib/semihosting/semihosting.c
parentf2f9bb5e712d3ec1d7dda5a5b52c8f8701a93d99 (diff)
downloadarm-trusted-firmware-9d72b4ea9c7d9cac386f70d8a6581d4b1a45d7b0.tar.gz
Implement load_image in terms of IO abstraction
The modified implementation uses the IO abstraction rather than making direct semi-hosting calls. The semi-hosting driver is now registered for the FVP platform during initialisation of each boot stage where it is used. Additionally, the FVP platform includes a straightforward implementation of 'plat_get_image_source' which provides a generic means for the 'load_image' function to determine how to access the image data. Change-Id: Ia34457b471dbee990c7b3c79de7aee4ceea51aa6
Diffstat (limited to 'lib/semihosting/semihosting.c')
-rw-r--r--lib/semihosting/semihosting.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/semihosting/semihosting.c b/lib/semihosting/semihosting.c
index 1a6d156..1a7ac60 100644
--- a/lib/semihosting/semihosting.c
+++ b/lib/semihosting/semihosting.c
@@ -120,7 +120,7 @@ int semihosting_file_read(int file_handle, int *length, void *buffer)
return result;
}
-int semihosting_file_write(int file_handle, int *length, void *buffer)
+int semihosting_file_write(int file_handle, int *length, const void *buffer)
{
smh_file_read_write_block write_block;
@@ -128,7 +128,7 @@ int semihosting_file_write(int file_handle, int *length, void *buffer)
return -EINVAL;
write_block.handle = file_handle;
- write_block.buffer = buffer;
+ write_block.buffer = (void *)buffer;
write_block.length = *length;
*length = semihosting_call(SEMIHOSTING_SYS_WRITE,