From patchwork Fri Oct 13 19:32:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 10005797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22B1F6037E for ; Fri, 13 Oct 2017 19:44:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14D7629137 for ; Fri, 13 Oct 2017 19:44:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07EF92914B; Fri, 13 Oct 2017 19:44:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 075D729137 for ; Fri, 13 Oct 2017 19:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dPZ9p3JWxWuAodU971QhJSj9n7CinKawcNB+O7vQooA=; b=Rdj3IVPPZjnh9+ rAzyR3leejhZuWWFJ5TjzqCn8/9KmhohAP3XeBzzajbB9PpYPT3XT0NUo1dLzg+r/p+dDrt6BJQgF bKOIvWX3eK2bSMgGF0vHqeTgBw+ucfFeu6O2msz4UEpiwSAejcF4uMAi/fBS59U+MrPeHZ7+2T7bO UYGY3IQiRPA+F3AymktVdutNB0G8s7YpfMQR2YcuI3S3vcS0n+a5HcbINUl3XPUDnJb4EC01ZSi01 4DhBH4PfWfGJ3NMUnua6gMab337j60fDL42E668Kx8en2agzp4y9fPBu6xfRWwt7KobsdEyh6mrpK WQ15LJaPd+YdisPG3aYQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e35sA-0006Nu-EM; Fri, 13 Oct 2017 19:43:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e35rX-0005dn-TB for linux-arm-kernel@bombadil.infradead.org; Fri, 13 Oct 2017 19:43:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NmgjnR4yMdO20dk4ZPIEXf0f92tT46hQgT7VtJRJJuY=; b=HVb3HNJQrb06QIUDjzBSH5xNm X5iqkazcnAWh/x0ohOirN+7nbDdGBQDX2MA2gmMsH1ncpZ4Ne9XWlGf2vW6GxruAYv/jBn3UMH+TR ShNtt/dxuLwpBLcqU8fUTogprgegV0p5NOxIQxxYVE+cRzg+4xPEIsFp1Gb4kbNiX+FvVl36QXZ74 275lemDe/KSlqVOLD4RA5X+bZOAwWQoUQG50mSjuuXxcz9VuNN7DCZwNJltLKpuDd6PmRgna+pzKv THw73rdRpKQhOeRJDT84M+1yh3mduL+uH/rH/50SjnoYDVnLOvo5B7BzBljOV6DwacCvPmTAvVt2j W7Y/v+5lA==; Received: from mail-he1eur01on0088.outbound.protection.outlook.com ([104.47.0.88] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e35iZ-00068S-Dq for linux-arm-kernel@lists.infradead.org; Fri, 13 Oct 2017 19:34:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NmgjnR4yMdO20dk4ZPIEXf0f92tT46hQgT7VtJRJJuY=; b=edKSztl978Nwxi2K6Aey3CSsywWeFJeEon0NcgHfpgY+s0SVBm0wiMuOLYk2fmO+cZchj/0/P+g5u4C4VM1qlPPygkWTfPXEWnw5B4uo1FCfng6MAhlESnAG5RwMkdTlTJ/jDIrSkLX30IFUdR54CQyemf3qDQH/XFtHgeVWPNQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.52) by DB6PR0301MB2135.eurprd03.prod.outlook.com (2603:10a6:4:46::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 19:33:34 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Fri, 13 Oct 2017 22:33:30 +0300 From: Volodymyr Babchuk To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org, Jens Wiklander Subject: [PATCH v1 05/14] tee: optee: Update protocol definitions Date: Fri, 13 Oct 2017 22:32:35 +0300 Message-Id: <1507923164-12796-6-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507923164-12796-1-git-send-email-volodymyr_babchuk@epam.com> References: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> <1507923164-12796-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.52] X-ClientProxiedBy: VI1P189CA0031.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::44) To DB6PR0301MB2135.eurprd03.prod.outlook.com (2603:10a6:4:46::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 898bc7af-b295-4130-e2e5-08d512714b8e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6PR0301MB2135; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0301MB2135; 3:ds/JSRfPYP59AtKEvWlIwleMPzb79Hs+8MV/AMR87pBgYJZdpznVqb/5dJxM0hJ6J/ggi9kYI4Faha0ddZz8cRkTG5xqKVXKiajUNxR3/ch+ZJb1AVWJILO9UoXwqC0fTTBQcvIOnBYTejjJNwMYByqqHk27tCUHnGtwIave9W9o/VcC7ZvPdG64mLjA4kMhYlFITn0ZER2MDv/cSetMylPesXECiF6NWszl5RiZZsCx7LP0aHxwCVDx3vwO+gAR; 25:EAiPh/xjNpax0ZZ2/tZfN15wInDb1HNkU9O3K0QHeC7OtM1rMQSqjGfuBE1zzuk+Lsw3sMzUWe9ihN5QytmIiO5qJAr/QcQb9/STDkqwkvVShDQ8ULZZZsFWEbZsabBp6l2IOXnCqHlXcv6+2JiIkRi1F7g+Y32kjLBjSONxzPu0X3wpK4Yv4f82IIeDDN30l428mWrCe1OdBCYtNryJtmo6jlPPjlsdpbJK5TI4QF/YAXAYELtBSgeBt8TsZNo7Vg4bg5WTvvGLto5mMJ7q+CSOYxTget2jmIu+I9OlQyWtLVG02xNKsOhyStMviTC9UL4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7OR8dYC380SKIS92xxmwC0zBEVJDdU6zYBD7jKAbk X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0301MB2135; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0301MB2135; X-Forefront-PRVS: 04599F3534 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(199003)(189002)(39060400002)(101416001)(107886003)(2950100002)(53936002)(6916009)(80792005)(76176999)(50986999)(5660300001)(72206003)(97736004)(48376002)(478600001)(50466002)(36756003)(305945005)(189998001)(122856001)(33646002)(7736002)(106356001)(86362001)(81156014)(81166006)(68736007)(50226002)(4326008)(316002)(66066001)(3846002)(8676002)(2906002)(105586002)(6116002)(8936002)(5003940100001)(47776003)(16586007)(42186006); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0301MB2135; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0301MB2135; 23:B0q6ADPH/DorhGip+xDQ78tEBX83DUQeZD1lcV+?= =?us-ascii?Q?J2ws6RqTY2O2piPU3hMCdAgRhVuOdEOdckTvO5YYb4hOJkwIKixoWWF3Z/mv?= =?us-ascii?Q?9QBqgu9E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epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 19:33:34.4646 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0301MB2135 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171013_203359_735998_751C1582 X-CRM114-Status: GOOD ( 21.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , volodymyr_babchuk@epam.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Volodymyr Babchuk There were changes in REE<->OP-TEE ABI recently. Now ABI allows us to pass non-contiguous memory buffers as list of pages to OP-TEE. This can be achieved by using new parameter attribute OPTEE_MSG_ATTR_NONCONTIG. OP-TEE also is able to use all non-secure RAM for shared buffers. This new capability is enabled with OPTEE_SMC_SEC_CAP_DYNAMIC_SHM flag. This patch adds necessary definitions to the protocol definition files at Linux side. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/optee_msg.h | 38 ++++++++++++++++++++++++++++++++------ drivers/tee/optee/optee_smc.h | 7 +++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/drivers/tee/optee/optee_msg.h b/drivers/tee/optee/optee_msg.h index dd7a06e..3050490 100644 --- a/drivers/tee/optee/optee_msg.h +++ b/drivers/tee/optee/optee_msg.h @@ -67,11 +67,32 @@ #define OPTEE_MSG_ATTR_META BIT(8) /* - * The temporary shared memory object is not physically contigous and this - * temp memref is followed by another fragment until the last temp memref - * that doesn't have this bit set. + * Pointer to a list of pages used to register user-defined SHM buffer. + * Used with OPTEE_MSG_ATTR_TYPE_TMEM_*. + * buf_ptr should point to the beginning of the buffer. Buffer will contain + * list of page addresses. OP-TEE core can reconstruct contiguous buffer from + * that page addresses list. Page addresses are stored as 64 bit values. + * Last entry on a page should point to the next page of buffer. + * Every entry in buffer should point to a 4k page beginning (12 least + * significant bits must be equal to zero). + * + * 12 least significant bints of optee_msg_param.u.tmem.buf_ptr should hold page + * offset of the user buffer. + * + * So, entries should be placed like members of this structure: + * + * struct page_data { + * uint64_t pages_array[OPTEE_MSG_NONCONTIG_PAGE_SIZE/sizeof(uint64_t) - 1]; + * uint64_t next_page_data; + * }; + * + * Structure is designed to exactly fit into the page size + * OPTEE_MSG_NONCONTIG_PAGE_SIZE which is a standard 4KB page. + * + * The size of 4KB is chosen because this is the smallest page size for ARM + * architectures. If REE uses larger pages, it should divide them to 4KB ones. */ -#define OPTEE_MSG_ATTR_FRAGMENT BIT(9) +#define OPTEE_MSG_ATTR_NONCONTIG BIT(9) /* * Memory attributes for caching passed with temp memrefs. The actual value @@ -94,6 +115,11 @@ #define OPTEE_MSG_LOGIN_APPLICATION_USER 0x00000005 #define OPTEE_MSG_LOGIN_APPLICATION_GROUP 0x00000006 +/* + * Page size used in non-contiguous buffer entries + */ +#define OPTEE_MSG_NONCONTIG_PAGE_SIZE 4096 + /** * struct optee_msg_param_tmem - temporary memory reference parameter * @buf_ptr: Address of the buffer @@ -145,8 +171,8 @@ struct optee_msg_param_value { * * @attr & OPTEE_MSG_ATTR_TYPE_MASK indicates if tmem, rmem or value is used in * the union. OPTEE_MSG_ATTR_TYPE_VALUE_* indicates value, - * OPTEE_MSG_ATTR_TYPE_TMEM_* indicates tmem and - * OPTEE_MSG_ATTR_TYPE_RMEM_* indicates rmem. + * OPTEE_MSG_ATTR_TYPE_TMEM_* indicates @tmem and + * OPTEE_MSG_ATTR_TYPE_RMEM_* indicates @rmem, * OPTEE_MSG_ATTR_TYPE_NONE indicates that none of the members are used. */ struct optee_msg_param { diff --git a/drivers/tee/optee/optee_smc.h b/drivers/tee/optee/optee_smc.h index 069c8e1..7cd3272 100644 --- a/drivers/tee/optee/optee_smc.h +++ b/drivers/tee/optee/optee_smc.h @@ -222,6 +222,13 @@ struct optee_smc_get_shm_config_result { #define OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM BIT(0) /* Secure world can communicate via previously unregistered shared memory */ #define OPTEE_SMC_SEC_CAP_UNREGISTERED_SHM BIT(1) + +/* + * Secure world supports commands "register/unregister shared memory", + * secure world accepts command buffers located in any parts of non-secure RAM + */ +#define OPTEE_SMC_SEC_CAP_DYNAMIC_SHM BIT(2) + #define OPTEE_SMC_FUNCID_EXCHANGE_CAPABILITIES 9 #define OPTEE_SMC_EXCHANGE_CAPABILITIES \ OPTEE_SMC_FAST_CALL_VAL(OPTEE_SMC_FUNCID_EXCHANGE_CAPABILITIES)