mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 10:08:47 +00:00
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
This commit is contained in:
parent
f2f9bb5e71
commit
9d72b4ea9c
11 changed files with 479 additions and 45 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue