From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2081.outbound.protection.outlook.com [40.107.7.81]) by sourceware.org (Postfix) with ESMTPS id 53FB93858D1E for ; Mon, 3 Jul 2023 09:52:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 53FB93858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KStLLa5TAuNqrjZvjUGvZC84lpC9VH4dlmF1yUSJh7g=; b=6Xgls9fWjxbZCbNGYWVTfGh1VrCH/eORu+5w6im1/ThgPmL23iGNe8n/b/2hrhoCkXtin/K8HdAcqCxzAERDWBX7AmTMPD8l4pmvpepC7iTT+Mr5tOH+rzt9JOBumBFfjQjTHYP8KHt//rVEnaMIVM7oDUA4HSbXmKq7zjcPg6c= Received: from DUZPR01CA0043.eurprd01.prod.exchangelabs.com (2603:10a6:10:468::6) by AS8PR08MB8684.eurprd08.prod.outlook.com (2603:10a6:20b:562::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Mon, 3 Jul 2023 09:52:46 +0000 Received: from DBAEUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:468:cafe::af) by DUZPR01CA0043.outlook.office365.com (2603:10a6:10:468::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.30 via Frontend Transport; Mon, 3 Jul 2023 09:52:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT047.mail.protection.outlook.com (100.127.143.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17 via Frontend Transport; Mon, 3 Jul 2023 09:52:46 +0000 Received: ("Tessian outbound 546d04a74417:v142"); Mon, 03 Jul 2023 09:52:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4a709960f16f2571 X-CR-MTA-TID: 64aa7808 Received: from 00556992af23.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F869E865-AEE0-40AB-AAD6-5801C5930DCF.1; Mon, 03 Jul 2023 09:52:39 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 00556992af23.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 03 Jul 2023 09:52:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U8PqhSOzGBIvCd4K8eP+VATS2o0t/8kEVYjACYvW/nk/bDu5eEcFQKGq4uyPeYDN7myAf0vgqjn5eb/idmoZ/BJDtMGtZTGTCFVppAHSgMs+5ucHvB7d8FoHvmDhMupUeHiEIxLj1nd6qXgZ69HcsmXUng432eFgn6llMSdlsYztEBPLTUFIqWH64pUAN7KkTreNKhMWn+ad8+41EW76lTHlWZWoEQPLa6leRvV0PIZxhi7H86jo6AfnDZLlo4CqmuF8KNA+Zei5rZuyL3Fh70e7UsZLMn/dNonF9XSVJs/xFQmP53iA1VQnX4EWBo+0KmlCNtektOwGmyty3RSbJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=KStLLa5TAuNqrjZvjUGvZC84lpC9VH4dlmF1yUSJh7g=; b=RRm19YNT++Pg3WeyyCUSJMCw9zcwXTVnZKFktP0vaJt0TpFRuJkFT/leEiHahdsq8w7yPUhLmDw1r+7kyds4f9NC17yOuSBmlUi0Yw/nIA0cGMWkOEYc/aDMDbNxUgn5wgiF07MMIC4bit+A5ouQMdlRox9KJD2KDbfYjxbh/HPYoFKNGVx/QNZWjf19rUfQkgshhHxOHcJz7ZDXa3KRaf9c5rxYJGpdSYac8US8TueObflDaVXeIIxraQOpJej1IMoLmevvvjncByLgrQTFiGF0PZCTHcQDS8Srh+iqlPcSNYQTnrv/0DmQI7NcrO4nz3PKQR+ETJ283DcfWJhcKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KStLLa5TAuNqrjZvjUGvZC84lpC9VH4dlmF1yUSJh7g=; b=6Xgls9fWjxbZCbNGYWVTfGh1VrCH/eORu+5w6im1/ThgPmL23iGNe8n/b/2hrhoCkXtin/K8HdAcqCxzAERDWBX7AmTMPD8l4pmvpepC7iTT+Mr5tOH+rzt9JOBumBFfjQjTHYP8KHt//rVEnaMIVM7oDUA4HSbXmKq7zjcPg6c= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AM9PR08MB5892.eurprd08.prod.outlook.com (2603:10a6:20b:2dd::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Mon, 3 Jul 2023 09:52:38 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::c6b8:4dc0:6f9:7f40]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::c6b8:4dc0:6f9:7f40%3]) with mapi id 15.20.6544.024; Mon, 3 Jul 2023 09:52:38 +0000 Message-ID: <8eaf8d52-3814-bf9c-2c4b-dc2b5b0eae62@arm.com> Date: Mon, 3 Jul 2023 10:52:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3 16/16] [gdb/docs] sme: Document SME registers and features Content-Language: en-US To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20230630134616.1238105-1-luis.machado@arm.com> <20230630134616.1238105-17-luis.machado@arm.com> <83fs68qa7x.fsf@gnu.org> From: Luis Machado In-Reply-To: <83fs68qa7x.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LNXP265CA0020.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::32) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AM9PR08MB5892:EE_|DBAEUR03FT047:EE_|AS8PR08MB8684:EE_ X-MS-Office365-Filtering-Correlation-Id: 222b4879-c44e-463b-1555-08db7bab410d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: nBGH4MfeYa/o6GMElDOaaZnicG5IZ5i4DtdAxSubZP7VxC3qgeXSGt9RZYHioGyJ8IAKD1cYozWxxtIVP3dVTEDJSR4tm5WNLmbwMlO4MrzjJonJCXdQyV3yyI4dlkcrwAeWWP1BvNJeSj8UKUM3fyjznsKDefIer8YjPr4COAYm2Ay30afcp3ePWSgD2g3H4s/x++xz10YiDMKsHLFiPD2MVFqYjH+1GfsbX/1MEkFLHy7eSCzx6rJb8Ofh4Par6cOlH2twDJpRq64FYVmdh5or7SH4EPKY4CR/qXi0WzUwAuSL9Ul4BxzVJj/ua3vQgwwEtvC2GtnntGfqIinO0dMrDW26wVw/UuAxSUr3uPk9IatQ1RRXKRip56pHhHOON3RRvy/DnVZBheFNXLvb68VIUKVqBtf+Paurldumt5xCu+Mag5hrGUtZpI2DunZ1KY8Rkn8miEhgGgCpdA0p7Z0/MDZKd43U3RiVdpQMKvaYe4bFdY9xel/D7mUdITm8mxmq+VmNcHqeS4VIwmhtvgAcKMwgx15v4O5BZkShWlHvcze+VhojuCdKRKIih9PavQZrfFioF89/KsxrlZ0zfbM+PlOjGhiK/pqCk2SiKkAU6iDi6RKE5i33gPFbpUPTJ3VrIAyZT3HLqx1c0jlHqA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(376002)(396003)(346002)(366004)(451199021)(6506007)(53546011)(6512007)(316002)(66556008)(4326008)(38100700002)(66946007)(66476007)(6916009)(2616005)(83380400001)(186003)(26005)(478600001)(2906002)(31686004)(8936002)(8676002)(44832011)(36756003)(5660300002)(31696002)(86362001)(6486002)(41300700001)(6666004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5892 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a42b845b-29f9-424c-1a21-08db7bab3bef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QN7UxZQr4fo6pUOfwPoKyfCDnhCG77WrtsocBk9Aa0QyggCuGvEXIEA2c2tYnDtDcjtpfu8BSdZNaD2dFhngIZqyOoHC/Fd6CeOu0ktUPAPlkBZRuNMtzOKw+gcYIzhBHHKDcUyBXNb0TQE4bLdkpHdePK6pgDvWm/1cfmTJU9SncPHWi53HPWoUrXi0JBEM4rRnta3FsjG1nHCLYIINqCryxlWyiYU0Ui8wHCuQhCt2sijI/ry0uWZLdphJ5rKl44IFogra05buLn4NLmalfBUjgU6bbkKYL6Ne41htH8045ILQ5FtBAzcWInx7qPdK7FADjBfcY7YNrBam5QDE//siK9A3GV5SR3QgH8lkSCONM02L8Q72U2HR3bD+h+aCP7vxWypuiHGrAzvQ5lB2VmmTTiC4+JOFDDKsu+yIMF0so1DzZq+6bxfj7oV4iJivLjXxZdOrEEtt5hktHld15m2pLsSRIWBoJ7NquELyxe7nVroFqe62w6UQ0Vy0LwgWq6Du4siJFq+ydTvxvXOK5JO8xVgcjjKwG6xXyTbE0mNPcwFXMYOUkHaj6iI0S/W8DhgNXHh4+f29Nvm1V31UoiAWLALxVIpTkmYEAA68gmZZlJm1PYsLuDJkEtCxGo++MQWYBTza6YOybTn90DzVVf3QGEzBqsI/veACOUqnwXveDBsZyTABMf/Fx6dURSCaSLjlAAt2Riqfn7aXE10yw8rLBLa4sGyLEJjjiyXO5Kq8OhO+uLKcL6R9IBHFUle/8Hl1zl8v3GSSO3mLgH6hWg== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(346002)(451199021)(46966006)(40470700004)(36840700001)(44832011)(31686004)(4326008)(70586007)(70206006)(316002)(478600001)(2906002)(36756003)(8936002)(8676002)(6862004)(5660300002)(40460700003)(336012)(41300700001)(31696002)(40480700001)(36860700001)(6512007)(86362001)(6666004)(82310400005)(6486002)(53546011)(6506007)(26005)(186003)(47076005)(82740400003)(2616005)(83380400001)(81166007)(356005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2023 09:52:46.3901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 222b4879-c44e-463b-1555-08db7bab410d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8684 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 7/1/23 09:58, Eli Zaretskii wrote: >> Date: Fri, 30 Jun 2023 14:46:16 +0100 >> From: Luis Machado via Gdb-patches >> >> Updates since v2: >> >> - More adjustments based on reviews. >> - Fixed incorrect number of tile pseudo-registers. >> - Fixed naming of tile slice pseudo-registers. >> - More detail about SME and how gdb implements it. >> - Attempted to clarify the text a bit more. >> >> Updates since v1: >> >> - Made SME text more thorough. >> - Adjusted text based on upstream reviews. >> - Fixed documentation errors (missing itemization for SME registers). >> >> Provide documentation for the SME feature and other information that >> should be useful for users that need to debug a SME-capable target. >> >> --- >> gdb/NEWS | 11 ++ >> gdb/doc/gdb.texinfo | 249 ++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 260 insertions(+) > > Thanks. > >> diff --git a/gdb/NEWS b/gdb/NEWS >> index fd42864c692..720008a5d97 100644 >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -3,6 +3,17 @@ >> >> *** Changes since GDB 13 >> >> +* GDB now supports the AArch64 Scalable Matrix Extension (SME), which includes >> + a new matrix register named ZA, a new thread register TPIDR2 and a new vector >> + length register SVG (streaming vector granule). GDB also supports tracking >> + ZA state across signal frames. >> + >> + Some features are still under development or are dependent on ABI specs that >> + are still in alpha stage. For example, manual function calls with ZA state >> + don't have any special handling, and tracking of SVG changes based on >> + DWARF information is still not implemented, but there are plans to do so in >> + the future. >> + >> * The AArch64 'org.gnu.gdb.aarch64.pauth' Pointer Authentication feature string >> has been deprecated in favor of the 'org.gnu.gdb.aarch64.pauth_v2' feature >> string. > > This part is OK. > >> +@item >> +@var{vl}: The vector length, in bytes. It defines the size of each @code{z} >> +register. ^^^ > > That should be "Z", in upper case. > >> +(@var{svl} for short). @xref{vl} @xref{svl} > ^ ^ > Periods missing there. Also, please leave two spaces between > sentences. > >> +The minimum size of the @code{ZA} register is 16 x 16 (256) bytes, and the >> +maximum size is 256 x 256 (65536) bytes. In streaming mode, with bit @sc{sm} >> +set, the size of the @code{ZA} register is the size of all the SVE @code{z} >> +registers combined. ^^^ > > That should be "Z", upper-case. > >> +There is a total of 31 @code{ZA} tile pseudo-registers. They are >> +@code{za0b}, @code{za0h} through @code{za1h}, @code{zas0} through @code{zas3}, >> +@code{zad0} through @code{zad7} and @code{zaq0} through @code{zaq15}. > > These pseudo-registers should also be named in upper-case, right? > >> +The tile slice pseudo-registers have the following naming pattern: >> +@code{za<@var{tile number}><@var{direction}><@var{qualifier}> >> +<@var{slice number}>}. > > Likewise here. > >> +One such example is calling functions in the program being debugged by >> +@value{GDBN}. Such calls are not @acronym{SME}-aware and thus don't take into >> +account the @code{SVCR} pseudo-register bits nor the @code{ZA} register >> +contents. @xref{Calling} > ^ > Period missing there. > >> +The @url{https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#the-za-lazy-saving-scheme, >> +lazy saving scheme} involving the @code{tpidr2} register is not yet supported >> +by @value{GDBN}, though the @code{tpidr2} register is known and supported >> +by @value{GDBN}. > > The "tpidr2" register name should be in upper-case. > >> +Lastly, an important limitation for @code{gdbserver} is its inability to >> +communicate @var{svl} changes to @value{GDBN}. This means @code{gdbserver}, >> +even though it is capable of adjusting its internal caches to reflect a change > > Please use @command{gdbserver} instead of @code. > Is this the convention? I see 123 matches for @code{gdbserver}, but only 32 for @command{gdbserver}. Otherwise, fixed all of the issues for the next iteration. >> +The @samp{org.gnu.gdb.aarch64.sme} feature is optional. If present, >> +it should contain registers @code{ZA}, @code{SVG} and @code{SVCR}. >> +@xref{AArch64 SME} > ^ > Period missing there. > >> +@item >> +@code{ZA} is a register represented by a vector of @var{svl}x@var{svl} >> +bytes. @xref{svl} > ^ > And there. > >> +Bit 1 (@sc{ZA}) shows whether the @code{ZA} register state is active (in use) or >> +not. >> +@xref{aarch64 sme svcr} > ^ > And there. > > Reviewed-By: Eli Zaretskii