From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::344; helo=mail-wm1-x344.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 7310821962301 for ; Wed, 19 Dec 2018 11:11:58 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id d15so7170193wmb.3 for ; Wed, 19 Dec 2018 11:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DMHR9uJMP7wMG6S4+Ut1K8+tSugcQ5aJ/NNiJHQcF+k=; b=Vg2ccq74vnJXOThpN4B9SP9M2g0nAqA6H1gUJ+E25wDIKoFRW8Y/8835b7GhamJXJd 66TTq1jCeHwYOKXgChvadBQ9ZoA7iKwogXfm45eXiRMiNY9eDs4O3e36CqsqpUc/phMl +2FyhsSPafzwzWkKZgGYYPjPQ/Hf3bL571JyY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DMHR9uJMP7wMG6S4+Ut1K8+tSugcQ5aJ/NNiJHQcF+k=; b=pEslLrgFIDndyMIDeZG9xD8MV9+5mB1qnHGodYLHxt2YXto3u+q6Nbcad1nOUP9JDK cnXhcff1rmK5B6oWsj5WOXAJjzW/VrtIpxmM7yPjFbgshEjA37LAxKEoYR6PU8CqK3F4 YcPHoLo/OwiS5rwNrceZenhnRzoorn/ClxvjX6jDqM4ZL2+fYZCjO3DnDXtPJ7TLffa7 HvVf31dEEeULiy7tE3Mz5BqIvrHp8tcpIfpulI3EexbRs+3fIGXeMbH3voGemwkce7LQ Sxow89vadLD8hQRDTk3DmtXZBfYKb4IbEZahcVgvcue66J3kXybYyM0yXFXcJSIFcznR ybLw== X-Gm-Message-State: AA+aEWbSInw7GHImGIyw+/h3sV7HoNyZPK+caEBgVqvrbt0IzIABMMy+ vGTAy2C5s9GpLAJRjhgOYhn+N7HcK+4= X-Google-Smtp-Source: AFSGD/XIZ47z/FU7ux8HMa5SDV3Sz2jFbxcguaQHP5HC4UM23UNjfbt3aeOXHyMcZ/ByGk8uLX60Ug== X-Received: by 2002:a1c:b515:: with SMTP id e21mr8415940wmf.82.1545246716694; Wed, 19 Dec 2018 11:11:56 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id e16sm8996513wrn.72.2018.12.19.11.11.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Dec 2018 11:11:55 -0800 (PST) Date: Wed, 19 Dec 2018 19:11:54 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20181219191154.nqfb4u4snlkc27ju@bivouac.eciton.net> References: <20181219173907.2602-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20181219173907.2602-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH v2] ArmPkg/DefaultExceptionHandlerLib ARM: avoid endless loop in RELEASE builds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2018 19:11:58 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 19, 2018 at 06:39:07PM +0100, Ard Biesheuvel wrote: > Ensure that we prevent the CPU from proceeding after having taken an > unhandled exception on a RELEASE build, which does not contain the > ASSERT() which ensures this on DEBUG and NOOPT builds. > > Retain the code following the deadloop so that we can keep going when > running in a debugger. Could you add a clarifying comment to this extent? Because I was scratching my head when I looked at that before :) With that: Reviewed-by: Leif Lindholm > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > v2: remove pointless 'if (!PcdAdjust)' conditional > > ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c > index 0b9da031b47d..4978711ed0e8 100644 > --- a/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c > +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c > @@ -267,6 +267,8 @@ DefaultExceptionHandler ( > DEBUG ((EFI_D_ERROR, "\n")); > ASSERT (FALSE); > > + CpuDeadLoop (); > + > // Clear the error registers that we have already displayed incase some one wants to keep going > SystemContext.SystemContextArm->DFSR = 0; > SystemContext.SystemContextArm->IFSR = 0; > -- > 2.19.2 >