Message ID | 20220322205938.1721846-21-sean.anderson@seco.com |
---|---|
State | Accepted |
Commit | e75d791c5083cd7d25c36677825b2a01ce708b7d |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.a=rsa-sha256 header.s=selector1 header.b=hvX/NudI; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KNP9x6LhHz9s1l for <incoming@patchwork.ozlabs.org>; Wed, 23 Mar 2022 08:04:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D514083F68; Tue, 22 Mar 2022 22:02:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.b="hvX/NudI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA67283C67; Tue, 22 Mar 2022 22:01:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::61b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 80CDE83BAC for <u-boot@lists.denx.de>; Tue, 22 Mar 2022 22:00:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sean.anderson@seco.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ntmSEyY7RBenaFuiOe6x9eQ+JJzqHlj+REuFOwu+qoDkHUoucQp3vodG4ExBDYDlCdxvAKe25czHgP3fMDEswHdzhSI7qLVFyAFc2oy+mCc9CF1bHetzUGxAzgWeTC3tlEvJ6JP67nYjHXUwW+Ho01+6UmEQeDNF9fTZV4Tw7BvgWmmdOsg1lkv2qWB5QooFSqaYFX9bhdR+hKBTQHZLg0VVZ3MFFEv93TWPE4uI9JCViCuSSZc93tuwYn3ftDo5p5TyGTPIuertPrPRjv1uoFZ2HGzfl5Ts+sQ+LJZLG0IU8knBwIa118SraDyUbf15unePXmL8MuMmqfLGqwORmw== 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=1yNaw28PJpUANlhinAr6sYYJ5y9ERszjpBcM0xX4If4=; b=m+CjLDWbxaotX1p9geQk+ElaItj4x3tGZCL3Fg86OdO35cOZ4jC6+6oXSXM2pGjOqcz1T/UFLg3qDsvvgUunviLtug5YLoZ8TzDQtyyFCBQIb8d0seXC/FDBcLukqqWHnak0JLMVfSOSVGKZv6gdTIBW7BzxwhqCJh1vGvrpmrRA7cNNruAe35HX8uz4NBRqnUodjI6/OnZ75P0fztCvIvveScPbpdnE+Van7RrhmbrStWHRVI11dN7APF+Lk+gEi8fV3R85Tv76HLNSS/Fd6tsA580xra9IP2MBVg9PxcxE5F4joU0Kv9pKJ93kG5MUpyCl0qkI7xOLPRTf6jKnRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1yNaw28PJpUANlhinAr6sYYJ5y9ERszjpBcM0xX4If4=; b=hvX/NudIS/+sILLxHOZYBgk1xHbJuPWwtz4MbgGkAra2+6eUC0YLMcujEqBv1IFrkKnK3UauXG6sOWYj/I2fospF3lzg+RrJ6sGGE6IBPjj0yKki0LPl/DWO/Lw0/0cCMcuFWUjrbMDbi5k2+P7gY7WFaN38RQZ+Zp4gNQjcUo6qWlQrfN8Ce1xYWgejbVmtNAe4D8u157BEdSRx8+H80omeHP5bsxcX+P6G3pYom2sniS7eA1Y+jT0wNbD5QJvHqPC2sPcw2oduc7q93C6Q3zNYTl6Kw0YJnc8Nc7yPGoruhnpgaPVrDDoR21cGADhhl4IcKDgRnUUdgA/rsOLeag== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by VI1PR03MB4591.eurprd03.prod.outlook.com (2603:10a6:803:5f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.23; Tue, 22 Mar 2022 21:00:29 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::2414:8ad5:9fd6:3bff]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::2414:8ad5:9fd6:3bff%5]) with mapi id 15.20.5081.023; Tue, 22 Mar 2022 21:00:29 +0000 From: Sean Anderson <sean.anderson@seco.com> To: Tom Rini <trini@konsulko.com> Cc: Linus Walleij <linus.walleij@linaro.org>, Liviu Dudau <liviu.dudau@foss.arm.com>, Andre Przywara <andre.przywara@arm.com>, Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de, Sean Anderson <sean.anderson@seco.com> Subject: [PATCH v3 20/29] arm64: Save spsr in pt_regs Date: Tue, 22 Mar 2022 16:59:28 -0400 Message-Id: <20220322205938.1721846-21-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220322205938.1721846-1-sean.anderson@seco.com> References: <20220322205938.1721846-1-sean.anderson@seco.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR20CA0012.namprd20.prod.outlook.com (2603:10b6:208:e8::25) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bdd4849f-8180-4578-8cff-08da0c46feee X-MS-TrafficTypeDiagnostic: VI1PR03MB4591:EE_ X-Microsoft-Antispam-PRVS: <VI1PR03MB4591303837C9BF260B9889FC96179@VI1PR03MB4591.eurprd03.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sq0GMCktTks/DKCG4Tpdk1thArM/gdwgycY2P9K/xQVIu3rSoPtdGcpTTMqtsokymxi+4BrpC3ADiR4uO0/nBpfilCPnZn1nyh2MOWf3hBs2M6EKFKWw/Gk/Hxv4FJAvfmG57lXgTRy8x3mDjTV7MJ4GNjYaU8vy0IlnA3tUGWkIr9Q+3Bba33aUeKV3+G+e8y2u/4+lXKRUaEV5/OsnXrPD6QIq6jSRdKFf8Ic2GS0SU45Jr3bQ5NHm+AOaamde7DXWqj9AEOdg3/A//lLNsJcfsSMliUqM9DskjrRILDC4X4PBhGW4FEYJPfPhuxh9BQkdS0UvKFwpvnmRk7WkFriVT1PTC0KKE1+gr63FraVTPZoq4uhF+mdROgTwEA7pUIB+rPy9Kio+YQ+6wB7QiYQp9C7/rtgOJ1zRfedO7cXp5wv7DPYEbmAuVG4pHsqzsMkaEngpnNoT9NstH2N8jMDBMU2n6Uxec5w42+0sY2qqBZC1biMcMkjNa0KHdKKtLv7S0TgmxSnsly1Xv4/0rym8Pj3PAUt8/mb8mI8Yyjpvvg9gfe2uHN1J/Rq+hi+1tyTzGSWEeHNMz4uxKQIYjZdNV+XDdGG7J59xmdBKZ3qjeJ7KP5XtOGP8/PfYN4q+404eQ7p0VXhqMJQhbSBeFo7a9zQWXx2BhruJA/8cdeb/8sszJfcF0fc9hZY0BX8r0f650rq/mCPPPr8sCOYAfA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4972.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(2906002)(83380400001)(6486002)(186003)(26005)(107886003)(38100700002)(38350700002)(2616005)(1076003)(6506007)(6512007)(6916009)(36756003)(52116002)(54906003)(316002)(4326008)(5660300002)(8676002)(66556008)(66476007)(508600001)(86362001)(66946007)(8936002)(44832011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GONJ3MVtuh82GUv9NuXm+QnE5lg+uxaZDXA8u+4QxtUDfjVD9irq/0merDnotMEbP+6P2uwTNmRjfgSXTUXtTzaBcL/S+sEjrvT7bOGma0JTx2om8flE7QdKm+M8Qk6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4LkFaDkOp/pxWsDjky4fU+r/2+nSkdL4mCmCHqEhZeYcweORlmXztZTniVyCW0Kp0cYRB9OSLxeB0bql3Ams3eDyPMZjf9iiEUEgZEpN2H/pur2vzvq8wA+5DN5xMD2bAcEpW8yO8qMCt48DNBmm28lBZcdo2E/sNW/N68RWi/qke2kaUxdXHkYsF8dAbChj0R6k/XSgFiLpwq+tv0vj0LCMPRL9saPZOUvoALFlmEEPKY0mb4JinhF5LUsv9yhk23vTyDbuwPFTSUA== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdd4849f-8180-4578-8cff-08da0c46feee X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2022 21:00:29.3136 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hgir0fDWOb1cReIcdq1Qt1XpZN8FnKOHQw/BfUXLuc8kWMdQM0hP0TerzSs9xfYyrKuyUalxX5GJPOpQRPYGig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4591 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
arm: semihosting: Cleanups and new features
|
expand
|
On Tue, Mar 22, 2022 at 04:59:28PM -0400, Sean Anderson wrote: > This register holds "pstate" which includes (among other things) the > instruction mode the CPU was in when the exception was taken. This is > necessary to correctly interpret instructions at elr. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> Applied to u-boot/next, thanks!
diff --git a/arch/arm/cpu/armv8/exceptions.S b/arch/arm/cpu/armv8/exceptions.S index 001913f429..504d566721 100644 --- a/arch/arm/cpu/armv8/exceptions.S +++ b/arch/arm/cpu/armv8/exceptions.S @@ -77,15 +77,18 @@ _save_el_regs: switch_el x11, 3f, 2f, 1f 3: mrs x1, esr_el3 mrs x2, elr_el3 + mrs x3, spsr_el3 b 0f 2: mrs x1, esr_el2 mrs x2, elr_el2 + mrs x3, spsr_el2 b 0f 1: mrs x1, esr_el1 mrs x2, elr_el1 + mrs x3, spsr_el1 0: stp x1, x0, [sp, #-16]! - stp xzr, x2, [sp, #-16]! + stp x3, x2, [sp, #-16]! mov x0, sp ret diff --git a/arch/arm/include/asm/proc-armv/ptrace.h b/arch/arm/include/asm/proc-armv/ptrace.h index bebcaf6e33..3b8fe7aac0 100644 --- a/arch/arm/include/asm/proc-armv/ptrace.h +++ b/arch/arm/include/asm/proc-armv/ptrace.h @@ -21,7 +21,7 @@ * on the stack during an exception. */ struct pt_regs { - unsigned long unused; + unsigned long spsr; unsigned long elr; unsigned long esr; unsigned long regs[31];
This register holds "pstate" which includes (among other things) the instruction mode the CPU was in when the exception was taken. This is necessary to correctly interpret instructions at elr. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- Changes in v3: - Fix loading the wrong EL's SPSR Changes in v2: - New arch/arm/cpu/armv8/exceptions.S | 5 ++++- arch/arm/include/asm/proc-armv/ptrace.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)