From patchwork Fri Jul 1 10:53:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 71297 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp234792qgy; Fri, 1 Jul 2016 03:53:24 -0700 (PDT) X-Received: by 10.66.51.42 with SMTP id h10mr30191146pao.31.1467370404501; Fri, 01 Jul 2016 03:53:24 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 185si3808766pfz.17.2016.07.01.03.53.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jul 2016 03:53:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A71F61A1E1D; Fri, 1 Jul 2016 03:54:00 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F23081A1E1B for ; Fri, 1 Jul 2016 03:53:58 -0700 (PDT) Received: by mail-wm0-x230.google.com with SMTP id a66so23821701wme.0 for ; Fri, 01 Jul 2016 03:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AlBG7QIYBjzfFxqlriR94FwNytJWCx4BaKQH46KjMlQ=; b=BVI/nuNzWLllCv1A1x/8wp3NJVF+E0dlPxMb+nSk594d+k7uR5cLu7Vdoh60on3+SY LcqE1N0WpxuIM0JHo7C3CJqyN4mv5Si2hMTTVLlahNeDojSy9/squVHOpQei9464gfwJ BUMc7sy+WygxgS7UkbX/71dpHXv9lp4mzbCc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AlBG7QIYBjzfFxqlriR94FwNytJWCx4BaKQH46KjMlQ=; b=j42FTfvRnCfGlNUrQ47e0MS357uzLaUPDOAr91uuxXJgmVAEtLCmdbWSrFDIjFBakR iEOYf5d9l10YMQc8DZViwwBdQ/jbiVKLqrTlcPkHPPm9kyF+/iN9NECSDD1Z7eI7BBAi khZhdnhWmjOQROK0AMEE+xlyrduAzzrsQEjUbuW34if1fco00Vzz2utM8pSrqIiiZRag A+fay1W7vuOCKLAuI4jxYsAUoRPxf1EScIEY/AnwoF4wAe/6ADVU7rqnh8lAmB9b/3GG liVH3vBvSgX+Y+JVDXVwlf9oYN9qzU6hNGQJNrfXa7FhcnZqx/cbpTLrhztjcm/f3Gd4 OTkQ== X-Gm-Message-State: ALyK8tIa2t5S04YV876qasMnYQu3yWb1cD0hqXFtiZPs35ku8qA/e/CnQlXNsM9KKOuw8F/N X-Received: by 10.194.101.41 with SMTP id fd9mr2923043wjb.27.1467370399880; Fri, 01 Jul 2016 03:53:19 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id x194sm2063997wmf.13.2016.07.01.03.53.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Jul 2016 03:53:19 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, mark.rutland@arm.com Date: Fri, 1 Jul 2016 12:53:12 +0200 Message-Id: <1467370393-7703-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH 1/2] ArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) last X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Putting DEBUG () code after an ASSERT (FALSE) statement is not very useful, since the code will be unreachable on DEBUG builds and compiled out on RELEASE builds. So move the ASSERT () statement after it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c index 45a166ad21aa..31fc936b21ff 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c @@ -191,7 +191,6 @@ DefaultExceptionHandler ( DEBUG ((EFI_D_ERROR, "\n ESR : EC 0x%02x IL 0x%x ISS 0x%08x\n", (SystemContext.SystemContextAArch64->ESR & 0xFC000000) >> 26, (SystemContext.SystemContextAArch64->ESR >> 25) & 0x1, SystemContext.SystemContextAArch64->ESR & 0x1FFFFFF )); DescribeExceptionSyndrome (SystemContext.SystemContextAArch64->ESR); - ASSERT (FALSE); DEBUG ((EFI_D_ERROR, "\nStack dump:\n")); for (Offset = -256; Offset < 256; Offset += 32) { @@ -204,5 +203,6 @@ DefaultExceptionHandler ( *(UINT64 *)(SystemContext.SystemContextAArch64->SP + Offset + 24))); } + ASSERT (FALSE); CpuDeadLoop (); }