From patchwork Tue Aug 20 14:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 13770222 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 904BEC3DA4A for ; Tue, 20 Aug 2024 14:31:23 +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=xsdBBr2uEEi7o97sbmyjAnOL0b pxAiB+DixIcVoN9wjJLoUhB5Q1rztc1De7Yn3wVZAqL2G356ZjMITFciDLCmBCtQymqIkbimy/Dmw 4G0ZcAmc5K5hbY7vhaG52qgUAlBPxKw4fIZvBH/mgbqSq6gzmx5/Y6Vx2noy04R9c6zxYXtvD0442 AyvIv3qiDCyzbYTEVOIqy38ZggW9t7BwrsY9VMPjuQv//KEXB+E6J8+tjJY/XBDUSp8LxzVbHAYDa Vo/YlaTllMcYe/fW8bda63nbUVbF7jnBq5UUgFjJlqjrJdsuKNKmc2HN8Q1SWVX47LNtEwBo6gdx9 NVt82oqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgPt6-00000005YfQ-0l7H; Tue, 20 Aug 2024 14:31:08 +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 1sgPqx-00000005Y72-05C1 for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 14:28:57 +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 955A5143D; Tue, 20 Aug 2024 07:29:18 -0700 (PDT) Received: from [127.0.1.1] (e107155-lin.cambridge.arm.com [10.1.198.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 254653F66E; Tue, 20 Aug 2024 07:28:52 -0700 (PDT) From: Sudeep Holla Date: Tue, 20 Aug 2024 15:27:55 +0100 Subject: [PATCH v2 2/7] firmware: arm_ffa: Update the FF-A command list with v1.2 additions MIME-Version: 1.0 Message-Id: <20240820-ffa_v1-2-v2-2-18c0c5f3c65e@arm.com> References: <20240820-ffa_v1-2-v2-0-18c0c5f3c65e@arm.com> In-Reply-To: <20240820-ffa_v1-2-v2-0-18c0c5f3c65e@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/ZANAwAIAQBBurwxfuKYAcsmYgBmxKghpDKN0PIdknmPV17SUNsfAIJ4Vm+dIHE9T bgb8gWLeN+JAjMEAAEIAB0WIQS6ceUSBvMeskPdk+EAQbq8MX7imAUCZsSoIQAKCRAAQbq8MX7i mBxJEADAD2TJ9dm+SCeGbovpDvZYAw2K7PJkC0tW00SgpV5uFGAOImDTGUWWKIROzzOFJ9xlK7Q TVZQVj2TM/hnLwBPUPT1+Fe7tPqXfouCaWyEl+e6Kz6KVnhSQBDj0QHVZH7xnNn8D4/306TniUV z3iBpEcPopruX0MlH1Beapak4nPVE5jhaMvIAataqxkkcLJxhbT/uTyTDhMWRw7ay84CPgHs2zo 9Cnlk0tAhK/U36fQ7MhL5ujRyAJxuAFCQQhP9NfmDCTOLKuBy3VQou+9tI7XvZhFFjPKud4nNRf k0Jf0V5QrrVhh2NH2jJZQcXOHfxpFWUiO9y0R+ox77Qc+bDZVco5z9VGPqNZXShaLvoo5bnumTL eCUYruK+Y2FsMJNcWCVOsPUMgQQyBjWTQNHPOz01ByMPMtVpvoQ2Z5A35HmDW+J6E3vTBlBawWW rD4zIPsLaIKGMhrEil2wjzsp/TRabDhuUkar8TuMuCnzSV1g0hRfhTyQ55kyvKoyFeCF/6Nps3j 120HBO/PI/eoxeiJKrVRLy5mJT/CdFQeqSrsu4FPo9PZ+TLLO8UBbsTRZ38xWWSNN92pWqPz7mc 9mF1Xu4b+y0VJz24L6nfamCokrrWyzviPvNmeaXH28CfKjvtZzp+8+CSh17HN5dif2sHDF/X54r cGBelkxIW6tMHCA== 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-20240820_072855_141953_B712C506 X-CRM114-Status: GOOD ( 10.16 ) 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.