From patchwork Wed Feb 12 07:40:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 13971291 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 0976CC02198 for ; Wed, 12 Feb 2025 07:44:30 +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:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ANnsaSQu9v+dXsEa8nLp4hGE1OxMJ3A5MhNkRRBPxuM=; b=pXgWEd27EhLWEkxVMP42o93suo TF/tEzm9ZAk2lQAaBssTXC2/DaJOOinWnnkic3OXYy7x7rObCrr3TsZvO4zbPkqEaiFL3uf6UHJwK 4ZosOzqNQI5C3Vq0tihWLepOna8E05MNeh90fzRuetwFDrwY2ULNBStnB6r/L8z14N8Ee9V6Wc88z BJkyws3v8QQzb1CDgxFSSE3HcGbXuWgmIDP3FpN643pC9xQaH4EfQgfFHaSQmcjDLJbRuM6OpoxYU GOzRvVhCmUtQM0MihGmJrSrk5fMgY8dwsXhyBHTQ9H1iDShsdaMAfZVV+IscqWHvmqg349PK9zDk1 qff5EOfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ti7Pt-00000006WEO-2bZz; Wed, 12 Feb 2025 07:44:17 +0000 Received: from mail-vi1eur05on20627.outbound.protection.outlook.com ([2a01:111:f403:2613::627] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ti7N9-00000006Vax-19sM for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2025 07:41:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iaace57brspKE2Vbinhd2jWHFEl+bi/zb/32GE3dXEhSU6u6Zuz87WxQWdxnWhV46AVs62mph88fzX21Ke9vFD7tg1whADEnpfNxlrgtzzFEjUj13YHQVeLAZpLIGZv0T06QUaMb8YZfKS/0VC9bVcrDhl3he95MdHip3OCb9gDmpmS8o5lggGCOuZ4V1/q3BotyEK4Sp6o9xBjxo19jTx6QwHykOhtByW+fHYmfdFI6qc7j0m3pJJ2D39JucU+Gdc64H9+ugeptxbIZLq5Swil57cTB2c2QSYqarCwkEauN0ZXoNjyzpSm2fp7uyVwZmLrPPg3h9gor4UAYkBslYw== 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=ANnsaSQu9v+dXsEa8nLp4hGE1OxMJ3A5MhNkRRBPxuM=; b=U8GybYfq7xFCYwKllnF/6ZoZtQ4tcPov81VuDoNkpNO00WPL+Eo27f6tFWedOXAmu3upWswkmSeN4xQPr8fQ8prrES5nO0lfrMb9QVKGliz1ptjUrf6Ua4bKPs9j2lCy7cIULjJg8eUMk+fOq3ByeFgqSrHObwXVgjBFBBdXgmfwIs6krX29c9UeB55XOmYBXzMf73bVuRlOC1JDrJhYoehVJsdJCXDG1sNEMbdZvi0y0hiWjrQ754RvSOa7wWKqm5TxdVs4mav8Mp3EmuKU1sw54lbhsaBoYE9M1bwV3EFZUhzVL9ixg07ZTFdSYfFQ6ZzVJwJ6FjljBBbwUYNn1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ANnsaSQu9v+dXsEa8nLp4hGE1OxMJ3A5MhNkRRBPxuM=; b=OjjGFd/oaP9xVHRqAUsriZqd3KKW/+o0sqoQlRikkE29TUMYmwhGn7GTjXuWc1wHqXLjhx8K4dG56vue35H1zde6vWVAMR8X4ZCAyNAxetZCbYFsq+rbcPuek1VTcSLVONQwWydCSjfWNwdmyy6FCEuF7xMIayQ1Q6cHMyhLOmJxodbMIWBdBrmS3hnDwhi7y5dodgXTVUpoWQARmvRm9P0v6SUCpSCFFQB/vKaik60V/lRRJnGkQc9068c0jHTMSY+uloeW7Rc7hrmVQPo9U5czYWMpj5EgMw+35P86bpPeZ+QkTLOCdylM20eHoWESdXVpm4ow4OityKogFVWc3g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by PA1PR04MB10865.eurprd04.prod.outlook.com (2603:10a6:102:48a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.18; Wed, 12 Feb 2025 07:41:24 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%3]) with mapi id 15.20.8445.008; Wed, 12 Feb 2025 07:41:24 +0000 From: "Peng Fan (OSS)" Date: Wed, 12 Feb 2025 15:40:23 +0800 Subject: [PATCH v2 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Message-Id: <20250212-imx-lmm-cpu-v2-1-3aee005968c1@nxp.com> References: <20250212-imx-lmm-cpu-v2-0-3aee005968c1@nxp.com> In-Reply-To: <20250212-imx-lmm-cpu-v2-0-3aee005968c1@nxp.com> To: Sudeep Holla , Cristian Marussi , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Dan Carpenter , linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, devicetree@vger.kernel.org, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1739346036; l=47604; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=eE9l9TA9pCk/iFtIAlt9euJ2zISH4ZXCj0VwFDxu54s=; b=s08eUySPIT2+EKBEIRDHGUp8LC9hf4/3YPP8DNJMvflaEacxa4G07YLIYBlVSFuZjwDsac/bp FMqTbpelCnwALbv8o29xRmLFLMxagr7DqvHPKlVR5FbyGaEQ5QmhiRD X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::6) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|PA1PR04MB10865:EE_ X-MS-Office365-Filtering-Correlation-Id: c361aef4-9c84-4870-d8f8-08dd4b38a64a X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?A/OkCxOn6sn75g+v5T6nzZkorkV4De1?= =?utf-8?q?vX1chQ/RbX2PXNLuYGQ+4PWaaDMrF1C4RMrivMOdkHedbpLK97asg6afsanv2YG5g?= =?utf-8?q?beOdv0nrepWiOuhXvhZgcuNdmrQAws4OsQXPJXa4roi9ubfwpjttN72EHCctiZBYH?= =?utf-8?q?rn5mWM+/QlHPuQRjZCql+rhJcX4NYVu3kWCULcIH+JUqccubhXm4n2/dQOEZjqKQ6?= =?utf-8?q?dTa9ja3EhBwyViZrY/A0wpFVXCkYNz3EN5sqGiC35FB4R1+0zxTnc74RHV/tSD9ES?= =?utf-8?q?4KFpYYhSA6Aippu5Q7aSbvdzT092QptnpYs2Fp+clovdkBtlSeKRK1Wl0Cg8wffEV?= =?utf-8?q?x2HOkvL1qiblTR9mTqD0HuJ01XkegE6ztLWEo6NirBqR/NeFh0qXri/yTaVhEdpxf?= =?utf-8?q?kzrLg14gUhe+sSWIz/fRR/vyOZbFq0hZ4oPfd3ifQj6NGvtY/ziJVVzVztGrvtJiQ?= =?utf-8?q?a2QJAO9LLvGgXfssE88/IL4Q485melXG+jUmmzY8drAysPjq3d6rfzX1qy3TTkSja?= =?utf-8?q?ZeywiJMmPgQ4jBVr7WJVCt6Ck1Hq570pH1OPoh4bXXGC5u68rPZBGRwC+NhHoadyP?= =?utf-8?q?jD4zvYw8s4fzmrAEqMvauxqUyzXhyrT1HTNG4UEfYOKvwhdsgjhWniR/GNQhn1Fm+?= =?utf-8?q?gxUXUNsp0nnECPfJEoLsuT8XocoIfJEJABZUOEZsxn8VR01bfqYPQ/IJtkTDitrDa?= =?utf-8?q?Hs8DKQqzJCqsBWGUs3ecS99q/NGtAnhJLGg4IwOdobA5M5zAuMep+KBZa6UKXlIib?= =?utf-8?q?wbOd6yp9e2//f0/yj8bitj8x581PwGY78PdATL00LOMmCetD7AwAr9fpcAOLD+5AS?= =?utf-8?q?HwEvaKfZZ0hrnZMoE5Xh2WBVixbHkVeTEfr18wAMVjwNfoP8VDQL052pgKpdzMFAs?= =?utf-8?q?AyydPM/GAgfBLmT36P9hTKD/30IWkTEP+2uhsckoh7S6SoTyrGezK+6MWwINu1DNa?= =?utf-8?q?jnrH9I88qV3g+4Uldty1ycjye4wzRfHUsp+TEepnXYrQ+W2NvNHitLy8kyy9JRIWg?= =?utf-8?q?kzKdZ/Hf9Nps7ncTS/iN4fD4CcHVOEsjIMOIdUiTP1OojD8XAWuWFGtD2ioOLQZa7?= =?utf-8?q?uQ48Al9xQ3E7Gek5An/uDlVh0ks4vlEvtWS79pAo/+PpPpgAS3K+jEBOhglBn1jDb?= =?utf-8?q?HUpbd1fyZDJitYgnM7Gb7f/ddMOn8iAZsftetgFom9G57/U4teV/eO/fFV9jik2hE?= =?utf-8?q?vTkaMknI/xtVotpDXomIfVkgvYcGzqITTVG/qcP0GsOSjLbIUCfoAEj03O0IhOTAs?= =?utf-8?q?6OEfCFrfpv52JvYX/qVuup73RQqw0upl5wa6Y9WtUjJu+tjIQVoXJ8SUuN9NePo+I?= =?utf-8?q?NW7AuzeLIWwOGY1c77tIGOlrP1Z6Mm2qSyzTXD6X1uD9njvfHYBquO63ootAHAojc?= =?utf-8?q?DKUlBIftOcI?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?WugbNtSIdN3UnWuY1n3DxZjH79Xl?= =?utf-8?q?1dEFcGNNSOuaNDwcsCV7SoSS5MApBzpwZB7QJzcH4DWFymqkdAesErapDl22RJdrm?= =?utf-8?q?IZUc+/kASDaY8SB4ueaA3tvC+BjHDnZnSgAupE7BfbbLd1OX9i9oH6t+QdH4T9iRV?= =?utf-8?q?dkLtKPc1S8JnxjAfJEavV+6C3qFD/z1hjYTmCLatK9lzb6P1jTeVlOjT02OaICGZ+?= =?utf-8?q?yIKzGBfsEH3Y2cEd1CjyEb6mrP54g0RshVU8fUYmjtmrL20Ojc1WOk8HvMtEXvbkO?= =?utf-8?q?sdrsaooSfjVoc+lpMlY4mFXN7zD2ccGHrCLWc1WnbuNEpbrLuXD7S0xD1ZPTMw+29?= =?utf-8?q?ReaF1UZvUj9p7hTvRJz2yvgu6Dz/nqvqsPYgSIkARwAVxrK4b9qa4SEO0AqW/AeAC?= =?utf-8?q?r/OEW0/2LQhDQtEGhPmiyrIOUyUn7HH87Ktyi1zuHTanNJ3UkoQvYiiXHqGX6MafS?= =?utf-8?q?D7Gihv+wlqvvACjBSmuTZSEupQCHIkgt8OqENK1OVzkX6HzkhcQnPF5CHsn06dfpD?= =?utf-8?q?YQcvJXnu7bmkS8TATTQrUKJIhflkQsKSWPZXH3ubS7PEQ/hfmvhIfIg4ZOqasGsNF?= =?utf-8?q?kTz74HdfAqLRz/3LOdM7lEo1N/J6qDc2LEvKNfPB+Jzp8CA4TkmL4jw6EavLLX3VF?= =?utf-8?q?mUSQNe9NfOP91nQpHdNGKEhVifwxfZYP65RTMnGJuYa60TRD2k5C+MN3iOxdU+NLS?= =?utf-8?q?SBykcNEGejx1ErItojMxMDgIQKbjvvZQgfdsyVbMH1G4wViwYrdlpVlrv6mxFhwpv?= =?utf-8?q?k23mTaLkF+xndAhMVwyY/KlOIDoolsXSPDZ/yIH0xyooki+46lhE9f4m2zvzQWqOE?= =?utf-8?q?N5lFMMkKFAJ3+qXz5TgetqpWXv3mfy9YLflSXhCRDKX8tpNR/+6xcH1O68lPoMtXZ?= =?utf-8?q?vA1oEWJoC1TvOgibij8JO9MTfBjiF4mnfkymna/qqSjkI9QopJkfTsB6etM/tt8w4?= =?utf-8?q?qV0dzEXfQi4Ul9ZNsJZbkSh/XvQ96OhQAeKjnyh9Ud7/vftFa6hoUhkwVVH0/Bz2D?= =?utf-8?q?CGISaIZ2OjF34ijv1OUiwaVDWU0NM4jbKmAQRMJpq81/S8wE2tidkCyEoHnnb+BR0?= =?utf-8?q?loLWOYv8MCtTxpIhj8dYasMu59sk+rTyQx6rwhHznhzzw/nKfSo4RAld4G0p0KZBz?= =?utf-8?q?dmxFavo5auRVBjoaiq8y9Ly/+DmXElJIQVCcAm941OkTICD6YfxhjmrHnjFKSnM9G?= =?utf-8?q?S8eflK2vGvW06wBv1he2aOr5r99sUexe1xKi76kjuisY/btOlyqdJoMskPG3Z5qRI?= =?utf-8?q?hifnbAP8xTi+AfLB2IZBqFPc2ZF8/OYN10W5f6JE6biY/97mEVUyvOORS4evoVyDs?= =?utf-8?q?IbNZoyJlWhDWHHM3FZd4vImZvN1QQzkqnY0S9WdusXgvZBoNUpaZamJqNb9rk+Lb8?= =?utf-8?q?/AQ5LVLGQXzTsi0gWCqdbWh+KV46nUCN1ghnpl9K29x9Egph3+65PZxXtzvfBOAyE?= =?utf-8?q?2JqGGMXsYcvtzmW65oVKKwyhfoIgXs50Km8Gw167+2nvgQ4Gpo7RTPt7QaQRy5OKo?= =?utf-8?q?AsMjtCOj0XS1?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c361aef4-9c84-4870-d8f8-08dd4b38a64a X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2025 07:41:24.0319 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qjaSpochQ149WaktwGkaXzA62kvpBozrCSCs++vMbj5PQv0JrrguvJC1ByAJl1637jnQQYnBcUXMUJloQd75iQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10865 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250211_234127_675356_79C77134 X-CRM114-Status: GOOD ( 11.81 ) 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: Peng Fan Add i.MX95 Logical Machine Management and CPU Protocol documentation. Signed-off-by: Peng Fan --- drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 737 ++++++++++++++++++++++++ 1 file changed, 737 insertions(+) diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..78a09cd8102becd5584d28bdef18df2d77fb7e7c 100644 --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst @@ -32,6 +32,461 @@ port, and deploy the SM on supported processors. The SM implements an interface compliant with the Arm SCMI Specification with additional vendor specific extensions. +SCMI_LMM: System Control and Management Logical Machine Management Vendor Protocol +================================================================================== + +This protocol is intended for boot, shutdown, and reset of other logical +machines (LM). It is usually used to allow one LM(e.g. OSPM) to manage +another LM which is usually an offload or accelerator engine.. Notifications +from this protocol can also be used to manage a communication link to another +LM. The LMM protocol provides functions to: + +- Describe the protocol version. +- Discover implementation attributes. +- Discover the LMs defined in the system. +- Boot an LM. +- Shutdown an LM (gracefully or forcibly). +- Reset an LM (gracefully or forcibly). +- Wake an LM from suspend. +- Suspend an LM (gracefully). +- Read boot/shutdown/reset information for an LM. +- Get notifications when an LM boots or shuts down (e.g. LM[X] requested + notification of LM[Y] boots or shuts down, when LM[Y] boots or shuts down, + SCMI firmware will send notification to LM[X]). + +'Graceful' means asking LM itself to shutdown/reset/etc (e.g. sending +notification to Linux, Then Linux reboots or powers down itself). + +Commands: +_________ + +PROTOCOL_VERSION +~~~~~~~~~~~~~~~~ + +message_id: 0x0 +protocol_id: 0x80 + ++---------------+--------------------------------------------------------------+ +|Return values | ++---------------+--------------------------------------------------------------+ +|Name |Description | ++---------------+--------------------------------------------------------------+ +|int32 status | See ARM SCMI Specification for status code definitions. | ++---------------+--------------------------------------------------------------+ +|uint32 version | For this revision of the specification, this value must be | +| | 0x10000. | ++---------------+--------------------------------------------------------------+ + +PROTOCOL_ATTRIBUTES +~~~~~~~~~~~~~~~~~~~ + +message_id: 0x1 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status | See ARM SCMI Specification for status code definitions. | ++------------------+-----------------------------------------------------------+ +|uint32 attributes |Protocol attributes: | +| |Bits[31:8] Reserved, must be zero. | +| |Bits[7:0] Number of Logical Machines | ++------------------+-----------------------------------------------------------+ + +PROTOCOL_MESSAGE_ATTRIBUTES +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +message_id: 0x2 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: in case the message is implemented and available | +| |to use. | +| |NOT_FOUND: if the message identified by message_id is | +| |invalid or not implemented | ++------------------+-----------------------------------------------------------+ +|uint32 attributes |Flags that are associated with a specific function in the | +| |protocol. For all functions in this protocol, this | +| |parameter has a value of 0 | ++------------------+-----------------------------------------------------------+ + +LMM_ATTRIBUTES +~~~~~~~~~~~~~~ + +message_id: 0x3 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if valid attributes are returned. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |DENIED: if the agent does not have permission to get info | +| |for the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ +|uint32 attributes | Bits[31:8] reserved. | +| | Bits[7:0] Number of Logical Machines. | ++------------------+-----------------------------------------------------------+ + +LMM_BOOT +~~~~~~~~ + +message_id: 0x4 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully booted. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if lmId is same as the caller. | +| |DENIED: if the agent does not have permission to manage the| +| |the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ + +LMM_RESET +~~~~~~~~~ + +message_id: 0x5 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|uint32 flags |Reset flags: | +| |Bits[31:1] Reserved, must be zero. | +| |Bit[0] Graceful request: | +| |Set to 1 if the request is a graceful request. | +| |Set to 0 if the request is a forceful request. | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully resets. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if lmId is same as the caller. | +| |DENIED: if the agent does not have permission to manage the| +| |the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ + +LMM_SHUTDOWN +~~~~~~~~~~~~ + +message_id: 0x6 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|uint32 flags |Reset flags: | +| |Bits[31:1] Reserved, must be zero. | +| |Bit[0] Graceful request: | +| |Set to 1 if the request is a graceful request. | +| |Set to 0 if the request is a forceful request. | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully shutdowns. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if lmId is same as the caller. | +| |DENIED: if the agent does not have permission to manage the| +| |the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ + +LMM_WAKE +~~~~~~~~ + +message_id: 0x7 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully wakes. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if lmId is same as the caller. | +| |DENIED: if the agent does not have permission to manage the| +| |the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ + +LMM_SUSPEND +~~~~~~~~~~~ + +message_id: 0x8 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully suspends. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if lmId is same as the caller. | +| |DENIED: if the agent does not have permission to manage the| +| |the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ + +LMM_NOTIFY +~~~~~~~~~~ + +message_id: 0x9 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|uint32 flags |Notification flags: | +| |Bits[31:3] Reserved, must be zero. | +| |Bit[3] Wake (resume) notification: | +| |Set to 1 to send notification. | +| |Set to 0 if no notification. | +| |Bit[2] Suspend (sleep) notification: | +| |Set to 1 to send notification. | +| |Set to 0 if no notification. | +| |Bit[1] Shutdown (off) notification: | +| |Set to 1 to send notification. | +| |Set to 0 if no notification. | +| |Bit[0] Boot (on) notification: | +| |Set to 1 to send notification. | +| |Set to 0 if no notification | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if the notification state successfully updated. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if input attributes flag specifies | +| |unsupported or invalid configurations. | +| |DENIED: if the agent does not have permission to request | +| |the notification. | ++------------------+-----------------------------------------------------------+ + +LMM_RESET_REASON +~~~~~~~~~~~~~~~~ + +message_id: 0xA +protocol_id: 0x80 + ++---------------------+--------------------------------------------------------+ +|Parameters | ++---------------------+--------------------------------------------------------+ +|Name |Description | ++---------------------+--------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++---------------------+--------------------------------------------------------+ +|Return values | ++---------------------+--------------------------------------------------------+ +|Name |Description | ++---------------------+--------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully suspends. | +| |NOT_FOUND: if lmId not points to a valid logical machine| +| |DENIED: if the agent does not have permission to request| +| |the reset reason. | ++---------------------+--------------------------------------------------------+ +|uint32 bootflags |Boot reason flags. This parameter has the format: | +| |Bits[31] Valid. | +| |Set to 1 if the entire reason is valid. | +| |Set to 0 if the entire reason is not valid. | +| |Bits[30:29] Reserved, must be zero. | +| |Bit[28] Valid origin: | +| |Set to 1 if the origin field is valid. | +| |Set to 0 if the origin field is not valid. | +| |Bits[27:24] Origin. | +| |Bit[23] Valid err ID: | +| |Set to 1 if the error ID field is valid. | +| |Set to 0 if the error ID field is not valid. | +| |Bits[22:8] Error ID. | +| |Bit[7:0] Reason(WDOG, POR, FCCU and etc) | ++---------------------+--------------------------------------------------------+ +|uint32 shutdownflags |Shutdown reason flags. This parameter has the format: | +| |Bits[31] Valid. | +| |Set to 1 if the entire reason is valid. | +| |Set to 0 if the entire reason is not valid. | +| |Bits[30:29] Number of valid extended info words. | +| |Bit[28] Valid origin: | +| |Set to 1 if the origin field is valid. | +| |Set to 0 if the origin field is not valid. | +| |Bits[27:24] Origin. | +| |Bit[23] Valid err ID: | +| |Set to 1 if the error ID field is valid. | +| |Set to 0 if the error ID field is not valid. | +| |Bits[22:8] Error ID. | +| |Bit[7:0] Reason | ++---------------------+--------------------------------------------------------+ +|uint32 extinfo[0,20] |Array of extended info words(e.g. fault pc) | ++---------------------+--------------------------------------------------------+ + +LMM_POWER_ON +~~~~~~~~~~~~ + +message_id: 0xB +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully powers on. | +| |NOT_FOUND: if lmId not points to a valid logical machine. | +| |INVALID_PARAMETERS: if lmId is same as the caller. | +| |DENIED: if the agent does not have permission to manage the| +| |the LM specified by lmid. | ++------------------+-----------------------------------------------------------+ + +LMM_RESET_VECTOR_SET +~~~~~~~~~~~~~~~~~~~~ + +message_id: 0xC +protocol_id: 0x80 + ++-----------------------+------------------------------------------------------+ +|Parameters | ++-----------------------+------------------------------------------------------+ +|Name |Description | ++-----------------------+------------------------------------------------------+ +|uint32 lmid |ID of the Logical Machine | ++-----------------------+------------------------------------------------------+ +|uint32 cpuid |ID of the CPU inside the LM | ++-----------------------+------------------------------------------------------+ +|uint32 flags |Reset vector flags | +| |Bits[31:1] Reserved, must be zero. | +| |Bit[0] Table flag. | +| |Set to 1 if vector is the vector table base address | ++-----------------------+------------------------------------------------------+ +|uint32 resetVectorLow |Lower vector | ++-----------------------+------------------------------------------------------+ +|uint32 resetVectorHigh |Higher vector | ++-----------------------+------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if LM successfully powers on. | +| |NOT_FOUND: if lmId not points to a valid logical machine, | +| |or cpuId is not valid. +| |INVALID_PARAMETERS: if reset vector is invalid. | +| |DENIED: if the agent does not have permission to set the | +| |the reset vector for the CPU in the LM. | ++------------------+-----------------------------------------------------------+ + +NEGOTIATE_PROTOCOL_VERSION +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +message_id: 0x10 +protocol_id: 0x80 + ++--------------------+---------------------------------------------------------+ +|Parameters | ++--------------------+---------------------------------------------------------+ +|Name |Description | ++--------------------+---------------------------------------------------------+ +|uint32 version |The negotiated protocol version the agent intends to use | ++--------------------+---------------------------------------------------------+ +|Return values | ++--------------------+---------------------------------------------------------+ +|Name |Description | ++--------------------+---------------------------------------------------------+ +|int32 status |SUCCESS: if the negotiated protocol version is supported | +| |by the platform. All commands, responses, and | +| |notifications post successful return of this command must| +| |comply with the negotiated version. | +| |NOT_SUPPORTED: if the protocol version is not supported. | ++--------------------+---------------------------------------------------------+ + +Notifications +_____________ + +LMM_EVENT +~~~~~~~~~ + +message_id: 0x0 +protocol_id: 0x80 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 lmid |Identifier for the LM that caused the transition. | ++------------------+-----------------------------------------------------------+ +|uint32 eventlm |Identifier for the LM the event is for. | ++------------------+-----------------------------------------------------------+ +|uint32 flags |LM events: | +| |Bits[31:3] Reserved, must be zero. | +| |Bit[3] Wake (resume) event: | +| |1 LM has awakened. | +| |0 not a wake event. | +| |Bit[2] Suspend (sleep) event: | +| |1 LM has suspended. | +| |0 not a suspend event. | +| |Bit[1] Shutdown (off) event: | +| |1 LM has shutdown. | +| |0 not a shutdown event. | +| |Bit[0] Boot (on) event: | +| |1 LM has booted. | +| |0 not a boot event. | ++------------------+-----------------------------------------------------------+ + SCMI_BBM: System Control and Management BBM Vendor Protocol ============================================================== @@ -436,6 +891,288 @@ protocol_id: 0x81 | |0 no button change detected. | +------------------+-----------------------------------------------------------+ +SCMI_CPU: System Control and Management CPU Vendor Protocol +============================================================== + +This protocol allows an agent to start or stop a CPU. It is used to manage +auxiliary CPUs in an LM (e.g. additional cores in an AP cluster or +Cortex-M cores). +Note: For cores in AP cluster, ATF will use CPU protocol to handle them. + +The CPU protocol provides functions to: + +- Describe the protocol version. +- Discover implementation attributes. +- Discover the CPUs defined in the system. +- Start a CPU. +- Stop a CPU. +- Set the boot and resume addresses for a CPU. +- Set the sleep mode of a CPU. +- Configure wake-up sources for a CPU. +- Configure power domain reactions (LPM mode and retention mask) for a CPU. +- The CPU IDs can be found in the CPU section of the SoC DEVICE: SM Device + Interface. They can also be found in the SoC RM. See the CPU Mode Control + (CMC) list in General Power Controller (GPC) section. + +CPU settings are not aggregated and setting their state is normally exclusive +to one client. + +Commands: +_________ + +PROTOCOL_VERSION +~~~~~~~~~~~~~~~~ + +message_id: 0x0 +protocol_id: 0x82 + ++---------------+--------------------------------------------------------------+ +|Return values | ++---------------+--------------------------------------------------------------+ +|Name |Description | ++---------------+--------------------------------------------------------------+ +|int32 status | See ARM SCMI Specification for status code definitions. | ++---------------+--------------------------------------------------------------+ +|uint32 version | For this revision of the specification, this value must be | +| | 0x10000. | ++---------------+--------------------------------------------------------------+ + +PROTOCOL_ATTRIBUTES +~~~~~~~~~~~~~~~~~~~ + +message_id: 0x1 +protocol_id: 0x82 + ++---------------+--------------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status | See ARM SCMI Specification for status code definitions. | ++------------------+-----------------------------------------------------------+ +|uint32 attributes |Protocol attributes: | +| |Bits[31:16] Reserved, must be zero. | +| |Bits[15:0] Number of CPUs | ++------------------+-----------------------------------------------------------+ + +PROTOCOL_MESSAGE_ATTRIBUTES +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +message_id: 0x2 +protocol_id: 0x82 + ++---------------+--------------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: in case the message is implemented and available | +| |to use. | +| |NOT_FOUND: if the message identified by message_id is | +| |invalid or not implemented | ++------------------+-----------------------------------------------------------+ +|uint32 attributes |Flags that are associated with a specific function in the | +| |protocol. For all functions in this protocol, this | +| |parameter has a value of 0 | ++------------------+-----------------------------------------------------------+ + +CPU_ATTRIBUTES +~~~~~~~~~~~~~~ + +message_id: 0x4 +protocol_id: 0x82 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 cpuid |Identifier for the CPU | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if valid attributes are returned successfully. | +| |NOT_FOUND: if the cpuid is not valid. | ++------------------+-----------------------------------------------------------+ +|uint32 attributes |Bits[31:0] Reserved, must be zero | ++------------------+-----------------------------------------------------------+ +|char name[16] |NULL terminated ASCII string with CPU name up to 16 bytes | ++------------------+-----------------------------------------------------------+ + +CPU_START +~~~~~~~~~ + +message_id: 0x4 +protocol_id: 0x82 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 cpuid |Identifier for the CPU | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if the cpu is started successfully. | +| |NOT_FOUND: if cpuid is not valid. | +| |DENIED: the calling agent is not allowed to start this CPU.| ++------------------+-----------------------------------------------------------+ + +CPU_STOP +~~~~~~~~ + +message_id: 0x5 +protocol_id: 0x82 + ++------------------+-----------------------------------------------------------+ +|Parameters | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|uint32 cpuid |Identifier for the CPU | ++------------------+-----------------------------------------------------------+ +|Return values | ++------------------+-----------------------------------------------------------+ +|Name |Description | ++------------------+-----------------------------------------------------------+ +|int32 status |SUCCESS: if the cpu is started successfully. | +| |NOT_FOUND: if cpuid is not valid. | +| |DENIED: the calling agent is not allowed to stop this CPU. | ++------------------+-----------------------------------------------------------+ + +CPU_RESET_VECTOR_SET +~~~~~~~~~~~~~~~~~~~~ + +message_id: 0x6 +protocol_id: 0x82 + ++----------------------+-------------------------------------------------------+ +|Parameters | ++----------------------+-------------------------------------------------------+ +|Name |Description | ++----------------------+-------------------------------------------------------+ +|uint32 cpuid |Identifier for the CPU | ++----------------------+-------------------------------------------------------+ +|uint32 flags |Reset vector flags: | +| |Bit[31] Resume flag. | +| |Set to 1 to update the reset vector used on resume. | +| |Bit[30] Boot flag. | +| |Set to 1 to update the reset vector used for boot. | +| |Bits[29:1] Reserved, must be zero. | +| |Bit[0] Table flag. | +| |Set to 1 if vector is the vector table base address. | ++----------------------+-------------------------------------------------------+ +|uint32 resetVectorLow |Lower vector: | +| |If bit[0] of flags is 0, the lower 32 bits of the | +| |physical address where the CPU should execute from on | +| |reset. If bit[0] of flags is 1, the lower 32 bits of | +| |the vector table base address | ++----------------------+-------------------------------------------------------+ +|uint32 resetVectorhigh|Upper vector: | +| |If bit[0] of flags is 0, the upper 32 bits of the | +| |physical address where the CPU should execute from on | +| |reset. If bit[0] of flags is 1, the upper 32 bits of | +| |the vector table base address | ++----------------------+-------------------------------------------------------+ +|Return values | ++----------------------+-------------------------------------------------------+ +|Name |Description | ++----------------------+-------------------------------------------------------+ +|int32 status |SUCCESS: if the CPU reset vector is set successfully. | +| |NOT_FOUND: if cpuId does not point to a valid CPU. | +| |INVALID_PARAMETERS: the requested vector type is not | +| |supported by this CPU. | +| |DENIED: the calling agent is not allowed to set the | +| |reset vector of this CPU | ++----------------------+-------------------------------------------------------+ + +CPU_SLEEP_MODE_SET +~~~~~~~~~~~~~~~~~~ +message_id: 0x7 +protocol_id: 0x82 + ++----------------------+-------------------------------------------------------+ +|Parameters | ++----------------------+-------------------------------------------------------+ +|Name |Description | ++----------------------+-------------------------------------------------------+ +|uint32 cpuid |Identifier for the CPU | ++----------------------+-------------------------------------------------------+ +|uint32 flags |Sleep mode flags: | +| |Bits[31:1] Reserved, must be zero. | +| |Bit[0] IRQ mux: | +| |If set to 1 the wakeup mux source is the GIC, else if 0| +| |then the GPC | ++----------------------+-------------------------------------------------------+ +|uint32 sleepmode |target sleep mode | ++----------------------+-------------------------------------------------------+ +|Return values | ++----------------------+-------------------------------------------------------+ +|Name |Description | ++----------------------+-------------------------------------------------------+ +|int32 status |SUCCESS: if the CPU sleep mode is set successfully. | +| |NOT_FOUND: if cpuId does not point to a valid CPU. | +| |INVALID_PARAMETERS: the sleepmode or flags is invalid. | +| |DENIED: the calling agent is not allowed to configure | +| |the CPU | ++----------------------+-------------------------------------------------------+ + +CPU_INFO_GET +~~~~~~~~~~~~ +message_id: 0xC +protocol_id: 0x82 + ++----------------------+-------------------------------------------------------+ +|Parameters | ++----------------------+-------------------------------------------------------+ +|Name |Description | ++----------------------+-------------------------------------------------------+ +|uint32 cpuid |Identifier for the CPU | ++----------------------+-------------------------------------------------------+ +|Return values | ++----------------------+-------------------------------------------------------+ +|Name |Description | ++----------------------+-------------------------------------------------------+ +|int32 status |SUCCESS: if valid attributes are returned successfully.| +| |NOT_FOUND: if the cpuid is not valid. | ++----------------------+-------------------------------------------------------+ +|uint32 runmode |Run mode for the CPU | ++----------------------+-------------------------------------------------------+ +|uint32 sleepmode |Sleep mode for the CPU | ++----------------------+-------------------------------------------------------+ +|uint32 resetvectorlow |Reset vector low 32 bits for the CPU | ++----------------------+-------------------------------------------------------+ +|uint32 resetvecothigh |Reset vector high 32 bits for the CPU | ++----------------------+-------------------------------------------------------+ + +NEGOTIATE_PROTOCOL_VERSION +~~~~~~~~~~~~~~~~~~~~~~~~~~ +message_id: 0x10 +protocol_id: 0x82 + ++--------------------+---------------------------------------------------------+ +|Parameters | ++--------------------+---------------------------------------------------------+ +|Name |Description | ++--------------------+---------------------------------------------------------+ +|uint32 version |The negotiated protocol version the agent intends to use | ++--------------------+---------------------------------------------------------+ +|Return values | ++--------------------+---------------------------------------------------------+ +|Name |Description | ++--------------------+---------------------------------------------------------+ +|int32 status |SUCCESS: if the negotiated protocol version is supported | +| |by the platform. All commands, responses, and | +| |notifications post successful return of this command must| +| |comply with the negotiated version. | +| |NOT_SUPPORTED: if the protocol version is not supported. | ++--------------------+---------------------------------------------------------+ + SCMI_MISC: System Control and Management MISC Vendor Protocol ================================================================