From nobody Fri Apr 10 06:00:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass(p=quarantine dis=none) header.from=epam.com ARC-Seal: i=2; a=rsa-sha256; t=1775493576; cv=pass; d=zohomail.com; s=zohoarc; b=gpVScwWaGcxGWGqDl7LJW/vnoF19pIvZ4csF+JH/OUT0rWhR/+0qdmkKrx/tMuncbnRJcwl9lMSNb7fIxzGP6hqiARxPUHZaP/ZQOPu4PNDLfuzag1D32qMm9J8MboYBEbtyXP9W9fNavqJDA/v70MkFJJJqJn53qNHtQTnbgA0= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775493576; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=f5VLDzjGdXZ3fBMESadikUu6melFUxWISeZNonumRnY=; b=e8pMUfeDauC5OVOujnBTGh0i77xy0T5DG9ECz4ArNwa0mWuV66M1XZKYDU0BjnsE72AeeJ7xOW8prDkqmDD+e+WTORZyc+azDQdvVN+qugr3ZQaKFq52Gp18uJBBTe6BFRBgfijtuStpJVeDRlZD1K479Mj60n0EKPzwDx8u5eA= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=epam.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1775493576847990.0960369532739; Mon, 6 Apr 2026 09:39:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1274261.1560469 (Exim 4.92) (envelope-from ) id 1w9myk-0003Qw-2W; Mon, 06 Apr 2026 16:39:10 +0000 Received: by outflank-mailman (output) from mailman id 1274261.1560469; Mon, 06 Apr 2026 16:39:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w9myj-0003QN-Tf; Mon, 06 Apr 2026 16:39:09 +0000 Received: by outflank-mailman (input) for mailman id 1274261; Mon, 06 Apr 2026 16:39:08 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w9myh-0002gs-PI for xen-devel@lists.xenproject.org; Mon, 06 Apr 2026 16:39:08 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1w9myh-001MTX-4W for xen-devel@lists.xenproject.org; Mon, 06 Apr 2026 18:39:07 +0200 Received: from [10.42.69.6] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69d3e1a7-bab6-0a2a0a5309dd-0a2a4506d52e-20 for ; Mon, 06 Apr 2026 18:39:07 +0200 Received: from [52.101.66.107] (helo=DUZPR83CU001.outbound.protection.outlook.com) by tlsNG-16d1c6.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.0) (envelope-from ) id 69d3e1a8-0df0-0a2a45060019-3465426b20b6-7 for ; Mon, 06 Apr 2026 18:39:07 +0200 Received: from DU5PR03MB10263.eurprd03.prod.outlook.com (2603:10a6:10:519::5) by AM9PR03MB6817.eurprd03.prod.outlook.com (2603:10a6:20b:2df::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.18; Mon, 6 Apr 2026 16:39:04 +0000 Received: from DU5PR03MB10263.eurprd03.prod.outlook.com ([fe80::8c9e:b301:61c0:3908]) by DU5PR03MB10263.eurprd03.prod.outlook.com ([fe80::8c9e:b301:61c0:3908%5]) with mapi id 15.20.9769.020; Mon, 6 Apr 2026 16:39:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a1oZMidpPjdOw5gxUJDWBbr0lTHE/IKnzqSxpAbO7D5yia0RjqqfyJrBntZYZV5t8A9zCq36Fz272TSnfBqD2xY1w1MkfbinpfRA4hzvtw7F6fjWViPacuoJ4YDApwn3biXojNBaPG1kzutrypY8JCh4pQMFiYRBruhAiELG1SzQkA788NmCl7jOVUav9pBc3b2COEwbSz9puH6XgodrpllsZ0uBsMH4vex4jA8tsrDM/o+Hj5d5ZF3Ivv/MnZqvjFRdcBGSxSPX3b9MoDDRhYeuABpMzWPMOwneOyuzr5aHrrHnfi484XA6eYLqvt+sJagcPhLtY6Tp9CwqIxGFvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f5VLDzjGdXZ3fBMESadikUu6melFUxWISeZNonumRnY=; b=F7pcvFR+oPWAzUXPBeKeapkWgzuR2mJw+jopy6d6kXtaOhHn0AZN12VrBRmXkl7ihvSO6yBepvYpT2XtSZU4hgkyO5aX21/2vRGLkVR/FhPXMx19QefmFYlL/Ck89V4q02GlIT3XiiYWTa7qSURHgKtxB1TZBtV5pjODvJLs20pVRMl7SA1lmRgXFM2rJ7ZMiM17qIQokpSZ5EvA+gPGwmTqaH8KIu+NxOyyK3g9RhSeZCWKmDfu9zF37ya8Iccy9dj/wKpsYe9E3hXsLpypvSMaAPTF+T72PRBjdh0eRFStheNGR7FECuScejtwz6e6lNyklb/XqGkh3hoevg0qkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f5VLDzjGdXZ3fBMESadikUu6melFUxWISeZNonumRnY=; b=bzDqsYmChoFaM3gFjHMQ7cPcjMQlGG2T/xcuq9lErmfzrDR6MqSleyxRgW9tWo7kCZDMBEjVR5PbrsQlbqccTme/nlmSXgn/SrH9SieKDKxed7+lXsw4pjTfTmFwbz+T1cam32g8J/Qkn4vQ5bVbYm57qKsnyn1gkVXHJ1ihlgtvE8ZSOcymu10KYdvNdJqNBeLiWi1hJ8Ly/Zg+O2UA4SIa9/JwTq89t4fh8ZRfMrBUpPEVj7sZI4zXUc7oRoMdW/f1aED2uC6zo7Wc/10Vh9Lv4/9IQvd6/DYESdqEcEsAf+JhUDngt5Mr6v65OhPctK8R01zXiMmrcMfQAWPNzA== From: Oleksii Moisieiev To: "xen-devel@lists.xenproject.org" CC: Andrew Cooper , Anthony PERARD , Bertrand Marquis , Jan Beulich , Juergen Gross , Julien Grall , Michal Orzel , Oleksii Moisieiev , =?iso-8859-1?Q?Roger_Pau_Monn=E9?= , Stefano Stabellini , Volodymyr Babchuk , Grygorii Strashko Subject: [PATCH v11 6/6] docs: arm: add SCI SCMI SMC multi-agent driver docs Thread-Topic: [PATCH v11 6/6] docs: arm: add SCI SCMI SMC multi-agent driver docs Thread-Index: AQHcxePg8VbDB6v4I0eoLzYE9bLpPA== Date: Mon, 6 Apr 2026 16:39:03 +0000 Message-ID: <0b50a7075ced262c57f0daa6e9e272566d417625.1775493499.git.oleksii_moisieiev@epam.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU5PR03MB10263:EE_|AM9PR03MB6817:EE_ x-ms-office365-filtering-correlation-id: 39c805a7-70d5-447a-a831-08de93fb0394 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|366016|18002099003|38070700021|22082099003|56012099003; x-microsoft-antispam-message-info: LJgTbQ2RKGKp2/Ym1Ajuw/lm4NXiHvU9dpAscMfonAApcFspSYhC7mVfaQ3vDzzmZxayITJGNb2+8v26Ygc8hSik/zsmsswyrcTjnCndUb/BRNVY2nYqo0+aNFw4RFlZrjHUF7NOBOwjplEe1pt0rQke0KckYeAPKLjxdAnDWkW55cuNP/2DntlJWKkLIpGvWDYtwJcf3vC5FP4uQfwx5+4r+hiluRPMvYz+U3+njE6WMy0VvN7zg5KwMZEafFXBns5pP8HpRTP5ofjWjqT1O5jfZv8cZ0V/8RbbgRdDN6MeL5o4DoSoiSqraUH5rvBMwag0+Ig90I6+E9BGqtmOK7/3ozd5Wb1hJ5FL+ZiGzNn7yfUxdLDqOwY5lasWb4z5OS5ywhJKGACklNGSYPPWePfZBTMQAWk9K6+0nuGBe23/NX5+bPjoIiYCcBaui5fBwL5sG9wBLuu3dKQQgjpdICgcJaMDpr/4Fv9+LNJp3M4+pAAkpBLx2spkzkzz9pm2wgmBPXdI0oicgQevLEHkxhFvI4rydAnmr4vNMeOBVbXJ7bjej255SlIypyI9ugzbL64OeKVHThqiXipSjnP0T/e3tHxzltb1v3h631nb1DPaxSdgM+qUe5E5llvXFvLtwHv+airol+V/ARgmDYTdy/h4Oy6V4Eizy/wlcdJgjIun4GJZcL34xlxyUof3dw3/k2tfP5XUlJiumcsA9B+x3sft7cObO+p5kt8jSApGxqkW8jo4JgsrhrM5fnWqYy9x x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU5PR03MB10263.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(366016)(18002099003)(38070700021)(22082099003)(56012099003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?IeiNj5Y1uO9nHFe2t3NomSv4z9+Rt9bPKHB8dohRWOtTTEdV2UClkNKPVb?= =?iso-8859-1?Q?mIC0AX/dHFyJgIIaS0OS9b3EXRsAOFfU5ylxxlxXn2QFkWLWQVKQJ9iq8g?= =?iso-8859-1?Q?FpG6iqbrFF3Vwog0K3i9X97coAZL7UKxRbXT1P62+kg9u0injLER9wKI7V?= =?iso-8859-1?Q?ueYnSIH0V5noHR5mp+S8LkBilSiQChbsth+Bh+nWaTmVLk7cLN8ohIdf/j?= =?iso-8859-1?Q?6XJWEnGblGfbOt2P85BTvghOFxVBwbuTTts2dkVW151COSIVwUq2uAmTM+?= =?iso-8859-1?Q?jguGVaHbveElyY5EzAoYEs3YPu1Et8Ru3eXklgNLJeKBN72Asb0Wp91aGf?= =?iso-8859-1?Q?lJtJRyVrjtGiG9VKK60ZYDBgxibErGsDCFXcb7Gyl9gdtSOR0yNp2/aIeV?= =?iso-8859-1?Q?8/GEH9QYeCAnlioFpinWwRhce2FnWTNqj1sDAR4rNTmiA0W2QxpErfmYeB?= =?iso-8859-1?Q?WIbRVyA8rdJbTSUAVSUBcVq4ReCGiSXuXgQsKLhp8xui+8svAtTnRUqv7y?= =?iso-8859-1?Q?eUHRhjwbKEL2v4ODz1cJFFiuxN5eRCQVYwgGonC6440kNJhpBddWcZCzUp?= =?iso-8859-1?Q?sPRslTkeTryaqL9/tTD5UgDd82KCH4YU1KpBjhPR2crikqtIvO3fDtzVW3?= =?iso-8859-1?Q?D1O3EliECQmRTQxpVZd7JM1tptCh+DrxPPuQIm1B+C6YoARwglMEqZ8u2A?= =?iso-8859-1?Q?z67pZjJrMstQg49438k/Y0/VrelRO0IJ9UoXB8ZXGfn4aptqkNUODMBmzU?= =?iso-8859-1?Q?d7NRL8+q1TDfgTTodtWR/FENWT29LGPy3GtucukpGayGsJF+RuBMIz3bLw?= =?iso-8859-1?Q?gwrbrCdtlpZTScehvO5ViZYdd3OBEy1rmFpxr9k2tP489Eb/HjlPpYkv16?= =?iso-8859-1?Q?SlEucXTAPFTX7E0udP1P2VljY18O90v/saI7ppdnU+IOVfSB41VGJWhcHb?= =?iso-8859-1?Q?pNHis0PLG70Bd02wKEg8BUupLhIxcS0l/gTjDVuUMm0Q6tWiDvye1GjrJr?= =?iso-8859-1?Q?Rw7CvFgl5ftW0IoOBOUEPRalEUtNUY38Ho7sn1NIAEeOwPzrtmU5lfrEb2?= =?iso-8859-1?Q?6neFKgpM96y4V1iB46Vcp9Z4755E3adAIvhHyZc1upgYbqosTSKpf/JFIG?= =?iso-8859-1?Q?YVoziJlVHLDHTWOs6DBa854NoGUdBnQJafFROuyhBBY7bwf4Me8a6USvsV?= =?iso-8859-1?Q?vrIoe/e00WfCCyj/0XleHf3jUVAf7iVzlM9Pc3HOXmEskVnBuo5wsfhdUC?= =?iso-8859-1?Q?BLexO1zeVcsMD+IGXdzGO1phbVwQuFy21Nz0xY6vqqNxOK3rKOq6cZ1r8p?= =?iso-8859-1?Q?PSjrpcZwsz87XG/kzcvreCkkjYwjdS6z7TE5tAB6JRhwJjc5JSOOG4Y/TZ?= =?iso-8859-1?Q?aGn4vjHmBGqAHmgVW3y9Mm1Q9Xl+OvJmz0OMukOedYbSAt2UxyhJGkxFNd?= =?iso-8859-1?Q?mB1ibIdSRFcXpzhL8YFlZRGySVVqRGIU0EMVMuhJQ064FtQFRB5t3N3U0G?= =?iso-8859-1?Q?Ro4NVa6CRT6sIZQN8jxFIs1c7jXpLtqqy/CbmwSK68bW9GhQrm6NPTkRJ4?= =?iso-8859-1?Q?ATAF2sXDf2hW96l1ZPrHMyaM+gitq8NC/CsIzy35CNL8xtCzs2+fNIwok3?= =?iso-8859-1?Q?1xMbLmdjEWbnLD68CKGzfaDQixNG0kqmn2zTooGiq1luO5Hbe1qMzEgPQq?= =?iso-8859-1?Q?/J8Sd8RzdJ+59iI6B4ppuK8+E1OT5a6hfjxEBeLXL8T5o1ZKAhMFFa5Jcj?= =?iso-8859-1?Q?MgenClCTCsUYoyVHZo3DSWHdqkntMHhJyjq8MZj0SopK4H4GolJOQ2Kklm?= =?iso-8859-1?Q?mFoUQ0gLVz+Ua6IgCa9tOZBI/dm1M0c=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU5PR03MB10263.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39c805a7-70d5-447a-a831-08de93fb0394 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2026 16:39:03.1460 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ThfrslhLI5Ix7SFWuhhmSh3EsMN0XzQRrSEqjRuOBsYufoB/ArqztpYI2zoJqSw2JohoQu8CsR9I8U6YqfuUf/H3EOxKR2/g97YgK/yXMdM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB6817 X-purgate-ID: tlsNG-16d1c6/1775493547-5E12E3D8-633038CC/0/0 X-purgate-type: clean X-purgate-size: 18936 X-ZohoMail-DKIM: pass (identity @epam.com) X-ZM-MESSAGEID: 1775493579576154100 Content-Type: text/plain; charset="utf-8" From: Grygorii Strashko Add SCI SCMI SMC multi-agent driver documentation. It includes a detailed description of the SCMI multi-agent driver. This document explains the driver's functionality, configuration, and the compilation process. The Xen SCMI multi-agent driver is designed to provide SCMI access to system resources from different domains. Signed-off-by: Grygorii Strashko Signed-off-by: Oleksii Moisieiev --- (no changes since v10) Changes in v10: - rephrase section about /firmware/scmi. Mentioned that this node is taken from Host DT and copied unmodified. - fix xen,reg address for secondary domains for Dom0less configuration Changes in v8: - update documentation to match the last DT format - fixed RST: "... code-block:: dts" -> ".. code-block:: dts" - update documentation with dom0less configuration example - update documentation with new param xen,dom0-sci-agent-id instead of the command line parameter Changes in v7: - update documentation in section of the xen_scmi configuration which is matched by "xen,sci" compatible instead of the direct path. Changes in v6: - remove all HVC mentions from the multi-agent doc - update sci-agent-id parameter description in the documentation - add missing Sign-of - minor fixes across the document Changes in v5: - rework multi-agent driver to leave Host Device-tree unmodified .../arm/firmware/arm-scmi.rst | 422 ++++++++++++++++++ 1 file changed, 422 insertions(+) diff --git a/docs/hypervisor-guide/arm/firmware/arm-scmi.rst b/docs/hypervi= sor-guide/arm/firmware/arm-scmi.rst index d9698f4e4b..8791bc665e 100644 --- a/docs/hypervisor-guide/arm/firmware/arm-scmi.rst +++ b/docs/hypervisor-guide/arm/firmware/arm-scmi.rst @@ -36,6 +36,8 @@ The below sections describe SCMI support options availabl= e for Xen. =20 | [1] `Arm SCMI `_ | [2] `System Control and Management Interface (SCMI) bindings `_ +| [3] `Generic Domain Access Controllers bindings `_ + =20 Simple SCMI over SMC calls forwarding driver (EL3) ------------------------------------------------------ @@ -189,3 +191,423 @@ except explicitly enabling SCMI with "arm_sci" xl.cfg= option. -> xen,reg =3D <0x0 0x47ff0000 0x0 0x1000 0x0 0x22001000>; -> xen,force-assign-without-iommu; }; + +SCMI SMC multi-agent driver (EL3) +------------------------------------- + +The SCMI SMC multi-agent driver enables support for ARM EL3 Trusted Firmwa= re-A (TF-A) which +provides SCMI interface with multi-agent support, as shown below. + +:: + + +-----------------------------------------+ + | | + | EL3 TF-A SCMI | + +-------+--+-------+--+-------+--+-------++ + |shmem1 | |shmem0 | |shmem2 | |shmemX | + +-----+-+ +---+---+ +--+----+ +---+---+ + smc-id1 | | | | + agent1 | | | | + +-----v--------+---------+-----------+----+ + | | | | | + | | | | | + +--------------+---------+-----------+----+ + smc-id0 | smc-id2| smc-idX| + agent0 | agent2 | agentX | + | | | + +----v---+ +--v-----+ +--v-----+ + | | | | | | + | Dom0 | | Dom1 | | DomX | + | | | | | | + | | | | | | + +--------+ +--------+ +--------+ + +The EL3 SCMI multi-agent firmware is expected to provide SCMI SMC shared-m= emory transport +for every Agent in the system. The SCMI Agent transport channel defined by= pair: + +- smc-id: SMC function id used for Doorbell +- shmem: shared memory for messages transfer, **Xen page aligned**. + Shared memory is mapped with the following flags: MT_DEVICE_nGnRE and _P= AGE_DEVICE, indicating that this + memory is mapped as device memory. + +The following SCMI Agents are expected to be defined by SCMI FW to enable = SCMI multi-agent functionality +under Xen: + +- Xen management agent: trusted agents that accesses to the Base Protocol = commands to configure + agent specific permissions +- OSPM VM agents: non-trusted agent, one for each Guest domain which is a= llowed direct HW access. + At least one OSPM VM agent has to be provided by FW if HW is handled onl= y by Dom0 or Driver Domain. + +The EL3 SCMI FW is expected to implement following Base protocol messages: + +- BASE_DISCOVER_AGENT (optional if agent_id was provided) +- BASE_RESET_AGENT_CONFIGURATION (optional) +- BASE_SET_DEVICE_PERMISSIONS (optional) + +The number of supported SCMI agents and their transport specifications are= SCMI FW implementation +specific. + +Compiling with multi-agent support +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To build with the SCMI SMC multi-agent driver support, enable Kconfig opti= on: + +:: + + CONFIG_SCMI_SMC_MA + + +Driver functionality +^^^^^^^^^^^^^^^^^^^^ + +The SCI SCMI SMC multi-agent driver implements following functionality: + +- The driver is initialized from the Xen SCMI container ``xen_scmi_config`` + under ``/chosen/xen`` (for example ``/chosen/xen/xen_scmi_config/scmi``). + Only one SCMI interface is supported. The SCMI configuration must live u= nder + the Xen SCMI container ``xen,sci`` beneath ``/chosen``. + The Xen SCMI mediator will bind only to the "arm,scmi-smc" node that is = a child of + this "xen,sci" container; any other "arm,scmi-smc" nodes (for example un= der + "/firmware") are ignored to avoid stealing the host's SCMI OSPM instance. + +.. code-block:: dts + + scmi_shm_1: sram@47ff1000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff1000 0x0 0x1000>; + }; + scmi_xen: scmi { + compatible =3D "arm,scmi-smc"; + arm,smc-id =3D <0x82000003>; <--- Xen management agent smc-id + #address-cells =3D < 1>; + #size-cells =3D < 0>; + #access-controller-cells =3D < 1>; + shmem =3D <&scmi_shm_1>; <--- Xen management agent shmem + }; + +.. note:: + This layout keeps the Host DT unchanged for Dom0 and baremetal Linux by + using func_id 0x82000002 / shmem 0x47ff0000 for Dom0, while Xen uses a + separate privileged channel func_id 0x82000003 / shmem 0x47ff1000. EL3 + firmware enforces permissions per agent_id, so there is no conflict bet= ween + Dom0 and Xen channels. + +- The driver obtains Xen specific SCMI Agent's configuration from the Host= DT, probes Agents and + builds SCMI Agents list. The Agents configuration is taken from "scmi-se= condary-agents" + property where first item is "arm,smc-id", second - "arm,scmi-shmem" pha= ndle and third is + optional "agent_id": + +.. code-block:: dts + + chosen { + ranges; <--- set default ranges so address can be translated when pa= rsing scmi_shm node + xen { + ranges; + xen_scmi_config { + compatible =3D "xen,sci"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; <--- set default ranges so address can be translated whe= n parsing scmi_shm node + scmi-secondary-agents =3D < + 0x82000002 &scmi_shm_0 0 + 0x82000004 &scmi_shm_2 2 + 0x82000005 &scmi_shm_3 3 + 0x82000006 &scmi_shm_4 4>; + #scmi-secondary-agents-cells =3D <3>; <--- optional, default 3 + xen,dom0-sci-agent-id =3D <0>; /* Dom0 agent ID */ + + scmi_shm_0 : sram@47ff0000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff0000 0x0 0x1000>; + }; + + scmi_shm_2: sram@47ff2000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff2000 0x0 0x1000>; + }; + scmi_shm_3: sram@47ff3000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff3000 0x0 0x1000>; + }; + scmi_shm_4: sram@47ff4000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff4000 0x0 0x1000>; + }; + + // Xen SCMI management channel + scmi_shm_1: sram@47ff1000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff1000 0x0 0x1000>; + }; + + scmi_xen: scmi { + compatible =3D "arm,scmi-smc"; + arm,smc-id =3D <0x82000003>; <--- Xen management agent smc-id + #address-cells =3D < 1>; + #size-cells =3D < 0>; + #access-controller-cells =3D < 1>; + shmem =3D <&scmi_shm_1>; <--- Xen management agent shmem + }; + }; + }; + }; + + /{ + // Host SCMI OSPM channel - provided to the Dom0 as is if SCMI ena= bled for it + scmi_shm: sram@47ff0000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff0000 0x0 0x1000>; + }; + + firmware { + scmi: scmi { + compatible =3D "arm,scmi-smc"; + arm,smc-id =3D <0x82000002>; <--- Host OSPM agent smc-id + #address-cells =3D < 1>; + #size-cells =3D < 0>; + shmem =3D <&scmi_shm>; <--- Host OSPM agent shmem + + protocol@X{ + }; + }; + }; + }; + + This approach allows defining multiple SCMI Agents by adding Xen-specifi= c properties under + the ``/chosen`` node to the Host Device Tree, leaving the main part unch= anged. The Host DT + SCMI channel will be passed to Dom0. + + The Xen management agent is described as a ``scmi_xen`` node under the `= `xen,sci`` compatible node, + which is used by Xen to control other SCMI Agents in the system. + + All secondary agents' configurations are provided in the ``scmi-secondar= y-agents`` property with + an optional ``agent_id`` field. + + The ``agent_id`` from the ``scmi-secondary-agents`` property is used to = identify the agent in the + system and can be omitted by setting ``#scmi-secondary-agents-cells =3D = <2>``, so the Secondary + Agents configuration will look like this: + +.. code-block:: dts + + chosen { + xen { + xen_scmi_config { + compatible =3D "xen,sci"; + scmi-secondary-agents =3D < + 0x82000002 &scmi_shm_0 + 0x82000004 &scmi_shm_2 + 0x82000005 &scmi_shm_3 + 0x82000006 &scmi_shm_4>; + #scmi-secondary-agents-cells =3D <2>; + }; + }; + } + + In this case, Xen will use the ``SCMI_BASE_DISCOVER_AGENT`` call to disc= over the ``agent_id`` + for each secondary agent. Providing the ``agent_id`` in the ``scmi-secon= dary-agents`` property + allows skipping the discovery call, which is useful when the secondary a= gent's shared memory is + not accessible by Xen or when boot time is important because it allows s= kipping the agent + discovery procedure. + +.. note:: + + Note that Xen is the only one entry in the system which need to know a= bout SCMI multi-agent support. + +- The driver implements the SCI subsystem interface required for configuri= ng and enabling SCMI + functionality for Dom0/hwdom and Guest domains. To enable SCMI functiona= lity for guest domain + it has to be configured with unique supported SCMI Agent_id and use corr= esponding SCMI SMC + shared-memory transport ``[smc-id, shmem]`` defined for this SCMI Agent_= id. + +- Once Xen domain is configured it can communicate with EL3 SCMI FW: + + - zero-copy, the guest domain puts/gets SCMI message in/from shmem; + - the guest triggers SMC exception with agent "smc-id" (doorbell); + - the Xen driver catches exception, do checks and synchronously forwards= it to EL3 FW. + +- the Xen driver sends BASE_RESET_AGENT_CONFIGURATION message to Xen manag= ement agent channel on + domain destroy event. This allows to reset resources used by domain and = so implement use-case + like domain reboot. + + +Configure SCMI for Dom0 +^^^^^^^^^^^^^^^^^^^^^^^ +Set the Dom0 SCMI agent ID in the device tree using the Xen SCMI container= under ``/chosen``. +Add ``xen,dom0-sci-agent-id`` to the ``xen,sci`` node. If the property is = absent, SCMI stays +disabled for Dom0 and the SCMI nodes are removed from Dom0 DT. + +.. code-block:: dts + + chosen { + xen { + ranges; + xen_scmi_config { + compatible =3D "xen,sci"; + xen,dom0-sci-agent-id =3D <0>; /* Dom0 agent ID */ + /* scmi-secondary-agents and scmi_xen as shown above */ + }; + }; + }; + +The Host DT ``/firmware/scmi`` node is copied to the Dom0 DT unmodified. H= owever, for Dom0 SCMI +configuration, Xen actually relies on ``scmi-secondary-agents`` and ``xen,= dom0-sci-agent-id`` +properties from the ``xen,sci`` container under ``/chosen``. If the ``/fir= mware/scmi`` node is +missing or disabled, or if ``xen,dom0-sci-agent-id`` is not provided, the = Dom0 SCMI agent will not +be configured. + +.. note:: + + The ``xen,dom0-sci-agent-id`` value must match the ``func_id`` and ``shm= em`` pairing provided by + the EL3 firmware for Dom0 (for example in the ``/firmware/scmi`` node). + +Configure SCMI for for guest domain with toolstack +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* In domain's xl.cfg file add **"arm_sci"** option as below + +:: + + arm_sci =3D "type=3Dscmi_smc_multiagent,agent_id=3D2" + +* In domain's xl.cfg file enable access to the "arm,scmi-shmem" which shou= ld correspond + assigned "agent_id" for the domain, for example: + +:: + + iomem =3D [ + "47ff2,1@22001", + ] + +.. note:: It's up to the user to select guest IPA for mapping SCMI shared-= memory. + +* Add SCMI nodes to the Driver domain partial device tree as in the below = example. + The "arm,smc-id" should correspond assigned agent_id for the domain: + +.. code:: + + passthrough { + scmi_shm_0: sram@22001000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x22001000 0x0 0x1000>; + }; + + firmware { + compatible =3D "simple-bus"; + scmi: scmi { + compatible =3D "arm,scmi-smc"; + arm,smc-id =3D <0x82000004>; <--- smc-id for agent_id= =3D2 + shmem =3D <&scmi_shm_0>; + ... + } + } + } + +**Device specific access control** + +The XEN SCMI SMC multi-agent driver performs "access-controller" provider = function in case +EL3 SCMI FW implements SCMI "4.2.1.1 Device specific access control" and p= rovides the +BASE_SET_DEVICE_PERMISSIONS command to configure the devices that an agent= s have access to. +The Host DT SCMI node should have "#access-controller-cells=3D<1>" propert= y and DT devices should +be bound to the SCMI node using Access Controllers bindings [3]. + +For example: + +.. code-block:: dts + + &i2c1 { + access-controllers =3D <&scmi 0>; + }; + +Use domain's xl.cfg file **"dtdev"** property to assign SCMI devices from = toolstack to the guest: + +:: + + dtdev =3D [ + "/soc/i2c@e6508000", + ] + +.. note:: + + xl.cfg:"dtdev" need contain all nodes which are under SCMI management = (not only those which are + behind IOMMU) and passed-through to the guest domain. + +Configure SCMI for predefined domains (dom0less) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* add "xen,sci_type" and "xen,sci-agent-id" properties for required DomU (= "xen,domain") node + +:: + + xen,sci_type=3D"scmi_smc_multiagent" + xen,sci-agent-id=3D2 + +* add scmi nodes to the Driver domain partial device tree the same way as = above (toolstack case) and + enable access to the "arm,scmi-shmem" according to the dom0less document= ation. For example: + +.. code-block:: dts + + scmi_shm_0: sram@22001000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x00 0x22001000 0x00 0x1000>; + -> xen,reg =3D <0x0 0x47ff2000 0x0 0x1000 0x0 0x22001000>; + -> xen,force-assign-without-iommu; + }; + +* For SCMI device access control configure pass-through devices in the gue= st partial DT according to + the dom0less documentation and ensure that devices SCMI management has "= xen,path" property set: + +Example (dom0less, multi-agent): + +.. code-block:: dts + + chosen { + xen { + ranges; + xen_scmi_config { + compatible =3D "xen,sci"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + /* Xen management channel shared memory */ + scmi_shm_1: sram@47ff1000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff1000 0x0 0x1000>; + }; + + scmi_shm_domu: sram@47ff2000 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x47ff2000 0x0 0x1000>; + }; + + scmi-secondary-agents =3D < + 0x82000004 &scmi_shm_domu 2>; + #scmi-secondary-agents-cells =3D <3>; + + scmi_xen: scmi { + compatible =3D "arm,scmi-smc"; + arm,smc-id =3D <0x82000003>; + #address-cells =3D <1>; + #size-cells =3D <0>; + #access-controller-cells =3D <1>; + shmem =3D <&scmi_shm_1>; + }; + }; + }; + + xen,domain@1 { + compatible =3D "xen,domain"; + xen,sci_type =3D "scmi_smc_multiagent"; + xen,sci-agent-id =3D <2>; + /* other domain properties here */ + }; + }; + +.. code-block:: dts + + i2c@e6508000 { + ... + reg =3D <0x00 0xe6508000 0x00 0x1000>; + -> xen,path =3D "/soc/i2c@e6508000" + -> xen,reg =3D <0x0 0xe6508000 0x0 0x1000 0x0 0xe6508000>; + -> xen,force-assign-without-iommu; + }; --=20 2.43.0