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

Commit 5265f5ed authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

msm: ADSPRPC: Restrict access to hyp_assign_phys calls



Block hyp_assign_phys calls, if the restrict access
flag is defined in the device specific file.

Change-Id: Ie546e748169dda51af4ab5f017581bbda2cc7081
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 0abd32ff
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -86,9 +86,11 @@ Remote Heap:
Required properties:
- compatible : Must be "qcom,msm-adsprpc-mem-region"
- memory-region : CMA region which is owned by this device
- restrict-access : Blocking vote for hyp_assign_phys function call

Example:
       qcom,adsprpc-mem {
               compatible = "qcom,msm-adsprpc-mem-region";
               memory-region = <&adsp_mem>;
               restrict-access;
       };
+2 −1
Original line number Diff line number Diff line
@@ -3216,7 +3216,8 @@ static int fastrpc_probe(struct platform_device *pdev)
				break;
			}
		}
		if (range.addr) {
		if (range.addr && !of_property_read_bool(dev->of_node,
							 "restrict-access")) {
			int srcVM[1] = {VMID_HLOS};
			int destVM[4] = {VMID_HLOS, VMID_MSS_MSA, VMID_SSC_Q6,
						VMID_ADSP_Q6};