From patchwork Fri Aug 30 07:03:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 13784400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA36DCA0EE6 for ; Fri, 30 Aug 2024 07:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xfKg3et82GR8Ut+Mah5KVc5YDnZncDhvNa0IoupXc1A=; b=Kt1D3mA/BlU6Jj5D4Dz6Rh4K3y ww/ez/lvtKlK6M64DEpUnOJ8LZlnS1beH8n987ZD8km+ruMTdlAlbqmJNyTtaJZuNa+2IZfqFsF1S xdoWPkWdV1nqOubpY7Mj+BJW2vnX8ccMpvpe+HjZGAbK65jlj3iHyHbqNy7JRqWFsZJ3EpT3SITG3 +i35iNZw/2yfXSuwqKnv/YIrbTyrzH4+PdODw8kwebz0WZx8rSo+a7XibLgS5fIvSWdRw6Y9P1t0U x4UTm53TW3b8N/Ov4Monr52Hhj8WUr8f0nypRpL+pE1XPrYcJgRYIPeNc6l+WR7fFbw72+WXmgSgW nAgpmZ2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjvjQ-000000053GV-3v5r; Fri, 30 Aug 2024 07:07:41 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjvgY-000000052Gv-49cL for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 07:04:44 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a83562f9be9so161875666b.0 for ; Fri, 30 Aug 2024 00:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725001481; x=1725606281; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xfKg3et82GR8Ut+Mah5KVc5YDnZncDhvNa0IoupXc1A=; b=OOrIqqWXApOcXZCAXjJPF073o4SG1mvB3HoUWEO0QB9VumhJeRAwfLPK3V1YNRhqBl ST//GcfcB0wH7XlqWJXbOUdsqnPmFLTwpMXpsI6Y41SMIU08rYllvXlmzvqOZt7pO3sM iTCccOUv4DVFJ8ijp/LaNDxZ2sEfmAulvrpkSEoNSAyzivhN1UfPPLrQwuOOVnv6BKM9 40xb4FwLXKHv5h/E3SCDHZjTqD6H0cN7Fgz77n4WSlg4CStY7CwZiWaIRuMO8RpdgtkH Mw70V8sjVyZ8H4wcIEZXFa9jXrM2S8Fl9KUs3anmIp5FtfftP6T3MycZnHwfe+2l/7Bt bQgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725001481; x=1725606281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xfKg3et82GR8Ut+Mah5KVc5YDnZncDhvNa0IoupXc1A=; b=S01GLOi5uUGDozckdUScI5gPZDidtBmtdfSY4nVARYNA4TyYUw2HyvlTNkqeEp55g+ XDLh1i2ZmdzEX5Tq+glnIfQcPtHaED2PApOlJ78C5/ZaYIN+jDpeSSsZ6VuZmuAaiQxp KatlEvlVN0DkVZqnNHXePWdnmwou2wJL2vi44Ra9aZ5PULdX3RS3iuLUzaozf9Bcy9KE iKfedjQoMjrkoP7x5rO4uL8pAnEPTB//qyNANBA2u4YMJDIqRuJQCxZs1pmOO904Cc4w 4Z43iA8zPj4q53xu4wjJgGXSpowdG7ySX0fwxzqow+TMUcFKKaHRB8qag2kMe3yYAoEn 9QKA== X-Forwarded-Encrypted: i=1; AJvYcCWlynXPjXmjy7jEZqRn/bSJjSYRExhc5VHiCyChJNWu+pcNNuOfgdBGiJOFFBiq94cVjUOlKHj5GDtTnm7+2zC1@lists.infradead.org X-Gm-Message-State: AOJu0YySfmOjGcUV5XbTqUuAFlkHsx16hRyXBpAAuySAjlXMVYtOkKVv gVMPrtMGEI8dUWhyz1i3E5VUl8IPxgUMubbgJZ2NtsC3UuBkjnvx0N7OEb85Cw4= X-Google-Smtp-Source: AGHT+IECnqDtOxbvfOy9sPbk0lCyiNAqNWYzneroZfijzEEU+LtepnDur/LFnUatGwBb6xPr3tERGg== X-Received: by 2002:a17:907:6d0a:b0:a86:7f6a:8779 with SMTP id a640c23a62f3a-a897fad4d42mr418259566b.57.1725001481050; Fri, 30 Aug 2024 00:04:41 -0700 (PDT) Received: from rayden.urgonet (h-217-31-164-171.A175.priv.bahnhof.se. [217.31.164.171]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a89892232c7sm178026866b.222.2024.08.30.00.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 00:04:40 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, op-tee@lists.trustedfirmware.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: Olivier Masse , Thierry Reding , Yong Wu , Sumit Semwal , Benjamin Gaignard , Brian Starkey , John Stultz , "T . J . Mercier" , =?utf-8?q?Christian_K=C3=B6nig?= , Sumit Garg , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jens Wiklander Subject: [RFC PATCH 3/4] dt-bindings: reserved-memory: add linaro,restricted-heap Date: Fri, 30 Aug 2024 09:03:50 +0200 Message-Id: <20240830070351.2855919-4-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240830070351.2855919-1-jens.wiklander@linaro.org> References: <20240830070351.2855919-1-jens.wiklander@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_000443_112326_B0249C0A X-CRM114-Status: GOOD ( 14.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Olivier Masse DMABUF reserved memory definition for OP-TEE secure data path feature. Signed-off-by: Olivier Masse Signed-off-by: Jens Wiklander --- .../linaro,restricted-heap.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/reserved-memory/linaro,restricted-heap.yaml diff --git a/Documentation/devicetree/bindings/reserved-memory/linaro,restricted-heap.yaml b/Documentation/devicetree/bindings/reserved-memory/linaro,restricted-heap.yaml new file mode 100644 index 000000000000..0ab87cf02775 --- /dev/null +++ b/Documentation/devicetree/bindings/reserved-memory/linaro,restricted-heap.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reserved-memory/linaro,restricted-heap.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Linaro Secure DMABUF Heap + +maintainers: + - Olivier Masse + +description: + Linaro OP-TEE firmware needs a reserved memory for the + Secure Data Path feature (aka SDP). + The purpose is to provide a restricted memory heap which allow + the normal world OS (REE) to allocate/free restricted buffers. + The TEE is reponsible for protecting the SDP memory buffers. + TEE Trusted Application can access restricted memory references + provided as parameters (DMABUF file descriptor). + +allOf: + - $ref: "reserved-memory.yaml" + +properties: + compatible: + const: linaro,restricted-heap + + reg: + description: + Region of memory reserved for OP-TEE SDP feature + + no-map: + $ref: /schemas/types.yaml#/definitions/flag + description: + Avoid creating a virtual mapping of the region as part of the OS' + standard mapping of system memory. + +unevaluatedProperties: false + +required: + - compatible + - reg + - no-map + +examples: + - | + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + + sdp@3e800000 { + compatible = "linaro,restricted-heap"; + no-map; + reg = <0 0x3E800000 0 0x00400000>; + }; + };