From c83b219d61a8c891bbddef2c870732be7eafa868 Mon Sep 17 00:00:00 2001 From: Ghanim Fodi Date: Tue, 24 Jan 2017 15:42:30 +0200 Subject: 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 --- include/linux/msm_gsi.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include/linux') 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 -- cgit v1.2.3