diff --git a/drivers/soc/qcom/peripheral-loader.h b/drivers/soc/qcom/peripheral-loader.h index 0965b21ea0e9..137341e19409 100644 --- a/drivers/soc/qcom/peripheral-loader.h +++ b/drivers/soc/qcom/peripheral-loader.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2010-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2010-2020, The Linux Foundation. All rights reserved. */ #ifndef __MSM_PERIPHERAL_LOADER_H #define __MSM_PERIPHERAL_LOADER_H @@ -62,6 +62,7 @@ struct pil_desc { int minidump_id; int *aux_minidump_ids; int num_aux_minidump_ids; + u32 extra_size; }; /** diff --git a/drivers/soc/qcom/subsys-pil-tz.c b/drivers/soc/qcom/subsys-pil-tz.c index a59bea9666d2..da7067319856 100644 --- a/drivers/soc/qcom/subsys-pil-tz.c +++ b/drivers/soc/qcom/subsys-pil-tz.c @@ -617,6 +617,7 @@ static int pil_mem_setup_trusted(struct pil_desc *pil, phys_addr_t addr, if (d->subsys_desc.no_auth) return 0; + size += pil->extra_size; scm_ret = qcom_scm_pas_mem_setup(d->pas_id, addr, size); return scm_ret; @@ -1349,6 +1350,11 @@ static int pil_tz_generic_probe(struct platform_device *pdev) } } + rc = of_property_read_u32(pdev->dev.of_node, "qcom,extra-size", + &d->desc.extra_size); + if (rc) + d->desc.extra_size = 0; + d->dev = &pdev->dev; d->desc.dev = &pdev->dev; d->desc.owner = THIS_MODULE;