summaryrefslogtreecommitdiff
path: root/drivers/soc/qcom/peripheral-loader.c
diff options
context:
space:
mode:
authorAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>2017-09-05 17:43:35 +0530
committerNaitik Bharadiya <bharad@codeaurora.org>2019-10-17 11:14:45 +0530
commita19e5e98f426fcff126a3b9aa30ef0fa483387fe (patch)
treed58271cfc0ff8a50e82cf6a504a0d17a06a02a52 /drivers/soc/qcom/peripheral-loader.c
parenta8e92fae3a9de72877cfbd2f8b84a0d539413eb1 (diff)
soc: qcom: Reorganize PIL code for reclaiming MSS mem during SSR
This change ask hypervisor to remove memory mapping for MSS from IOMMU second stage table and assign the ownership back to HLOS just after MBA is booted. Presently this is being done only after MBA is booted and MDT is authenticated. Change-Id: I724c1bcc664827e666612dd34cd078f3f044498a Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Diffstat (limited to 'drivers/soc/qcom/peripheral-loader.c')
-rw-r--r--drivers/soc/qcom/peripheral-loader.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/soc/qcom/peripheral-loader.c b/drivers/soc/qcom/peripheral-loader.c
index 32a457730869..2a3b2a313c69 100644
--- a/drivers/soc/qcom/peripheral-loader.c
+++ b/drivers/soc/qcom/peripheral-loader.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2019, 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
@@ -980,7 +980,9 @@ int pil_boot(struct pil_desc *desc)
trace_pil_event("before_init_image", desc);
if (desc->ops->init_image)
- ret = desc->ops->init_image(desc, fw->data, fw->size);
+ ret = desc->ops->init_image(desc, fw->data, fw->size,
+ priv->region_start,
+ priv->region_end - priv->region_start);
if (ret) {
pil_err(desc, "Initializing image failed(rc:%d)\n", ret);
subsys_set_error(desc->subsys_dev, firmware_error_msg);
@@ -997,20 +999,6 @@ int pil_boot(struct pil_desc *desc)
}
if (desc->subsys_vmid > 0) {
- /**
- * In case of modem ssr, we need to assign memory back to linux.
- * This is not true after cold boot since linux already owns it.
- * Also for secure boot devices, modem memory has to be released
- * after MBA is booted
- */
- trace_pil_event("before_assign_mem", desc);
- if (desc->modem_ssr) {
- ret = pil_assign_mem_to_linux(desc, priv->region_start,
- (priv->region_end - priv->region_start));
- if (ret)
- pil_err(desc, "Failed to assign to linux, ret- %d\n",
- ret);
- }
ret = pil_assign_mem_to_subsys_and_linux(desc,
priv->region_start,
(priv->region_end - priv->region_start));