From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::143; helo=mail-it1-x143.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x143.google.com (mail-it1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (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 29E0221196835 for ; Wed, 19 Dec 2018 12:06:23 -0800 (PST) Received: by mail-it1-x143.google.com with SMTP id g76so11588776itg.2 for ; Wed, 19 Dec 2018 12:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8KzeB2HQe6EwNvv6waIyWu/8e7hMspJ6Ikj1nSKd40U=; b=KIxGsJMxGW2ojJdxihM/3IxPlyicHEXrvbz7a9MAkVk/tTThJ5PyDCzX14Uthi8KQF mb8BXUCNRO0WQyD6s1mOMaeW5nu8eiVj6DyMLiMkm3HoR67F7wvtpXoQUoaRtS2LIdmm +ZEPuFEfsp0rwV1rQsGHYalKKeMsXE419WtFs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8KzeB2HQe6EwNvv6waIyWu/8e7hMspJ6Ikj1nSKd40U=; b=PtyzQVlRwuzljgil1pq+zok0lUN80oGJAIgf4e3sBxTIq2VeRASt/b0UjQ2cqGxDnj 6WWcCPCLchBtVFgv37yCObdiAIQWLWNi+G1jpiRcJyMo1nslvVW0jd/pJSSgXO1w+ENY wyobh9389AUiGwhCaYZjmSMFYg7jDMngLeXjOO7xclEifJ/u2Ie3id7QrKCt4tSdYKKa sqyXQfJbmB3wJZhc2g7wK6OtjGriHQzwX5FibWwinGLDAJoL3pCUqBbZ1MfiKBx0KzJd vjd3XWSVmN1sK+eKQ++09eO//OrWAtS9bPg5+weIcqsaYxluWEEnVAaoWDn+bfy2/1Ik neLQ== X-Gm-Message-State: AA+aEWZ1rMA/d6ReRFxW/eLTDHmxq9sFfRk4rO2dVmRKXd9rV2pncMDj SjfC5vs8vHJN7g5/bNvyp9w8G5DkURmK3OdvBwoctw== X-Google-Smtp-Source: AFSGD/WVJsUONKmyC06QXVQSFie+7hzaZTdBtkQ7O0FYcAPIfC2NAFM0XvctkliQtAeIFkkszCpGEvFEIRVUplXQtEo= X-Received: by 2002:a24:710:: with SMTP id f16mr6965129itf.121.1545249982748; Wed, 19 Dec 2018 12:06:22 -0800 (PST) MIME-Version: 1.0 References: <20181219173907.2602-1-ard.biesheuvel@linaro.org> <20181219191154.nqfb4u4snlkc27ju@bivouac.eciton.net> In-Reply-To: <20181219191154.nqfb4u4snlkc27ju@bivouac.eciton.net> From: Ard Biesheuvel Date: Wed, 19 Dec 2018 21:06:11 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" 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 20:06:24 -0000 Content-Type: text/plain; charset="UTF-8" On Wed, 19 Dec 2018 at 20:11, Leif Lindholm wrote: > > 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 > Pushed as 5c8bc8be9e5e4665ab7e31558db9e3fe9990a13e > > > > 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 > >