From acc82f336404f340557ed87ff2419c5a00379ec0 Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 20 Apr 2020 16:07:11 -0700 Subject: [PATCH 1/4] ARM: dts: msm: Add neuron block service for lahaina Add node for the neuron block service, which will be configured to act as the server for the block protocol. This configuration uses a reserved memory region to act as shared memory. Change-Id: I672eb7bb70cda3fcc310a263ec8acacd0c6db00e --- qcom/lahaina.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index a38cdcb80ab9..019d2a450657 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -409,7 +409,17 @@ pil_trustedvm_mem: pil_trustedvm_region@d0800000 { no-map; - reg = <0x0 0xd0800000 0x0 0x8000000>; + reg = <0x0 0xd0800000 0x0 0x7700000>; + }; + + chan0_shbuf: neuron_block@0 { + no-map; + reg = <0x0 0xd7f00000 0x0 0x80000>; + }; + + chan1_shbuf: neuron_block@1 { + no-map; + reg = <0x0 0xd7f80000 0x0 0x80000>; }; trustedvm_trace_buffer: trustedvm_trace_region@d8800000 { @@ -2093,6 +2103,42 @@ #mbox-cells = <2>; }; + qcom,svm_neuron_block { + compatible = "qcom,neuron-service"; + #address-cells = <1>; + #size-cells = <0>; + protocol { + compatible = "qcom,neuron-protocol-block"; + processes = "server"; + }; + + application { + compatible = "qcom,neuron-block-server"; + }; + + channel@0 { + compatible = "qcom,neuron-channel-haven-shmem"; + reg = <0>; + class = "message-queue"; + direction = "receive"; + max-size = <0 65536>; + shared-buffer = <&chan0_shbuf>; + qcom,primary; + haven-label = <1>; + }; + + channel@1 { + compatible = "qcom,neuron-channel-haven-shmem"; + reg = <1>; + class = "message-queue"; + direction = "send"; + max-size = <0 65536>; + shared-buffer = <&chan1_shbuf>; + qcom,primary; + haven-label = <2>; + }; + }; + qcom,qsee_ipc_irq_bridge { compatible = "qcom,qsee-ipc-irq-bridge"; From d67d0118f7c6028cfb90d1ca3e53513a5e42c2fa Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 20 Apr 2020 16:07:17 -0700 Subject: [PATCH 2/4] ARM: dts: msm: Add neuron block service for trusted vm Add node for the neuron block service, which will be configured to act as the client for the block protocol. This configuration uses a reserved memory region. Change-Id: I7d3289469a867a6be144ddbdaf7e44bf1bf7e7f4 --- qcom/trustedvm.dtsi | 55 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/qcom/trustedvm.dtsi b/qcom/trustedvm.dtsi index 8767a7d5e240..42cb3fa39c96 100644 --- a/qcom/trustedvm.dtsi +++ b/qcom/trustedvm.dtsi @@ -42,9 +42,60 @@ compatible = "qcom,mem-buf"; }; - memory@28000000 { + memory@28800000 { device_type = "memory"; - reg = <0x0 0x28000000 0x0 0x8000000>; /* Temp S2 mapping */ + reg = <0x0 0x28800000 0x0 0x7700000>; /* Temp S2 mapping */ + }; + + reserved_memory: reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + chan0_shbuf: neuron-block@0 { + no-map; + reg = <0x0 0x2ff00000 0x0 0x80000>; + }; + + chan1_shbuf: neuron-block@1 { + no-map; + reg = <0x0 0x2ff80000 0x0 0x80000>; + }; + }; + + neuron-client-block { + compatible = "qcom,neuron-service"; + #address-cells = <1>; + #size-cells = <0>; + + protocol { + compatible = "qcom,neuron-protocol-block"; + processes = "client"; + }; + + application { + compatible = "qcom,neuron-block-client"; + }; + + channel@0 { + reg = <0>; + compatible = "qcom,neuron-channel-haven-shmem"; + class = "message-queue"; + direction = "send"; + max-size = <0 65536>; + shared-buffer = <&chan0_shbuf>; + haven-label = <1>; + }; + + channel@1 { + reg = <1>; + compatible = "qcom,neuron-channel-haven-shmem"; + class = "message-queue"; + direction = "receive"; + max-size = <0 65536>; + shared-buffer = <&chan1_shbuf>; + haven-label = <2>; + }; }; qcom,vm-config { From 6dcd2cb8b7194d88f7f5dce40f04d491f751ed24 Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 20 Apr 2020 16:07:21 -0700 Subject: [PATCH 3/4] ARM: dts: msm: Add qrtr haven for lahaina Add node to enable qrtr ptotocol over the haven transport for inter-virtual machine communication. Change-Id: Ife856e0484db1741e9a663736c91a8a4ee4cbe6e --- qcom/lahaina.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index 019d2a450657..86b65172a02f 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -409,7 +409,12 @@ pil_trustedvm_mem: pil_trustedvm_region@d0800000 { no-map; - reg = <0x0 0xd0800000 0x0 0x7700000>; + reg = <0x0 0xd0800000 0x0 0x76f7000>; + }; + + qrtr_shbuf: qrtr-shmem { + no-map; + reg = <0x0 0xd7ef7000 0x0 0x9000>; }; chan0_shbuf: neuron_block@0 { @@ -2152,6 +2157,13 @@ }; }; + qrtr-haven { + compatible = "qcom,qrtr-haven"; + qcom,master; + haven-label = <3>; + shared-buffer = <&qrtr_shbuf>; + }; + jtag_mm0: jtagmm@7040000 { compatible = "qcom,jtagv8-mm"; reg = <0x7040000 0x1000>; From f1c54f0a62c8fb781737d67e82f857d31ce41d57 Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Tue, 21 Apr 2020 16:48:25 -0700 Subject: [PATCH 4/4] ARM: dts: msm: Add qrtr haven for trusted vm Add qrtr node for trusted vm to enable IPC Router protocol communication for the trusted vm. Change-Id: Ia4b82cc8f75df2ba71408d8e328a115850e90c67 --- qcom/trustedvm.dtsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qcom/trustedvm.dtsi b/qcom/trustedvm.dtsi index 42cb3fa39c96..b520e196ca45 100644 --- a/qcom/trustedvm.dtsi +++ b/qcom/trustedvm.dtsi @@ -44,7 +44,7 @@ memory@28800000 { device_type = "memory"; - reg = <0x0 0x28800000 0x0 0x7700000>; /* Temp S2 mapping */ + reg = <0x0 0x28800000 0x0 0x76f7000>; /* Temp S2 mapping */ }; reserved_memory: reserved-memory { @@ -52,6 +52,11 @@ #size-cells = <2>; ranges; + qrtr_shbuf: qrtr-shmem { + no-map; + reg = <0x0 0x2fef7000 0x0 0x9000>; + }; + chan0_shbuf: neuron-block@0 { no-map; reg = <0x0 0x2ff00000 0x0 0x80000>; @@ -98,6 +103,12 @@ }; }; + qrtr-haven { + compatible = "qcom,qrtr-haven"; + haven-label = <3>; + shared-buffer = <&qrtr_shbuf>; + }; + qcom,vm-config { compatible = "qcom,vm-1.0"; vm-type = "aarch64-guest";