Received: by 10.223.185.116 with SMTP id b49csp7458269wrg; Thu, 1 Mar 2018 06:00:08 -0800 (PST) X-Google-Smtp-Source: AG47ELvP+uvAfZpl1+8Qj9xBGMWP1kkNLas+PHqEiUJGbjeCXdwRjA/iot6BsCXwaQslUDYz23aq X-Received: by 10.99.132.74 with SMTP id k71mr1610482pgd.4.1519912808713; Thu, 01 Mar 2018 06:00:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519912808; cv=none; d=google.com; s=arc-20160816; b=qxu5w2xTV+UGDmmXHYDCSCP/D/4axTYVsJwi+Rzijz4kMUONbWGvzYSHM6TYkL14ws WE0tpfuJ9KVNxUWvkdQ0/h/w/Cxq6aFCPx24T2rDw8HEKTa/M0LY1GnvdYW9ocK0tGKa 2qUJHxFRdVO08BtPSKx6zMhNJA0ejC/dTt89D8y0ESEcor6VZOj8nDCiJkic8eU513yd 8Pt0Q6gReFBLTDIJXaBsVF0hfmQhjtjec0ZXFP2Hgx30pHifwnjNTN2tBKdVkhK6z5Bw 5f0G60fVMwmoD1kXR7hAjmKwZ60qBoDQgQM4iC7pd/VG2l/j79CG8K2jbF08JOVyeC0D 3Eew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=2YwFrL5b+mCSf/Khb9UR8A92hIZmK2kh6sQb26idOAc=; b=uXlIIHrNvM238gQRgx5wjG9JaPjcb2qYxeZ8pB9dGAt9jNjetbdiQ7HOBFHaOB6BEm ks1viNqVvCbzuoZZT+cNiUVmxHN++01Zs9YHV9kNY51EGyeRVqq+fL4r5xnjxNT2j42b boBfx3SHVVhQCPQ9saxZO+MezHir74EevvOif4RrWh+UR008XCAQ67e5RDLAuRE5Rygk qQ3HRsDqbx8tsgeyV7w6RGaJto9oFXR3KVw0k0lieAT3R3zN2I+TnLTihxGF+tBaQ3Vy NZL/JyrNmY4LsSv6RmNFt7cGDbpuNkajGSGISci4m1EBEnnJp/fIXAfTWzdnjTVsJfSJ XbDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aVK7dkAW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c65si3030302pfa.93.2018.03.01.05.59.54; Thu, 01 Mar 2018 06:00:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aVK7dkAW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030949AbeCAN6Y (ORCPT + 99 others); Thu, 1 Mar 2018 08:58:24 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:39456 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030833AbeCAN6W (ORCPT ); Thu, 1 Mar 2018 08:58:22 -0500 Received: by mail-wr0-f193.google.com with SMTP id w77so6317417wrc.6 for ; Thu, 01 Mar 2018 05:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=2YwFrL5b+mCSf/Khb9UR8A92hIZmK2kh6sQb26idOAc=; b=aVK7dkAWGI6ybbLxm2aTVJpyynsXGwQRMH0h2K6qu0+ESz4RjdUKvoHUrpZFIDL8HB WCDe/5z1AFOPMx5EPlehJ5R4RN8xs6pPTWmGsKr5zJExxVTeQ0xzvIoTcXNfYKOLGaXL vnlII3sqLVvhlJX4MMZloT+YBsN7CaS/YY/dQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2YwFrL5b+mCSf/Khb9UR8A92hIZmK2kh6sQb26idOAc=; b=VMAINaDUUW6XOfCABvWuPiPYY5l7DMXNMGhMf5DNVdswo9XTv1q/dLZC84tvORDntW R1HY9qc99VxKy8qoDlXithEMcWubvsRaqSA24YNkPP185eHClAywz+K5ups3+TZfft1+ 8LM3EVuO/+HUUsJE++rIKgFdtOnnIyMYXoapJkp6n5KCdEDuGtKwXnnG3QbkjMpuhJ7x UY8d4qwXzbd2zv/BLpbxjHUBD3W0pMPG0Cooxcx+fN4Oncmg+YSjDLUs/wV1X/v29SKN QRbVF8cLIGP2tTJ0Hh7hobO0iUpYC/jCjUdmR4se7NnvCKpsN7qhHWMbVxw0Hb07epLe g/5g== X-Gm-Message-State: APf1xPDa+ci0oiFzEBcV2uedOCe+ELARBXjbq+P026P8pDFmNsqLukNu W2bZnvjAEqt2zw0BUOld/rjJMQ== X-Received: by 10.223.170.153 with SMTP id h25mr1821806wrc.236.1519912701209; Thu, 01 Mar 2018 05:58:21 -0800 (PST) Received: from lmecxl0911.lme.st.com ([80.215.14.109]) by smtp.gmail.com with ESMTPSA id e6sm3826304wra.67.2018.03.01.05.58.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 05:58:20 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: robh+dt@kernel.org, mark.rutland@arm.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, robin.murphy@arm.com, arnd@arndb.de, loic.pallardy@st.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v2 0/2] STM32 Extended TrustZone Protection driver Date: Thu, 1 Mar 2018 14:58:04 +0100 Message-Id: <20180301135806.19982-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On early boot stages STM32MP1 platform is able to dedicate some hardware blocks to a secure OS running in TrustZone. We need to avoid using those hardware blocks on non-secure context (i.e. kernel) because read/write accesses could generate illegale access exceptions. Extended TrustZone Protection driver make sure that device is disabled if non-secure world can't acces to it. version 2: - do not use notifier anymore - change status property value in device-tree if needed - use a list of phandle instead of hard coded array NOTE: Those patches should be applied only on git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next until this patch: https://lkml.org/lkml/2018/2/26/386 find it way to mainline because KBuild will complain about them. Benjamin Gaignard (2): dt-bindings: stm32: Add bindings for Extended TrustZone Protection ARM: mach-stm32: Add Extended TrustZone Protection driver .../bindings/arm/stm32/st,stm32mp1-etzpc.txt | 25 +++++ arch/arm/mach-stm32/Kconfig | 7 ++ arch/arm/mach-stm32/Makefile | 1 + arch/arm/mach-stm32/stm32-etzpc.c | 116 +++++++++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/stm32/st,stm32mp1-etzpc.txt create mode 100644 arch/arm/mach-stm32/stm32-etzpc.c -- 2.15.0