diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2019-09-04 16:01:28 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-11 10:07:34 -0400 |
commit | 14d963d1b51fc7a57b8d561588f163d7cae8ed81 (patch) | |
tree | defff9e9b73fe3343a136bb7d2e62b7e9738a5c6 /test/dm | |
parent | c08eb936263c67312cb55c354277f9dc3433b194 (diff) |
remoteproc: elf_loader: Always check the validity of the image before loading
rproc_elf32_load_image() rely on user to send a valid address for elf loading.
Instead do a sanity check on the address passed by user. This will help
all rproc elf users to not call sanity_check explicitly before calling
elf_loading.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/remoteproc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/dm/remoteproc.c b/test/dm/remoteproc.c index a2c4be7c27..c77361c8f4 100644 --- a/test/dm/remoteproc.c +++ b/test/dm/remoteproc.c @@ -171,11 +171,8 @@ static int dm_test_remoteproc_elf(struct unit_test_state *uts) ut_assertnonnull(loaded_firmware); memset(loaded_firmware, 0, loaded_firmware_size); - /* Verify valid ELF format */ - ut_assertok(rproc_elf32_sanity_check((ulong)valid_elf32, size)); - /* Load firmware in loaded_firmware, and verify it */ - ut_assertok(rproc_elf32_load_image(dev, (unsigned long)valid_elf32)); + ut_assertok(rproc_elf32_load_image(dev, (ulong)valid_elf32, size)); ut_assertok(memcmp(loaded_firmware, valid_elf32, loaded_firmware_size)); unmap_physmem(loaded_firmware, MAP_NOCACHE); |