summaryrefslogtreecommitdiff
path: root/include/remoteproc.h
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2019-09-04 16:01:29 +0530
committerTom Rini <trini@konsulko.com>2019-10-11 10:07:34 -0400
commite3c4d6f01fb5c86ee8a67d28cc3a0eb708954e40 (patch)
tree32717693b36498f41be9f4885d6b887d40ff21d6 /include/remoteproc.h
parent14d963d1b51fc7a57b8d561588f163d7cae8ed81 (diff)
remoteproc: elf-loader: Add 64 bit elf loading support
The current rproc-elf-loader supports loading of only 32 bit elf files. Introduce support for loading of 64 bit elf files in rproc-elf-loader. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Diffstat (limited to 'include/remoteproc.h')
-rw-r--r--include/remoteproc.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/remoteproc.h b/include/remoteproc.h
index 1ef88be7f7..56a11db6e3 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -215,6 +215,18 @@ int rproc_is_running(int id);
int rproc_elf32_sanity_check(ulong addr, ulong size);
/**
+ * rproc_elf64_sanity_check() - Verify if an image is a valid ELF32 one
+ *
+ * Check if a valid ELF64 image exists at the given memory location. Verify
+ * basic ELF64 format requirements like magic number and sections size.
+ *
+ * @addr: address of the image to verify
+ * @size: size of the image
+ * @return 0 if the image looks good, else appropriate error value.
+ */
+int rproc_elf64_sanity_check(ulong addr, ulong size);
+
+/**
* rproc_elf32_load_image() - load an ELF32 image
* @dev: device loading the ELF32 image
* @addr: valid ELF32 image address
@@ -222,6 +234,15 @@ int rproc_elf32_sanity_check(ulong addr, ulong size);
* @return 0 if the image is successfully loaded, else appropriate error value.
*/
int rproc_elf32_load_image(struct udevice *dev, unsigned long addr, ulong size);
+
+/**
+ * rproc_elf64_load_image() - load an ELF64 image
+ * @dev: device loading the ELF64 image
+ * @addr: valid ELF64 image address
+ * @size: size of the image
+ * @return 0 if the image is successfully loaded, else appropriate error value.
+ */
+int rproc_elf64_load_image(struct udevice *dev, ulong addr, ulong size);
#else
static inline int rproc_init(void) { return -ENOSYS; }
static inline int rproc_dev_init(int id) { return -ENOSYS; }
@@ -234,9 +255,14 @@ static inline int rproc_ping(int id) { return -ENOSYS; }
static inline int rproc_is_running(int id) { return -ENOSYS; }
static inline int rproc_elf32_sanity_check(ulong addr,
ulong size) { return -ENOSYS; }
+static inline int rproc_elf64_sanity_check(ulong addr,
+ ulong size) { return -ENOSYS; }
static inline int rproc_elf32_load_image(struct udevice *dev,
unsigned long addr, ulong size)
{ return -ENOSYS; }
+static inline int rproc_elf64_load_image(struct udevice *dev, ulong addr,
+ ulong size)
+{ return -ENOSYS; }
#endif
#endif /* _RPROC_H_ */