OSDN Git Service

ARM: dts: ipq4019: Add TZ and SMEM reserved regions
authorSven Eckelmann <sven.eckelmann@openmesh.com>
Wed, 18 Apr 2018 07:32:59 +0000 (09:32 +0200)
committerAndy Gross <andy.gross@linaro.org>
Mon, 14 May 2018 20:17:59 +0000 (15:17 -0500)
The QSEE (trustzone) is started on IPQ4019 before Linux is started.
According to QCA, it is placed in in the the memory region
0x87e80000-0x88000000 and must not be accessed directly. There is an
additional memory region 0x87e00000-0x87E80000 smem which which can be used
for communication with the TZ. The driver for the latter is not yet ready
but it is still not allowed to use this memory region like any other
memory region.

Not reserving this memory region either leads to kernel crashes, kernel
hangs (often during the boot) or bus errors for userspace programs. The
latter happens when a program is using a memory region which is mapped to
these physical memory regions.

  [  571.758058] Unhandled fault: imprecise external abort (0xc06) at 0x01715ff8
  [  571.758099] pgd = cebec000
  [  571.763826] [01715ff8] *pgd=8e7fa835, *pte=87e7f75f, *ppte=87e7fc7f
  Bus error

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
arch/arm/boot/dts/qcom-ipq4019.dtsi

index 10d112a..b25daf3 100644 (file)
        compatible = "qcom,ipq4019";
        interrupt-parent = <&intc>;
 
+       reserved-memory {
+               #address-cells = <0x1>;
+               #size-cells = <0x1>;
+               ranges;
+
+               smem_region: smem@87e00000 {
+                       reg = <0x87e00000 0x080000>;
+                       no-map;
+               };
+
+               tz@87e80000 {
+                       reg = <0x87e80000 0x180000>;
+                       no-map;
+               };
+       };
+
        aliases {
                spi0 = &spi_0;
                i2c0 = &i2c_0;