From patchwork Sun Dec 30 18:27:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Auer X-Patchwork-Id: 1019462 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aisec.fraunhofer.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43STW63K7Lz9s0n for ; Mon, 31 Dec 2018 05:29:38 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 1A9E2C21DAF; Sun, 30 Dec 2018 18:28:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4E40DC21E0B; Sun, 30 Dec 2018 18:28:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5D3D3C21DFA; Sun, 30 Dec 2018 18:28:26 +0000 (UTC) Received: from mail-edgeDD24.fraunhofer.de (mail-edgeDD24.fraunhofer.de [192.102.167.24]) by lists.denx.de (Postfix) with ESMTPS id 3A44CC21EA1 for ; Sun, 30 Dec 2018 18:28:23 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2EVAAAO4PJb/xoBYJliGgEBAQEBAgEBAQEHAgEBAQGBVAIBAQEBCwGCA4FWOYxvix2bPQ2EbAKDbiI3Bg0BAwEBAgEBAgICaSiFPgYnCwFGEFE9GgYOBYMhggEBqEkzihwJAYdQhCuBVz+IaoEEhQ4CiQqBfpRnBwKBEYEJBI5+CxiJWIclmBaBXCOBVTMaJIM7gicXjh0+ATIBjA6CTQEB X-IPAS-Result: A2EVAAAO4PJb/xoBYJliGgEBAQEBAgEBAQEHAgEBAQGBVAIBAQEBCwGCA4FWOYxvix2bPQ2EbAKDbiI3Bg0BAwEBAgEBAgICaSiFPgYnCwFGEFE9GgYOBYMhggEBqEkzihwJAYdQhCuBVz+IaoEEhQ4CiQqBfpRnBwKBEYEJBI5+CxiJWIclmBaBXCOBVTMaJIM7gicXjh0+ATIBjA6CTQEB X-IronPort-AV: E=Sophos;i="5.56,253,1539640800"; d="scan'208";a="22573576" Received: from mail-mtaka26.fraunhofer.de ([153.96.1.26]) by mail-edgeDD24.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Dec 2018 19:28:22 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ATAACO3/Jb/xBhWMBiGgEBAQEBAgEBAQEHAgEBAQGBVAIBAQEBCwGDOCE5jG+mWg2EbAKEDzcGDQEDAQECAQECbSiFPQYnCwFGEFE9GgYOBYMhggKoQzOKHAkBh1CGAj+IaoEEhQ4CiQqBfpRnBwKBEYEJBI5+CxiJWIclmBaBXCKBVTMaJIM7gicXjh0+AzABjA6CTQEB X-IronPort-AV: E=Sophos;i="5.56,253,1539640800"; d="scan'208";a="25375050" Received: from fgdemucivp01ltm.xch.fraunhofer.de (HELO FGDEMUCIMP12EXC.ads.fraunhofer.de) ([192.88.97.16]) by mail-mtaKA26.fraunhofer.de with ESMTP/TLS/AES256-SHA; 30 Dec 2018 19:28:22 +0100 Received: from localhost.de (10.80.233.51) by FGDEMUCIMP12EXC.ads.fraunhofer.de (10.80.232.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 30 Dec 2018 19:28:21 +0100 From: Lukas Auer To: Date: Sun, 30 Dec 2018 19:27:41 +0100 Message-ID: <20181230182746.23448-2-lukas.auer@aisec.fraunhofer.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181230182746.23448-1-lukas.auer@aisec.fraunhofer.de> References: <20181230182746.23448-1-lukas.auer@aisec.fraunhofer.de> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.200.1013-24324.005 X-TM-AS-Result: No--3.899300-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Cc: Greentime Hu Subject: [U-Boot] [PATCH 1/6] riscv: clarify error message on undefined exceptions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Undefined exceptions are treated as reserved. This is not clearly communicated to the user. Adjust the error message to clarify that a reserved exception has occurred and add additional details. Fixes: e8b522b ("riscv: treat undefined exception codes as reserved") Signed-off-by: Lukas Auer Reviewed-by: Bin Meng --- arch/riscv/lib/interrupts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index e185933b01..74c1e561c7 100644 --- a/arch/riscv/lib/interrupts.c +++ b/arch/riscv/lib/interrupts.c @@ -37,7 +37,8 @@ static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs) printf("exception code: %ld , %s , epc %lx , ra %lx\n", code, exception_code[code], epc, regs->ra); } else { - printf("Reserved\n"); + printf("reserved exception code: %ld , epc %lx , ra %lx\n", + code, epc, regs->ra); } hang();