From ec5018042362e15596d99dccc30c7ae5867a1e54 Mon Sep 17 00:00:00 2001 From: Hrishabh Rajput Date: Wed, 14 May 2025 15:13:00 +0530 Subject: [PATCH] ARM: dts: msm: Move to CMA for VM Memory on Parrot Move from carveouts to reusable CMA for VM memory on Parrot. Change-Id: Ie624a9446a1cc64d0ae086352a0841e8a098e059 Signed-off-by: Hrishabh Rajput --- qcom/parrot-reserved-memory.dtsi | 27 ++++++++++----------------- qcom/parrot.dtsi | 19 ++++++++++++++----- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/qcom/parrot-reserved-memory.dtsi b/qcom/parrot-reserved-memory.dtsi index 33496207..0e09ed33 100644 --- a/qcom/parrot-reserved-memory.dtsi +++ b/qcom/parrot-reserved-memory.dtsi @@ -135,25 +135,18 @@ }; trust_ui_vm_mem: trust_ui_vm_region@e0c00000 { - no-map; - reg = <0x0 0xe0c00000 0x0 0x49f3000>; + compatible = "shared-dma-pool"; + reg = <0x0 0xe0c00000 0x0 0x4c00000>; + reusable; + alignment = <0x0 0x400000>; }; - trust_ui_vm_qrtr: trust_ui_vm_qrtr@e55f3000 { - no-map; - reg = <0x0 0xe55f3000 0x0 0x9000>; - }; - - trust_ui_vm_vblk0_ring: trust_ui_vm_vblk0_ring@e55fc000 { - no-map; - reg = <0x0 0xe55fc000 0x0 0x4000>; - gunyah-label = <0x11>; - }; - - trust_ui_vm_swiotlb: trust_ui_vm_swiotlb@e5600000 { - no-map; - reg = <0x0 0xe5600000 0x0 0x100000>; - gunyah-label = <0x12>; + vm_comm_mem: vm_comm_mem_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x400000>; }; tz_stat_mem: tz_stat_region@e8800000 { diff --git a/qcom/parrot.dtsi b/qcom/parrot.dtsi index b01a2cc7..a54095f8 100644 --- a/qcom/parrot.dtsi +++ b/qcom/parrot.dtsi @@ -2051,9 +2051,19 @@ qcom,msgq-names = "trusted_vm"; }; - trust_ui_vm: qcom,trust_ui_vm@e55fc000 { - reg = <0xe55fc000 0x104000>; + trust_ui_vm_vblk0_ring: trust_ui_vm_vblk0_ring { + size = <0x4000>; + gunyah-label = <0x11>; + }; + + trust_ui_vm_swiotlb: trust_ui_vm_swiotlb { + size = <0x100000>; + gunyah-label = <0x12>; + }; + + trust_ui_vm: qcom,trust_ui_vm { vm_name = "trustedvm"; + shared-buffers-size = <0x104000>; shared-buffers = <&trust_ui_vm_vblk0_ring &trust_ui_vm_swiotlb>; }; @@ -2068,7 +2078,7 @@ qcom,vmid = <45>; qcom,guest-cpus = "5-6"; qcom,firmware-name = "trustedvm"; - memory-region = <&trust_ui_vm_mem>; + memory-region = <&trust_ui_vm_mem &vm_comm_mem>; virtio-backends = <&trust_ui_vm_virt_be0>; }; @@ -2082,12 +2092,11 @@ ext-label = <0x7>; }; - qrtr-gunyah { + trust_ui_vm_qrtr: qcom,qrtr-gunyah-tuivm { compatible = "qcom,qrtr-gunyah"; qcom,master; gunyah-label = <3>; peer-name = <2>; - shared-buffer = <&trust_ui_vm_qrtr>; }; qcom,mpm2-sleep-counter@c221000 {