diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2019-09-04 16:01:31 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-11 10:07:34 -0400 |
commit | 81e39fbd9251bfbef3bc156735e95b67cd7a828f (patch) | |
tree | e5b8fa24f4dab9809992280ddb9f7c11c08ea40a /include/remoteproc.h | |
parent | 856c0ad413f52d20963ef6b0fe982a0ca91086f2 (diff) | |
download | u-boot-81e39fbd9251bfbef3bc156735e95b67cd7a828f.tar.gz |
remoteproc: elf_loader: Introduce rproc_elf_get_boot_addr() api
Introduce rproc_elf_get_boot_addr() that returns the entry point of
the elf file. This api auto detects the 64/32 bit elf file and returns
the boot addr accordingly.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'include/remoteproc.h')
-rw-r--r-- | include/remoteproc.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/remoteproc.h b/include/remoteproc.h index 812e0f47c4..046cd9e54e 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -267,6 +267,16 @@ int rproc_elf64_load_image(struct udevice *dev, ulong addr, ulong size); * @return 0 if the image is successfully loaded, else appropriate error value. */ int rproc_elf_load_image(struct udevice *dev, unsigned long addr, ulong size); + +/** + * rproc_elf_get_boot_addr() - Get rproc's boot address. + * @dev: device loading the ELF image + * @addr: valid ELF image address + * + * This function returns the entry point address of the ELF + * image. + */ +ulong rproc_elf_get_boot_addr(struct udevice *dev, ulong addr); #else static inline int rproc_init(void) { return -ENOSYS; } static inline int rproc_dev_init(int id) { return -ENOSYS; } @@ -292,6 +302,8 @@ static inline int rproc_elf64_load_image(struct udevice *dev, ulong addr, static inline int rproc_elf_load_image(struct udevice *dev, ulong addr, ulong size) { return -ENOSYS; } +static inline ulong rproc_elf_get_boot_addr(struct udevice *dev, ulong addr) +{ return 0; } #endif #endif /* _RPROC_H_ */ |