summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGhanim Fodi <gfodi@codeaurora.org>2017-01-24 15:42:30 +0200
committerGhanim Fodi <gfodi@codeaurora.org>2017-02-03 13:45:08 +0200
commitc83b219d61a8c891bbddef2c870732be7eafa868 (patch)
tree32827309c044eee9d4008891de4ecc49e03821c3 /include/linux
parent336e24550387c399c29c3c5a2637c8f29c0a33c7 (diff)
msm: ipa3: Validate IPA and GSI firmwares before loading
IPA and GSI firmwares are saved on the file-system as an ELF file. IPA driver extracts the firmwares and load them during driver initialization. This change adds validation steps to each firmware before loading: load addresses, memory sizes, firmware sizes and more... Change-Id: I7d7f66e8e8a9ca0efae08b1e57b25ae4e44cc5bb CRs-fixed: 1110522 Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/msm_gsi.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/msm_gsi.h b/include/linux/msm_gsi.h
index fb2607dd365b..6037fbf00a23 100644
--- a/include/linux/msm_gsi.h
+++ b/include/linux/msm_gsi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1040,6 +1040,19 @@ int gsi_configure_regs(phys_addr_t gsi_base_addr, u32 gsi_size,
*/
int gsi_enable_fw(phys_addr_t gsi_base_addr, u32 gsi_size);
+/**
+ * gsi_get_inst_ram_offset_and_size - Peripheral should call this function
+ * to get instruction RAM base address offset and size. Peripheral typically
+ * uses this info to load GSI FW into the IRAM.
+ *
+ * @base_offset:[OUT] - IRAM base offset address
+ * @size: [OUT] - IRAM size
+
+ * @Return none
+ */
+void gsi_get_inst_ram_offset_and_size(unsigned long *base_offset,
+ unsigned long *size);
+
/*
* Here is a typical sequence of calls
*
@@ -1227,9 +1240,15 @@ static inline int gsi_configure_regs(phys_addr_t gsi_base_addr, u32 gsi_size,
{
return -GSI_STATUS_UNSUPPORTED_OP;
}
+
static inline int gsi_enable_fw(phys_addr_t gsi_base_addr, u32 gsi_size)
{
return -GSI_STATUS_UNSUPPORTED_OP;
}
+
+static inline void gsi_get_inst_ram_offset_and_size(unsigned long *base_offset,
+ unsigned long *size)
+{
+}
#endif
#endif