From patchwork Wed Aug 14 13:48:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 13763519 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 7C5E4C3DA4A for ; Wed, 14 Aug 2024 13:50:35 +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:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gchUtsLbUGtLNc6yDyhqS96MooezdK+YC6vlXtOkivQ=; b=SxUWqV3sAORHKlnuPc03Vw3Vu8 BR/aD7HreMz5ONUrGp+3xz6wELeeI4iy640ArBROVPVz0TRgyZEn5Nn4s+iGj293u/U4qaeHDHLdT Qrp/ElAlWXcpfWiBkTuEPNFSkAFF4oR5D2h3eC0HVWSuM/HuK5vfSQ6HIOC4ZiBvkXX3ZodhWL4Ol Y7D0gnxOSusmhYIJ95R52TLZTy2xND4reWcUJb/RvvNU3OEcG3gYN2hzLy21XF7Se7ZLFSYE3vQxQ zAoQ6tF7+hVLhD3bS9Wvlfxg4SBM5hVzEcJkB0hcUfJsQXHlYOwcOXAgQXnNZUfa0HWEj5hgnQEb6 lRF/KCAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seEOQ-000000079K8-2W9Q; Wed, 14 Aug 2024 13:50:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seENC-0000000794l-28iL for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2024 13:49:12 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1E5F015A1; Wed, 14 Aug 2024 06:49:36 -0700 (PDT) Received: from [127.0.1.1] (e107155-lin.cambridge.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 97C9B3F6A8; Wed, 14 Aug 2024 06:49:09 -0700 (PDT) From: Sudeep Holla Date: Wed, 14 Aug 2024 14:48:51 +0100 Subject: [PATCH 2/7] firmware: arm_ffa: Update the FF-A command list with v1.2 additions MIME-Version: 1.0 Message-Id: <20240814-ffa_v1-2-v1-2-9e9abef69b21@arm.com> References: <20240814-ffa_v1-2-v1-0-9e9abef69b21@arm.com> In-Reply-To: <20240814-ffa_v1-2-v1-0-9e9abef69b21@arm.com> To: linux-arm-kernel@lists.infradead.org, Sudeep Holla , op-tee@lists.trustedfirmware.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1650; i=sudeep.holla@arm.com; h=from:subject:message-id; bh=B5ybBlQuduDIRKaSmHbxC2AOR5xbIv/GkF8dEgAGsOk=; b=owEBbQKS/ZANAwAIAQBBurwxfuKYAcsmYgBmvLXSq5j53UkFkpKh+W825ZPUyCAVNL9Hxld67 kSvST17Tz2JAjMEAAEIAB0WIQS6ceUSBvMeskPdk+EAQbq8MX7imAUCZry10gAKCRAAQbq8MX7i mLI1D/sGLWibfcPkwSSso8NihFfogFUU04x/NtkwhRwZlH2u1lyqhDHsFGUXXrpfjDtsBMOZ8BA mfHxPtFkMYwGYnjFx5THvBxYKAaFxC0pLSrhEIrM9uzsPPJKY9vzpw+VVKbhkfF4HMaNNCttVEy 8QapoksLRKcXBzoiV5zRfuSQehUuSJFmbTtvESCV2MeSJC1o5BMtlX8+0dW5qMuv+luyrpVUx2r rVqbgth7aSsweHHdi1Wsk+muJHKXQsRjmxTw2wiTN65S0+NTANBFhyWeA1rrtYjFMYdRCR7hxd0 E3OWLRKtWcsKy3ng0yjC04rj3/DqPTxJc6VupAIKsCOgiTeO9rHREoamAoqiFL7Aa9XI6JveRJJ N2HAhtafbHsogjOGVh4v78ySsYgLYAvGuEplnWrnvUw5gxvhyoAh3ovdadGMOf7IUYXyVSXlm6U qfVmDEJGZ4r9jzIIB1futdoOacxMCb/+QqOhOZAMhZ9vcLzDXU6rH9Q2wIOkfqRrrZoCmDhk/+3 VRLB8iACFJBsRVa4kBMvBTI6zZNu616bpJu/3sdGcNjN6V7rKrRbNa5S23BWAdM4qMnXu25I63c bLKfiZTEwLYgibsxtu3AkW7jTII3aq/J060KJjFu8szwK7/JpqAksz8KoxU2PLPaWn1qAs2aWV8 CUzN5UZF5ScEhDQ== X-Developer-Key: i=sudeep.holla@arm.com; a=openpgp; fpr=7360A21742ADF5A11767C1C139CFD4755FE2D5B4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240814_064910_626257_8AFDA952 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. 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 Arm Firmware Framework for A-profile(FFA) v1.2 introduces register based discovery mechanism and direct messaging extensions that enables to target specific UUID within a partition. Let us add all the newly supported FF-A function IDs in the spec. Also update to the error values and associated handling. Signed-off-by: Sudeep Holla --- drivers/firmware/arm_ffa/driver.c | 1 + include/linux/arm_ffa.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index b4b3ecc9824e..be77e03578cc 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -75,6 +75,7 @@ static const int ffa_linux_errmap[] = { -EAGAIN, /* FFA_RET_RETRY */ -ECANCELED, /* FFA_RET_ABORTED */ -ENODATA, /* FFA_RET_NO_DATA */ + -EAGAIN, /* FFA_RET_NOT_READY */ }; static inline int ffa_to_linux_errno(int errno) diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index 89683f31ae12..b34f0c0dc2c5 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -73,6 +73,11 @@ #define FFA_FN64_MEM_PERM_GET FFA_SMC_64(0x88) #define FFA_MEM_PERM_SET FFA_SMC_32(0x89) #define FFA_FN64_MEM_PERM_SET FFA_SMC_64(0x89) +#define FFA_CONSOLE_LOG FFA_SMC_32(0x8A) +#define FFA_PARTITION_INFO_GET_REGS FFA_SMC_64(0x8B) +#define FFA_EL3_INTR_HANDLE FFA_SMC_32(0x8C) +#define FFA_MSG_SEND_DIRECT_REQ2 FFA_SMC_64(0x8D) +#define FFA_MSG_SEND_DIRECT_RESP2 FFA_SMC_64(0x8E) /* * For some calls it is necessary to use SMC64 to pass or return 64-bit values.