Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85854584 authored by Nurit Lichtenstein's avatar Nurit Lichtenstein
Browse files

soc: qcom: pil: allow subsystem to allocate extra memory



Allow the subsystem to use some extra memory allocated
after the end of the image, for the subsystem to use.

This is porting from Kona of commit SHA:1279fb070282.

Change-Id: I79d19c9e48b7893d10ac814fb42e5783651417b4
Signed-off-by: default avatarNurit Lichtenstein <nuritl@codeaurora.org>
parent 70c723e2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* 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;
};

/**
+6 −0
Original line number Diff line number Diff line
@@ -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;