From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (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 6F3DE21CF3B73 for ; Wed, 5 Jul 2017 06:44:59 -0700 (PDT) Received: by mail-it0-x22b.google.com with SMTP id v202so113689369itb.0 for ; Wed, 05 Jul 2017 06:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/cBAr9/wMp1yPuTomNIzYMP3NqFGic7mYmvzqb2diUA=; b=Z8wuo0DUwvOWqkg8gvcLdHKeO+w8W1dkP8VFyeiuJSY+A8wtgX1CTjgxLkNHpDKJep Mx1Tp2QLblc1ZmLbYxjkGjm4Cj6bKpSgKbfFkJn3ibTPfWvwjAffkuHt0Bs/N9j1wThX 5jMiCMGK1L92O5iiSJRwy8JdeBZSl+8iDCDk0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/cBAr9/wMp1yPuTomNIzYMP3NqFGic7mYmvzqb2diUA=; b=JUJxUMmJJlnhFje75RtfxPsll1PFqWiPO6V2GCWmpoNHderzF5EGqIA+TfUgQx/GgR PIRBEMi0U18Yo8PKhlrG6CFgbkVwGMzN3fr7g7LHU12qpO1XwCwLzDWF+kqCJvEgnJXN 6uwJEFalRVYXx/6RO2m12N+L2ygdF1jS67h2i+VI1Bw5mhHfKFRtn6b0OdLQNvsYaNyj 3Z0zBkYUI19JVIRD4Z58N0dKfmjQ6TnbGhDAkJVmDKG8rg2X4E8vVkELc/D6kWJmk9Xt YUstibeudjeRLUzrnknwarou0hcUalGY+VAlnciUp8nCo/twgNrfaph8+5Q8MboPtEpN FLfQ== X-Gm-Message-State: AIVw1115DPZqnAKMjswxlbSVhbpS/eX46mjb7KeoQjpXvLwAesuFb06h Rst0NGOHgUZUaSKhutBGrKoB9WCmfjPP X-Received: by 10.36.9.144 with SMTP id 138mr18480038itm.98.1499262398160; Wed, 05 Jul 2017 06:46:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.134.134 with HTTP; Wed, 5 Jul 2017 06:46:37 -0700 (PDT) In-Reply-To: References: <20170705130434.4525-1-ard.biesheuvel@linaro.org> <3c6585d6-fe8b-3805-7040-ca4decc9c004@redhat.com> From: Ard Biesheuvel Date: Wed, 5 Jul 2017 14:46:37 +0100 Message-ID: To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Marcin Wojtas Subject: Re: [PATCH] ArmVirtPkg: remove status code support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 13:44:59 -0000 Content-Type: text/plain; charset="UTF-8" On 5 July 2017 at 14:46, Ard Biesheuvel wrote: > On 5 July 2017 at 14:43, Laszlo Ersek wrote: >> On 07/05/17 15:04, Ard Biesheuvel wrote: >>> Commit 7b1dc6c569a 'ArmVirtPkg: switch to generic ResetSystemRuntimeDxe' >>> replaced all references in ArmVirtPkg to the deprecated ResetRuntimeDxe >>> from EmbeddedPkg with the well maintained generic alternative that lives >>> in MdeModulePkg. >>> >>> However, as it turns out, the generic driver has a dependency on the >>> library class ReportStatusCodeLib, whose default resolution is an >>> implementation that is not safe for use at runtime, resulting in crashes >>> when trying to invoke it from the OS. >>> >>> Since we have no use for status codes in any of the ArmVirtPkg >>> platforms, let's replace all resolutions with a common one to the NULL >>> implementation. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Ard Biesheuvel >>> --- >>> ArmVirtPkg/ArmVirt.dsc.inc | 11 ++--------- >>> 1 file changed, 2 insertions(+), 9 deletions(-) >> >> Alternative approach (if we wish to follow what OVMF does): >> >> (1) Copy the library resolutions (as appropriate) from OvmfPkg: >> >> - SEC, PEI_CORE, PEIM: >> MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf >> >> - DXE_CORE, DXE_DRIVER, UEFI_DRIVER, UEFI_APPLICATION: >> MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf >> >> - DXE_RUNTIME_DRIVER: >> MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf >> >> (2) Port commit a6d594c5fabd ("OvmfPkg: use StatusCode Router and Handler from MdeModulePkg", 2016-08-03) to ArmVirtPkg. >> >> This should result in status code reporting and handling that is functional at runtime as well. >> >> What do you prefer? >> Depends on what status codes actually buy us. I'm clueless