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

Commit ae62e960 authored by Patrick Daly's avatar Patrick Daly Committed by Gerrit - the friendly Code Review server
Browse files

ion: util: Add permission settings for CDSP



Give CDSP memory execute permssion. This should be fixed to
not be hardcoded in the future.

Change-Id: I9193234f40c32eaadae75950e58dc806d699dcf4
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent e59d2258
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -148,6 +148,8 @@ int ion_hyp_assign_sg(struct sg_table *sgt, int *dest_vm_list,
	for (i = 0; i < dest_nelems; i++) {
		if (dest_vm_list[i] == VMID_CP_SEC_DISPLAY)
			dest_perms[i] = PERM_READ;
		else if (dest_vm_list[i] == VMID_CP_CDSP)
			dest_perms[i] = PERM_READ | PERM_WRITE | PERM_EXEC;
		else
			dest_perms[i] = PERM_READ | PERM_WRITE;
	}
@@ -267,6 +269,8 @@ int ion_hyp_assign_from_flags(u64 base, u64 size, unsigned long flags)
	for (i = 0; i < nr; i++)
		if (vmids[i] == VMID_CP_SEC_DISPLAY)
			modes[i] = PERM_READ;
		else if (vmids[i] == VMID_CP_CDSP)
			modes[i] = PERM_READ | PERM_WRITE | PERM_EXEC;
		else
			modes[i] = PERM_READ | PERM_WRITE;