Message ID | 20241218101142.1552618-3-andrei.cherechesu@oss.nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 41F30E77188 for <xen-devel@archiver.kernel.org>; Wed, 18 Dec 2024 10:12:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.860095.1272170 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1tNr2i-0006SP-I8; Wed, 18 Dec 2024 10:12:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 860095.1272170; Wed, 18 Dec 2024 10:12:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1tNr2i-0006SI-Ex; Wed, 18 Dec 2024 10:12:36 +0000 Received: by outflank-mailman (input) for mailman id 860095; Wed, 18 Dec 2024 10:12:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <SRS0=M/38=TL=oss.nxp.com=andrei.cherechesu@srs-se1.protection.inumbo.net>) id 1tNr2h-0006CD-5Z for xen-devel@lists.xenproject.org; Wed, 18 Dec 2024 10:12:35 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20614.outbound.protection.outlook.com [2a01:111:f403:2612::614]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 98d37f96-bd28-11ef-99a3-01e77a169b0f; Wed, 18 Dec 2024 11:12:33 +0100 (CET) Received: from DU0PR04MB9561.eurprd04.prod.outlook.com (2603:10a6:10:312::7) by VI1PR04MB10026.eurprd04.prod.outlook.com (2603:10a6:800:1df::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Wed, 18 Dec 2024 10:12:29 +0000 Received: from DU0PR04MB9561.eurprd04.prod.outlook.com ([fe80::9808:be1a:b32:173f]) by DU0PR04MB9561.eurprd04.prod.outlook.com ([fe80::9808:be1a:b32:173f%6]) with mapi id 15.20.8251.015; Wed, 18 Dec 2024 10:12:29 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Inumbo-ID: 98d37f96-bd28-11ef-99a3-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zPBKw+QBXayKwQJA1jzSdjayFgE0irfM2tBWNGDlUufLV9BsYEW2PJb7JhgGawgRFUuA6h1pjDshsuUyyNyjB5/wIRmk/6Okfj4IvExJ+uWjO3BqKDwKaWFURaLuy79PXwjWieq/FBZn/U9LSrDwg+IbAQkHqYvCvx5SjUX7zO9Wu2vC/xIaqHVoZZnXIhPiG8Z0+Bu6FaHCVdhbK05zVq0jeEB6G4XgdJPJLR05uscxnx1oguzCywCp57ccYMVVlv0Lw9yPv4fZx3b3mYrp9FPH24zSWkMLoIA8goj+ZJY8UPeiMm/n3Fo+jTNgoGSLtxhtLrvJaghDpYEFumHb3w== 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=TXpg2Ow88Eg+MIZFn0qzYuI7h2PxCnhsFX1nq8UccsY=; b=fbHAs1OmzPq+ZszFQiADe83xfl7cVaXDWFAWQm+vdafrG7QiOigVL+NPr3cj8BfiEvQ3XxdKDYjtQCuxmtd+gVqY5Cu0hc5njIBgv5EDt3fE8OoCiPZX5rWpfx1JnzbtC1raoKBg/lZFqOEzwIUSO9jyK5jTw6lEd4x/b8W/G6kpfEVJWsPqeJr+joY8oPqhQHMNkPUrV0wOtbiTc9Ci7JzSyqp1grPKhxqvd+xwKqeolxjDTVEhhX5dRMWIvCbwk/DpFdL8cppEVCevEJDDqtIIxGm0F4/0ajh+2Yy6XfqLRICUUar12zxCEI5bx2Gmd88pRGcV88c0h6T0aAFCTA== 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=TXpg2Ow88Eg+MIZFn0qzYuI7h2PxCnhsFX1nq8UccsY=; b=KN/MJuhXzY0sBw8Ia5pbG73W337qVRd0PnyUWvzth9J6XXCVeewVFdaNmf+70EFKkKF9qdEGkh57TJPGgad+VfNRaJNjc9urE228bGnCTyuXxUFVRwb/GlEExe3KJwv77pvq3lijsVQ2MoOaDYbBWnlYOP5+VGPS6VV+tYT5RCG7tgAlqtUeKHxvMsHHTw3qaTqDzrs7yZPDxbSgmV+S8ditBjpUSMuD2dUs9vWugyL80uSImGVT9lO5WA1t8keejfO26TxT1q4Kja/16sq/15A/PCNP10T1smCZsBAyKpS04QfejeM6C0R0xlrBPFb/D0sw1PUzhWXfZdSUQJI6aw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; From: "Andrei Cherechesu (OSS)" <andrei.cherechesu@oss.nxp.com> To: xen-devel@lists.xenproject.org Cc: S32@nxp.com, andrei.cherechesu@oss.nxp.com, Andrei Cherechesu <andrei.cherechesu@nxp.com>, Stefano Stabellini <sstabellini@kernel.org>, Julien Grall <julien@xen.org>, Bertrand Marquis <bertrand.marquis@arm.com>, Michal Orzel <michal.orzel@amd.com>, Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>, Julien Grall <jgrall@amazon.com> Subject: [PATCH v3 2/6] xen/arm: vsmc: Enable handling SiP-owned SCMI SMC calls Date: Wed, 18 Dec 2024 12:11:37 +0200 Message-ID: <20241218101142.1552618-3-andrei.cherechesu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218101142.1552618-1-andrei.cherechesu@oss.nxp.com> References: <20241218101142.1552618-1-andrei.cherechesu@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR02CA0228.eurprd02.prod.outlook.com (2603:10a6:20b:28f::35) To DU0PR04MB9561.eurprd04.prod.outlook.com (2603:10a6:10:312::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9561:EE_|VI1PR04MB10026:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d762712-821b-475b-d510-08dd1f4c7ab4 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|376014|1800799024|366016|52116014|38350700014; X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1nJ/rDkK5kJgOvbTZ+YzzmH650vEBgdYGBHAb2ZrY6NksjfyY2j0OkFbDU4dJX/g5OJRTr5RCSOMlVaRBJsw7O90trI8wx+1K0UIM9VoIDPU41pIO/gBIgfeYr8BUuPT2ketgd3RmILanYroB4ogNOcWg+QlRju8LJn8uNAKDf1Z8hHL3PhVz2R3iYLhk3wovi1YRLH0wTeC0yMbuWFn2Vd33cYFebK764wJbvvQrAioj3mgad81CUU4Obm0Drrr4SI5oIV+tqQc2/cTNiaJgRJzRTKQ+jXW76m0WYFM4iHhZB8GEpyiB2XBFTbWP//v6AaO1o2et8pWVT1RQoxHNmAO6v6zz5TxBr4FK5NIV4p2Srvik02gxEYYxgY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9561.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W0w03VaXg7RX7xINlexV8PcQ3wVFWDT22+WI9QQzFKqLvGHuLzcuxo2H6Q1qks8VMXaYvBdrqo9GJPc2GtUJ1Hz+LDq7TOsXmbugN0311iVujsjET+/l+Q766pOeoziT5PGlsBisaFcXnLRcxyblJQlCUM5fKn1BGWXeonawABA3LXapDQxzAczuNqVirEj7QeLeZW4CTeBP+Sh3iynxBiaxp7D59EB6gZ1yugU8zuBqALq+r2b8Msw7gbyvMX6U6C9RqdC5x4glviREQkcwc7rZ4BeduE1yQ0ZMhntWK4X22WiNy7FNfsOxPJuqkD9xMXnx4Lbaj7tX4XBZzyVFnI8TKPLXlpwSOHigai7wn58HJQuzCF5PPQZVD9R6KZK0RPWncigEixsr+gJ0pUSh+QfNhrCaEpHaRTKT24MUuLpxhxKgDnVh12AqFXXuM10C5X6RgS9nr7guIv2eNERKFHXsNJKjY719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DxLK0ueqOGHO1hsYdHKQerOIMXc7dL2PK0tlPAFS4y5VYGAV5qoQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d762712-821b-475b-d510-08dd1f4c7ab4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9561.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2024 10:12:29.4744 (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: CxAVD+5tjdDDXYp4sVR0U+eRIIv5q3asvbH3iUfKKEBBGHx0/fYb1x0vm+AQdsrfFu5yiwriv0b4JkZRiQqJkMpx9gaczZGfwt6SG6p7vfA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB10026 |
Series |
xen/arm: Add support for S32CC platforms and LINFlexD UART
|
expand
|
diff --git a/xen/arch/arm/vsmc.c b/xen/arch/arm/vsmc.c index f679cced7f..c4d225c45c 100644 --- a/xen/arch/arm/vsmc.c +++ b/xen/arch/arm/vsmc.c @@ -20,6 +20,7 @@ #include <asm/traps.h> #include <asm/vpsci.h> #include <asm/platform.h> +#include <asm/firmware/scmi-smc.h> /* Number of functions currently supported by Hypervisor Service. */ #define XEN_SMCCC_FUNCTION_COUNT 3 @@ -224,6 +225,19 @@ static bool handle_sssc(struct cpu_user_regs *regs) } } +/* Secure Calls defined by the Silicon Provider (SiP) */ +static bool handle_sip(struct cpu_user_regs *regs) +{ + /* Firstly, let each platform define custom handling for these SMCs */ + if ( platform_smc(regs) ) + return true; + + if ( scmi_is_enabled() ) + return scmi_handle_smc(regs); + + return false; +} + /* * vsmccc_handle_call() - handle SMC/HVC call according to ARM SMCCC. * returns true if that was valid SMCCC call (even if function number @@ -288,7 +302,7 @@ static bool vsmccc_handle_call(struct cpu_user_regs *regs) handled = handle_sssc(regs); break; case ARM_SMCCC_OWNER_SIP: - handled = platform_smc(regs); + handled = handle_sip(regs); break; case ARM_SMCCC_OWNER_TRUSTED_APP ... ARM_SMCCC_OWNER_TRUSTED_APP_END: case ARM_SMCCC_OWNER_TRUSTED_OS ... ARM_SMCCC_OWNER_TRUSTED_OS_END: