From patchwork Mon May 9 14:33:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 67346 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1627472qge; Mon, 9 May 2016 07:33:44 -0700 (PDT) X-Received: by 10.98.95.71 with SMTP id t68mr46827269pfb.158.1462804424393; Mon, 09 May 2016 07:33:44 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id l74si37940831pfb.194.2016.05.09.07.33.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 May 2016 07:33:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; 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 198.145.21.10 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 A58141A1EEE; Mon, 9 May 2016 07:33:43 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 BBAE31A1EEB for ; Mon, 9 May 2016 07:33:41 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id a17so190759029wme.0 for ; Mon, 09 May 2016 07:33:41 -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=W3K2KgyCyMHTcR6LAdBPiDMFRyR7mOrKkKoAt3paT1M=; b=AHYKv8GcWvHOlM0iXW76QQPTIBD/tbZwBo3jN1IM665fKBoOv4rKf48qzVSqk/a1xs IlcciZbiJsYEB1Ck9ta31kQwarSj3NfDDj1ijoE23aCR9gBF+CQ3zrWTBU8ZgBki7avg rtQE0nEUzbUAXJRGrVBrMsWXU3myDNQbiFUvE= 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=W3K2KgyCyMHTcR6LAdBPiDMFRyR7mOrKkKoAt3paT1M=; b=iyEwPE2423YQgRJz1MjyVs2HaDOmFwgzfGZTs9HCDP9u02gscT6q+IXwwEcDPl6iZt egHq2V78Ph9ihpUve1AKAAmcb+euEWIjvx8B+v+9OUH5dexpfGsE4QrUpNidchvs8189 rLJn4Ape/KVPSgL31TJkk5m1WV5T5f/TB4dO0ipHnelKk21GnygrF+o9LHudwAgYbiOJ 633rdOjKNOboLRGCxzyTuB+L996gcPQRlj00E924XTGCYf2H+53DtqglHjeVAgx9YM4o /meooo/NCnDEcXBuXfkkdnvWgtS/QZ5LPm8FjqNkvAWlPLkOpNhYTjyxqlSmhOJ6kP1M ZXXA== X-Gm-Message-State: AOPr4FXZVwowmTy03dyRMgjdqg7L0HXWwHGeISMhAIk8Aj9STkFBFS4oYc0ynx6pxYeDCDY4 X-Received: by 10.28.215.1 with SMTP id o1mr11837374wmg.26.1462804420003; Mon, 09 May 2016 07:33:40 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id y70sm24973534wmd.3.2016.05.09.07.33.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 May 2016 07:33:39 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Mon, 9 May 2016 16:33:34 +0200 Message-Id: <1462804415-4007-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH 1/2] ArmPkg/DefaultExceptionHandlerLib: use deadloop rather than ASSERT X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 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" The default exception handler, which is essentially the one that is invoked for unexpected exceptions, ends with an ASSERT (FALSE), to ensure that execution halts after dumping the CPU state. However, ASSERTs are compiled out in RELEASE builds, and since we simply return to wherever the ELR is pointing, we will not make any progress in case of synchronous aborts, and the same exception will be taken again immediately, resulting in the string 'Exception at 0x....' to be printed over and over again. So use an explicit deadloop instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c index 37fd57875760..57200ff642c2 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c @@ -181,5 +181,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); + + CpuDeadLoop (); }