From patchwork Thu Mar 1 13:58:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 130227 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2828091edc; Thu, 1 Mar 2018 05:58:25 -0800 (PST) X-Google-Smtp-Source: AG47ELt2vJvWA/onuovh2CPKCu3VEiPROoFPI6r3cN0xYHiXvtjZ/yfk1hE/b87eVwpeC2ws4PbT X-Received: by 2002:a17:902:501:: with SMTP id 1-v6mr1991710plf.283.1519912704910; Thu, 01 Mar 2018 05:58:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519912704; cv=none; d=google.com; s=arc-20160816; b=COTdnvgTujtWNdovTrnFFkabDVtEH+rqxGQwmVzP/8mORnrZc+7gktCTkrUupysceg tXwABvJT5/qC+EgXTzZmPsFzK+ODQLBYKvMNTI2UB/sC1V9of8igUukB+1zxtO2wgR+1 7TVd3CcOCWekFJ5OdwvXzACezdR6Pj6ppCniWsEyvMin8zjgxDTGd/o5sOjaEYDkpEaX 08jMxBNaD4YCHWlKhKiKRsVdf5F5C5vpW3sgg7hutNeon+TjloG/DG55LfMkcv0Bw0vw pUpjjNvCP8hcrJJjqfa6qkIYOVVk01pKMIbF+Ykr+kzvA1xlbmp4DfUaymx6X1K8EnND hr9w== 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=gPJp+kViru8cJDFgSkyOk8ix0+1QUL2U2tU5FNbimxQ=; b=uz/GkBhArmKKc0FXt0ZG1GurjvfYPHeK3/Zjd1d2J2a2XYXaQPjPXs/nm4PIA/vPMi zC2Icbbm+VTxbb7zr4kZQQYsEzXsCm5BbVH4hEziAqTAz6jZnL4krFsNXAsALybCd14G Z1JVoucBOWlaGUTZc0neeN0yQYKtCryHQmFpsR7xMI8W6+0hapBOo0uUOiCa9p3cdHEf 28+yfh4dJs8tHJDMXs1T2toP419YrPY5d32c3FBGUfL0MeP8QWX4PWWJb48wOcOgUYdP m8JmQeoFyLDxB4/ZVbq3k0T/WzTctWW8j7S8LctVMA6o6aK32CNaa/QyeHLJrdNu0Q8A bW0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aVK7dkAW; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 z96-v6si3100668plh.35.2018.03.01.05.58.24; Thu, 01 Mar 2018 05:58:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aVK7dkAW; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030848AbeCAN6X (ORCPT + 6 others); Thu, 1 Mar 2018 08:58:23 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:40481 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030826AbeCAN6W (ORCPT ); Thu, 1 Mar 2018 08:58:22 -0500 Received: by mail-wr0-f193.google.com with SMTP id o76so6310970wrb.7 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=I+UMEQPSl7kZH4l05xuUWHP8Cd+SvY/SU1uydi5JIRNVPMdmj82bjCCVd/2R6hEW3p ShzpBvHGljRLNCUFdl+GddltX0s6eq/komHy3m+9fNMEF2YEaHkYAGoOrlq3gPHTsDWV ZxJzN8dfOLlz2IjDUkzsdvwDOLLb+lDv2lPxWdqVWg7qbE/p+tFJhnUBLOjuUk0vbtLu p5ghGAlpubd0KABtLSGnW4KirodNjli+iqoiuDWS1C293Xf5JcDUazDaTEm4CezxanMI GBua1/XFTx1MRnta1QpUw56rab/9ffJ88euqv5G4GpjpnQLFq5hkP1YRZfAkzCjpFNjX B1lA== X-Gm-Message-State: APf1xPDv0OnVEHFL6XNPYC6Wmb5tQxuT3DGiXIeCKI+grkvPa/mOuZaN dg+R2vFPBCJsmuE5KU1ust/fYA== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html