From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id pcyXJZ/APmo2iBkAWB0awg (envelope-from ) for ; Fri, 26 Jun 2026 14:10:39 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pcLqGxeZ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pcLqGxeZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 730571E0AA; Fri, 26 Jun 2026 14:10:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B05851E090 for ; Fri, 26 Jun 2026 14:10:36 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5B5D24BA23DD for ; Fri, 26 Jun 2026 18:10:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B5D24BA23DD Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pcLqGxeZ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pcLqGxeZ Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013069.outbound.protection.outlook.com [52.101.72.69]) by sourceware.org (Postfix) with ESMTPS id 2A88A4BA2E36 for ; Fri, 26 Jun 2026 18:09:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A88A4BA2E36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2A88A4BA2E36 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.72.69 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1782497391; cv=pass; b=pHbV0L91r/0cMDF1KyWinl/PjA59EWc+KdM7eRb6veTWwah5NlSOuBbA53/aASWO1Tu9BHzwxd+CJjG4wSK1R6QD05sdq7sPG+wlIJV1SsBHWYY0PMw1+DRgkL7VkryT19bKx2RJYMKqFYzNHnZ5p8h11f5wDpbv9JzMUcWnFaM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1782497391; c=relaxed/simple; bh=D00vnicVrZZtUOam2XcVLTRCyWS8KRMsgxXuEAXRCus=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=LrBs8jMkdqMeGTi8pNydjeADc25ilZ3nCe57xsJXoO40PgDE+sMgEERyjdIK3xwwWwzOPqeR2iFBdd3+rj/jenjymPYG+MzJ0rvf8vLXtVsPGjluPhH4EOJC4Ugc4XkGJCI9K021NZjpCFKn5VmcHnnjKxLN6eF7WN1UUgsj/lE= ARC-Authentication-Results: i=3; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pcLqGxeZ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pcLqGxeZ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A88A4BA2E36 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=tN5G5cW+m3QLBHIOzaGm9VrN+33F5qfaaBUCURClMw9oXJJDIg7/XajNjQAfxQ8ZI7OKoCJWDnl6UOMrONiwR4qyl4FA4hW0eRzLDF1D/1/lyVUxrntq26+ITUlV0G3TlV4HmZgOlEY/ZLBEVQjQrQG9Jix3ALLPTM7LYrQMvd+wVQbl3i4x2hI5k9R9VFBOrF/J8K/ywIvXtRzgDCClyNQqMMgbtN8IEZlGlV6FVhX2oahfrMIc4juaNQQutCQqJiAt0uVLrU9IONnyMP7k5/xrBn3dQb71r2HwU6WR85zlMxoi63LXENtDHXqi7wCoyLwMfjvYY6+we6Xby0yFgA== ARC-Message-Signature: i=2; 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=PeVOZR0Uqw9gL9KB3/3o0CTrHlqj7tHpNzfykFdlmAQ=; b=MG+RGGd/tmXUCsyHDu6MabNnytDulhvR50DVup/l39R793gXor6Pg4upCPjk84/d/rK9du9gD5esUR7DIbocVCAsS3vfVyqZR3C9C/coosACKrvhH7Sm+o3IqIXFKHjc+BaCT/hpNra5yhcWXPDblFrrXcVl1KDb/O2Q12+7tWPG6R7Mel4nLLer3MTdBnw244L2rUaSv8986ag/xGGT5I0jk3EqjsAOC3uAJb45cof6QDLnr0PQ9LwjsnftA8s4q0DWgViVBcIbEs/ghWiTjSkCxQvfuCQCkD1OFRp6ZOOUnout4oXrHbc/d9AErmUAFhqyUsu3uGpfGF5tAeuCwQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PeVOZR0Uqw9gL9KB3/3o0CTrHlqj7tHpNzfykFdlmAQ=; b=pcLqGxeZR6JBbzL5wXi5Qtpzudsn/c5XRw1MuzO8j8b40DV59GXA68a9WT+++5losI3HyhuUBjO8C8SgQaHXpjTzhET9boWFlLvK1jeKJJxz/uFkq+Q1rU4qoJUam/dP3aYDMiVJhMH/G+cB0RkKdzSmQMA5xeSoPsn6FeHqFD4= Received: from DU7P250CA0001.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:54f::23) by DBBPR08MB10770.eurprd08.prod.outlook.com (2603:10a6:10:532::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.159.17; Fri, 26 Jun 2026 18:09:37 +0000 Received: from DB1PEPF0003922D.eurprd03.prod.outlook.com (2603:10a6:10:54f:cafe::4e) by DU7P250CA0001.outlook.office365.com (2603:10a6:10:54f::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.159.17 via Frontend Transport; Fri, 26 Jun 2026 18:09:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DB1PEPF0003922D.mail.protection.outlook.com (10.167.8.100) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.181.6 via Frontend Transport; Fri, 26 Jun 2026 18:09:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hX11ZWx2pl7iXuVtw3ktAT6sZPU/Itx6uRpACCTVSOyZLwG3AiY6InoChhurf4gs7ZFwRuITZ3TXQudTgabspfOFTbBLb9tndtLpDJ+cDFmgOsVPq/ycErqJhx4ZnUAXL/gkhmp+Eqd7kgDfiz+k60eHlmjQ5EL+x1xxDFBA0F5XrNDx1VEBUSMYr1UfDuL1HrjT1iCNQFZHIXHdnA/M1gAKws1pKKX/JQLS6Q6RyQ5pc1rg+NmFDQxCuMPv9qw+8/sW0x1EnOyrLPINbZRTYlS8JqzOgPrV9aa7Cz8Hmwsh/8dUtkUS/ErQmJI67Tl/asYfcxDN5rSoZdaNb+cJTg== 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=PeVOZR0Uqw9gL9KB3/3o0CTrHlqj7tHpNzfykFdlmAQ=; b=irtBNgJ2SK6fJ/1g5mUOo4n330qjs2SYkMtyq1rlxNFc/ws1AfBx/Y0UC1EJJtVlvtyQXe/e8o2oQYPABuE1/lw1Kc0KsWjkI3nycZd9pNClcT20o/CVDGwdPgz+iNOgQchCwRNhph4rmCOnq+AAr4uCvCJEAF2N2z/sniyZ7l5s8ynuvAvuWli8QiukP2XskPzxIwVHhzwcHlswirKNa99vMObOeMxHuVoDGsyU/C9SYPWHXK2gPmrlvpSN1ISKK/yd0ptSM9/HiLuWTbwozXLuYBuAqT2/Fa+gIgPMrAombBVRYiUeVG3adZ5ZNcDhEV3A+GeWzl1ki8eKZwtssg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PeVOZR0Uqw9gL9KB3/3o0CTrHlqj7tHpNzfykFdlmAQ=; b=pcLqGxeZR6JBbzL5wXi5Qtpzudsn/c5XRw1MuzO8j8b40DV59GXA68a9WT+++5losI3HyhuUBjO8C8SgQaHXpjTzhET9boWFlLvK1jeKJJxz/uFkq+Q1rU4qoJUam/dP3aYDMiVJhMH/G+cB0RkKdzSmQMA5xeSoPsn6FeHqFD4= Received: from CWLP265CA0388.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:1d6::16) by AM9PR08MB6050.eurprd08.prod.outlook.com (2603:10a6:20b:285::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.159.17; Fri, 26 Jun 2026 18:08:32 +0000 Received: from AM1PEPF000252E0.eurprd07.prod.outlook.com (2603:10a6:400:1d6:cafe::bc) by CWLP265CA0388.outlook.office365.com (2603:10a6:400:1d6::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.159.17 via Frontend Transport; Fri, 26 Jun 2026 18:08:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by AM1PEPF000252E0.mail.protection.outlook.com (10.167.16.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.6 via Frontend Transport; Fri, 26 Jun 2026 18:08:32 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Fri, 26 Jun 2026 18:08:24 +0000 Received: from ip-10-249-56-67.eu-west-1.compute.internal (10.249.56.67) by mail.arm.com (10.240.25.138) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Fri, 26 Jun 2026 18:08:24 +0000 From: To: CC: , , , , , Srinath Parvathaneni Subject: [PATCH v2 1/7] gdb/aarch64: Add POR_EL0 register support for FEAT_S1POE Date: Fri, 26 Jun 2026 18:08:15 +0000 Message-ID: <20260626180821.376406-2-srinath.parvathaneni@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260626180821.376406-1-srinath.parvathaneni@arm.com> References: <20260626180821.376406-1-srinath.parvathaneni@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM1PEPF000252E0:EE_|AM9PR08MB6050:EE_|DB1PEPF0003922D:EE_|DBBPR08MB10770:EE_ X-MS-Office365-Filtering-Correlation-Id: 17b4e5a8-4f5e-4db1-9e83-08ded3ae15f4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|36860700016|82310400026|376014|23010399003|13003099007|3023799007|18002099003|22082099003|56012099006|5023799004|11063799006; X-Microsoft-Antispam-Message-Info-Original: MYKKvsNH+iLW52+fuP4Rov1cDTsNt8c/yE1KEL19bQZplUtxT1x6cSwdcaYQlu3krrMVXYrGqBiLZ0UWXf2BpGHhtw8LXv8Ba+fx1/o7D68mrXUBCD9aCnDXXntYfpWKnVYHIQziMf8688IU8F6TXzn42+7dCQy/Q3O1gfWGxnI08j8/FjRDmoaFoLD3j5aCknvzVFYn3cNwU0Fnl6pPhRwKdDHJ97m9pol6YnA3GiFG0h8ipx/Wyoz+JLVneY2iuxacoJrGZkvHzn1XPriShWTgQ5vcyGP9IzPGHVnuPWv/5VNAQ2faCG46macYPqm+ccDYGshYPrmrANdjxa/23DGidmu3Y7obyHX302wkjFAkntK8MnQeAG6YEJni7hWWv3RbVypt1GmPdE4p4V14aENxoJ/lWgAxWCvVjA4gYe7HAvyVXREas7ChoCVJBXMUYhGPIO1hhNGGxdiX1vlfC9Ylu2MQ8PS/uCnv1sZYZHeeCFN6QGNCRGk6B/jlgK7d9FkPUHAUpfUxiNf3oOpJ/n6S4gg96aLGo5h6zXYbVbCbDlyszqK1zXZf7GItFrjT3w4QGT9pKMZhR9epn6pX/pcz9HT5j49MYUvC6BKjd5LzRQSs7SfYmYmOwoVKQisX+/81AB4fowx89ntrJtI0lbHWQiXJyVqU0HSSi4+SNztGy2j81faWN7dpqSesTcmhifDxrCXxlAKdEjZtRchu4w== X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700016)(82310400026)(376014)(23010399003)(13003099007)(3023799007)(18002099003)(22082099003)(56012099006)(5023799004)(11063799006); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: GTP1CSxC8bHy3vMcrL2thmJfG5P7JNNkaB5MtnXBBcJfQ+MpXAaq9+iKlMYaA7GSjhoL+X2jZM7qxtsZ+ogBh27cpAvHA65CqXLolwhR8dqNP6193jV/r8f1e1WT1suu9XXO5IDngTQcEk2khqZjdODxS5BGIo5j58iE6WfO7uUDXrwFvsaVFa5YsUYytvzjVjYNZiqlpE/8n0NIPjTDHXt4P1+LSS7P0wfS1gfLgEOxw70cRboZrH0yieJeovq2adUf62ECr4cNTysbgnkJi4EN5b0hY4vJbEIE/XgU5Hu42xrUOHdG2yevXmwoOhcfvGdH/1izljdVry9ZwbXsbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6050 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF0003922D.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: aa68fc91-839b-4f91-b4b2-08ded3adef0e X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|82310400026|23010399003|36860700016|14060799003|35042699022|13003099007|22082099003|18002099003|5023799004|11063799006|56012099006|3023799007; X-Microsoft-Antispam-Message-Info: +LU1c7ZsseXsYB/Dr/Gz5lvrpAdhIuFi52/6N2ynF/5Zd8uNhyro0TQsU4ozmfU31A3s0KDID/PSs6AudU4vPgSfIVfrSZjQDPXB3RsZsM9kNNIPxq1IoG4deVsxeoxwesGLHmIVo3KmIMv8L0SddrpW77rqkAtjpUSauJKxaenZdpnMMeHS6EbhXCWluzNz+EVHcsf1WOauNZmUVc7w9f5cEiISivzH13ISM7LbICrarCz2NwZFnoJXzcaiQArhKI58RSt6PBrRR2L0RhD02JbLjGyI9kBadK1RXU+vEgbYZ2nB8mZB+ZkOxMtzSqZI5Wb7CI24gGZxNib6dq0bzG5WRzjjcwXhT1rShJ9Bz9q+RwD23G5epmeiKvbQu3Q2VzavJdYJJ9nNWEDZjEMPe3zFNX94vIX5bd1GpEA5wUhDEtY09LMjdJWRT5VcVK/jmDPj2Mab3YUWhnAqBI3GIWE/adJMIrmVdlHQSPFimLbFn/l5c3tIzRBLX9yfLpluFW0vuoDooQWspRrUTM2d/NarFGeyWNLIiX2XtFUJLTPsb6BY0vB9WLZRfuO4Gzbu6V16aN/HFjOOCeUOEM2VCwFwz2jTNm44/t7mkhm4J6UfX8B3ocekDuX5C73x6obTv54MM90Fiuj348vaSZ97ERakBc0XWfb3ii+fccDYSwDvxm4F3nI/8uIsCL8X4CEu0KvBBJegk36aSnTmstsLKw== X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(1800799024)(82310400026)(23010399003)(36860700016)(14060799003)(35042699022)(13003099007)(22082099003)(18002099003)(5023799004)(11063799006)(56012099006)(3023799007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BifvvdCq7c+dAQTPZnLKbwN9uZ+E9Zns8DOrmZsfl9uPYGlSkgiMNYkJR/OndkJ5vbI8Avkf2Hr494XUeOx4XBmSURJ/GWzcc2kaJ3zkbY+L9d5I2tgCy/405Wq6YEy4Iwt6QXWoDymTVn0ATGLtC0ZbDv+37fcpv0HUvMaDyn6ZOqNu6CzXWOsO6f5jeZDEQcEDyp4BRSA43IfF74uHbtjZ9wF80Bj6XgEhiCPgC3vptFRyUArSFQXh1+lsrI/9rYd6O8JBqPEO6YpYZmwfJ7wYi4WGUmJbMU0WRJq4qOXxS4148PxoZJS+ExERyElAOBpvbqUCo56bTdMqfXxsQiouMObaWSG0RRFYAkvE3D9aSzitm1cWs4k2hazAU+4X47xp2Xcki42wFLz9SVamWcQ/c9Y3R3zZdNZrpkugBqrTwHkJIdbryL1rv3QQ54z4 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2026 18:09:37.8191 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17b4e5a8-4f5e-4db1-9e83-08ded3ae15f4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF0003922D.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10770 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Srinath Parvathaneni Add support for the FEAT_S1POE POR_EL0 register on AArch64. This patch adds POR_EL0 to the AArch64 register set and reads/writes it using the NT_ARM_POE ptrace regset. With this change, POR_EL0 is available through: * info registers * info registers por_el0 * p $por_el0 * p/x $por_el0 * set $por_el0 = --- gdb/Makefile.in | 2 ++ gdb/aarch64-linux-nat.c | 66 ++++++++++++++++++++++++++++++++++++ gdb/aarch64-linux-tdep.c | 1 + gdb/aarch64-tdep.c | 18 ++++++++++ gdb/aarch64-tdep.h | 11 +++++- gdb/arch/aarch64-poe-linux.h | 29 ++++++++++++++++ gdb/arch/aarch64.c | 4 +++ gdb/arch/aarch64.h | 7 +++- gdb/features/Makefile | 1 + gdb/features/aarch64-poe.c | 14 ++++++++ gdb/features/aarch64-poe.xml | 12 +++++++ gdb/nat/aarch64-poe-linux.h | 28 +++++++++++++++ include/elf/common.h | 2 ++ 13 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 gdb/arch/aarch64-poe-linux.h create mode 100644 gdb/features/aarch64-poe.c create mode 100644 gdb/features/aarch64-poe.xml create mode 100644 gdb/nat/aarch64-poe-linux.h diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 57f384170ab..3dc9cd07dcb 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1292,6 +1292,7 @@ HFILES_NO_SRCDIR = \ arch/aarch32.h \ arch/aarch64-fpmr-linux.h \ arch/aarch64-gcs-linux.h \ + arch/aarch64-poe-linux.h \ arch/aarch64.h \ arch/aarch64-insn.h \ arch/aarch64-mte.h \ @@ -1540,6 +1541,7 @@ HFILES_NO_SRCDIR = \ namespace.h \ nat/aarch64-fpmr-linux.h \ nat/aarch64-gcs-linux.h \ + nat/aarch64-poe-linux.h \ nat/aarch64-hw-point.h \ nat/aarch64-linux.h \ nat/aarch64-linux-hw-point.h \ diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index 52ace4aab41..54265920d69 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -34,6 +34,7 @@ #include "arch/arm.h" #include "nat/aarch64-fpmr-linux.h" #include "nat/aarch64-gcs-linux.h" +#include "nat/aarch64-poe-linux.h" #include "nat/aarch64-linux.h" #include "nat/aarch64-linux-hw-point.h" #include "nat/aarch64-mte-linux-ptrace.h" @@ -569,6 +570,54 @@ fetch_gcsregs_from_thread (regcache *regcache) &user_gcs.features_locked); } +/* Fill GDB's register array with the POE register value from the current + thread. */ + +static void +fetch_poeregs_from_thread (regcache *regcache) +{ + aarch64_gdbarch_tdep *tdep + = gdbarch_tdep (regcache->arch ()); + + gdb_assert (tdep->has_poe ()); + + uint64_t user_poe; + iovec iovec; + + iovec.iov_base = &user_poe; + iovec.iov_len = sizeof (user_poe); + + int tid = get_ptrace_pid (regcache->ptid ()); + if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_POE, &iovec) != 0) + perror_with_name (_("Unable to fetch POE register")); + + regcache->raw_supply (tdep->poe_regnum, &user_poe); +} + +/* Store the NT_ARM_POE register contents from GDB's REGCACHE to the + thread associated with REGCACHE. */ + +static void +store_poeregs_to_thread (struct regcache *regcache) +{ + aarch64_gdbarch_tdep *tdep + = gdbarch_tdep (regcache->arch ()); + + gdb_assert (tdep->has_poe ()); + + int tid = regcache->ptid ().lwp (); + + iovec iovec; + uint64_t user_poe; + iovec.iov_base = &user_poe; + iovec.iov_len = sizeof (user_poe); + + regcache->raw_collect (tdep->poe_regnum, &user_poe); + + if (ptrace (PTRACE_SETREGSET, tid, NT_ARM_POE, &iovec) != 0) + perror_with_name (_("Unable to store POE register")); +} + /* Store to the current thread the valid GCS register set in the GDB's register array. */ @@ -683,6 +732,9 @@ aarch64_fetch_registers (struct regcache *regcache, int regno) if (tdep->has_gcs_linux ()) fetch_gcsregs_from_thread (regcache); + if (tdep->has_poe ()) + fetch_poeregs_from_thread (regcache); + if (tdep->has_fpmr ()) fetch_fpmr_from_thread (regcache); } @@ -722,6 +774,10 @@ aarch64_fetch_registers (struct regcache *regcache, int regno) && (regno == tdep->gcs_reg_base || regno == tdep->gcs_linux_reg_base || regno == tdep->gcs_linux_reg_base + 1)) fetch_gcsregs_from_thread (regcache); + /* POE register? */ + else if (tdep->has_poe () && (regno == tdep->poe_regnum)) + fetch_poeregs_from_thread (regcache); + /* FPMR? */ else if (tdep->has_fpmr () && (regno == tdep->fpmr_regnum)) fetch_fpmr_from_thread (regcache); @@ -802,6 +858,9 @@ aarch64_store_registers (struct regcache *regcache, int regno) if (tdep->has_fpmr ()) store_fpmr_to_thread (regcache); + + if (tdep->has_poe ()) + store_poeregs_to_thread (regcache); } /* General purpose register? */ else if (regno < AARCH64_V0_REGNUM) @@ -837,6 +896,10 @@ aarch64_store_registers (struct regcache *regcache, int regno) else if (tdep->has_fpmr () && regno == tdep->fpmr_regnum) store_fpmr_to_thread (regcache); + /* POE register? */ + else if (tdep->has_poe () && regno == tdep->poe_regnum) + store_poeregs_to_thread (regcache); + /* PAuth registers are read-only. */ } @@ -1024,6 +1087,9 @@ aarch64_linux_nat_target::read_description () /* Check for FPMR. */ features.fpmr = hwcap2 & HWCAP2_FPMR; + /* Check for POE support. */ + features.poe = hwcap2 & HWCAP2_POE; + return aarch64_read_description (features); } diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index f11eccc1bc1..4a6bc3158c8 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -53,6 +53,7 @@ #include "arch/aarch64-fpmr-linux.h" #include "arch/aarch64-gcs-linux.h" +#include "arch/aarch64-poe-linux.h" #include "arch/aarch64-mte.h" #include "arch/aarch64-mte-linux.h" #include "arch/aarch64-pauth-linux.h" diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 886e7ce1e7b..f1e1a9c7a19 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -164,6 +164,11 @@ static const char *const aarch64_gcs_register_names[] = { "gcspr" }; +static const char *const aarch64_poe_register_names[] = { + /* Permission Overlay Extension Register. */ + "por_el0" +}; + static const char *const aarch64_gcs_linux_register_names[] = { /* Field in struct user_gcs. */ "gcs_features_enabled", @@ -4556,6 +4561,19 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) fpmr_regnum, "fpmr"); } + int poe_regnum = -1; + const struct tdesc_feature *feature_poe + = tdesc_find_feature (tdesc, "org.gnu.gdb.aarch64.poe"); + if (feature_poe != nullptr) + { + poe_regnum = num_regs; + for (i = 0; i < ARRAY_SIZE (aarch64_poe_register_names); i++) + valid_p &= tdesc_numbered_register (feature_poe, tdesc_data.get (), + poe_regnum + i, + aarch64_poe_register_names[i]); + num_regs++; + } + int first_sme_regnum = -1; int first_sme2_regnum = -1; int first_sme_pseudo_regnum = -1; diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index dff05a08f84..8029725b145 100644 --- a/gdb/aarch64-tdep.h +++ b/gdb/aarch64-tdep.h @@ -208,6 +208,16 @@ struct aarch64_gdbarch_tdep : gdbarch_tdep_base return gcs_linux_reg_base != -1; } + /* POE register. This is -1 if no POE feature is available. */ + int poe_regnum = -1; + + /* Returns true if the target supports the Linux POE feature. */ + bool + has_poe () const + { + return poe_regnum != -1; + } + /* First FPMR register. This is -1 if FPMR is not supported. */ int fpmr_regnum = -1; @@ -224,7 +234,6 @@ aarch64_features_from_target_desc (const struct target_desc *tdesc); extern int aarch64_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr); - displaced_step_copy_insn_closure_up aarch64_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, diff --git a/gdb/arch/aarch64-poe-linux.h b/gdb/arch/aarch64-poe-linux.h new file mode 100644 index 00000000000..d6e4a001cbf --- /dev/null +++ b/gdb/arch/aarch64-poe-linux.h @@ -0,0 +1,29 @@ +/* Common Linux target-dependent definitions for AArch64 POE + + Copyright (C) 2026 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef GDB_ARCH_AARCH64_POE_LINUX_H +#define GDB_ARCH_AARCH64_POE_LINUX_H + +/* Feature check for Permission Overlay Extension. */ +#define AARCH64_HWCAP2_POE (1ULL << 63) + +/* Data or instruction abort caused by Protection Key Violation. */ +#define AARCH64_SEGV_PKUERR 4 + +#endif /* GDB_ARCH_AARCH64_POE_LINUX_H */ diff --git a/gdb/arch/aarch64.c b/gdb/arch/aarch64.c index 2401a325b7b..a567938d06d 100644 --- a/gdb/arch/aarch64.c +++ b/gdb/arch/aarch64.c @@ -28,6 +28,7 @@ #include "../features/aarch64-sme2.c" #include "../features/aarch64-tls.c" #include "../features/aarch64-gcs.c" +#include "../features/aarch64-poe.c" #include "../features/aarch64-gcs-linux.c" /* See arch/aarch64.h. */ @@ -77,6 +78,9 @@ aarch64_create_target_description (const aarch64_features &features) if (features.fpmr) regnum = create_feature_aarch64_fpmr (tdesc.get (), regnum); + if (features.poe) + regnum = create_feature_aarch64_poe (tdesc.get (), regnum); + return tdesc; } diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h index cf7318cbe74..4e4b50f729e 100644 --- a/gdb/arch/aarch64.h +++ b/gdb/arch/aarch64.h @@ -35,6 +35,7 @@ struct aarch64_features bool pauth = false; bool mte = false; bool fpmr = false; + bool poe = false; /* A positive TLS value indicates the number of TLS registers available. */ uint8_t tls = 0; @@ -70,7 +71,8 @@ inline bool operator==(const aarch64_features &lhs, const aarch64_features &rhs) && lhs.sme2 == rhs.sme2 && lhs.gcs == rhs.gcs && lhs.gcs_linux == rhs.gcs_linux - && lhs.fpmr == rhs.fpmr; + && lhs.fpmr == rhs.fpmr + && lhs.poe == rhs.poe; } namespace std @@ -103,6 +105,9 @@ namespace std /* FPMR feature. */ h = h << 1 | features.fpmr; + + /* POE feature. */ + h = h << 1 | features.poe; return h; } }; diff --git a/gdb/features/Makefile b/gdb/features/Makefile index 161a7453d66..cc77e5bb652 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -207,6 +207,7 @@ FEATURE_XMLFILES = aarch64-core.xml \ aarch64-pauth.xml \ aarch64-mte.xml \ aarch64-gcs.xml \ + aarch64-poe.xml \ aarch64-gcs-linux.xml \ arc/v1-core.xml \ arc/v1-aux.xml \ diff --git a/gdb/features/aarch64-poe.c b/gdb/features/aarch64-poe.c new file mode 100644 index 00000000000..e964a625173 --- /dev/null +++ b/gdb/features/aarch64-poe.c @@ -0,0 +1,14 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: aarch64-poe.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_aarch64_poe (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.poe"); + tdesc_create_reg (feature, "por_el0", regnum++, 1, "system", 64, "uint64"); + return regnum; +} diff --git a/gdb/features/aarch64-poe.xml b/gdb/features/aarch64-poe.xml new file mode 100644 index 00000000000..43ee09e01d6 --- /dev/null +++ b/gdb/features/aarch64-poe.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/gdb/nat/aarch64-poe-linux.h b/gdb/nat/aarch64-poe-linux.h new file mode 100644 index 00000000000..3d858d3ff92 --- /dev/null +++ b/gdb/nat/aarch64-poe-linux.h @@ -0,0 +1,28 @@ +/* Common native Linux definitions for AArch64 Permission Overlay Extension. + + Copyright (C) 2026 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef GDB_NAT_AARCH64_POE_LINUX_H +#define GDB_NAT_AARCH64_POE_LINUX_H + +/* Feature check for Permission Overlay Extension. */ +#ifndef HWCAP2_POE +#define HWCAP2_POE (1ULL << 63) +#endif /* HWCAP2_POE */ + +#endif /* GDB_NAT_AARCH64_POE_LINUX_H */ diff --git a/include/elf/common.h b/include/elf/common.h index 1ae68221a89..f811b8daeb5 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -760,6 +760,8 @@ /* Note: name must be "LINUX". */ #define NT_ARM_FPMR 0x40e /* AArch64 FPMR. */ /* Note: name must be "LINUX". */ +#define NT_ARM_POE 0x40f /* AArch64 POE register. */ + /* Note: name must be "LINUX". */ #define NT_ARM_GCS 0x410 /* AArch64 Guarded Control Stack registers. */ /* Note name must be "LINUX". */ -- 2.43.0