From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::244; helo=mail-it0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 13DB4220D4C1E for ; Fri, 1 Dec 2017 00:40:32 -0800 (PST) Received: by mail-it0-x244.google.com with SMTP id t1so1652535ite.5 for ; Fri, 01 Dec 2017 00:44:59 -0800 (PST) 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=Jq4vytemsNk7+xhFfVQgaDdNHeNAZwtzNpVEmA2aX64=; b=H32aoG0KFmggAXsj6tE5elefzxoVHZ6HCPFz73vmmiyI82TMqEdzqvBcgKsPpnARLo kWmB/pmLDmgQSZRL0cqpx6/EG9QUqiFzh9pO1643fkfBNBqb+duMapcAT8iRcPCbZFoz JD2LoAYmLHayIuxNW7yfTwRB812Z7O4DE1xyk= 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=Jq4vytemsNk7+xhFfVQgaDdNHeNAZwtzNpVEmA2aX64=; b=mnP3jMJLK9anVmIOpb68A6OdgMS2BPVROGY4EAwuNCLur59swMgvhJQvvNy474P5/n 8ih8zp/bYnmIrne/q4XjiWFfa1jD3wNNvF6PeUwdXodCW3NdAOqCe1hHMSRXiqCxtUnt KVH/nlTqcfsKQQgDhsmNeCWT/wQ1+zlgyOmA/0/Yu7j8h0ACllAN6Gt+45vNpFI53G1I oiVXOEH1+llr3bF0AyKEl99Dh7PpO7tqh9a2WJK+Fh+yIUvHMkboUIPMNo8mVw1NsDmE BNglIIcD+DpCPxRAyJa3JWzTBW2EcPIU6S3DYpUiSRfpecSbo1gRat7ktTbf2c4pX0m5 eoRQ== X-Gm-Message-State: AKGB3mKGvlbhkVPOuAIpsVb/pqDC5gxFEVT/cowJHUx9eUx9iXLJl6Ag GvZgPMdO9t+RjsfEwewcq1ARyJwZ7fmO9AG17AUZ3hgfx2g= X-Google-Smtp-Source: AGs4zMbpj2Y8Zc9vYekgsh0nn7kfTp7T8h6oXU9k5T7Dv6UQxwGO9BURtOLWQXUqEvnqQy0KE8GawxsvW0o418GYpP0= X-Received: by 10.36.219.214 with SMTP id c205mr890735itg.65.1512117898673; Fri, 01 Dec 2017 00:44:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Fri, 1 Dec 2017 00:44:58 -0800 (PST) In-Reply-To: <20171130163029.19743-3-lersek@redhat.com> References: <20171130163029.19743-1-lersek@redhat.com> <20171130163029.19743-3-lersek@redhat.com> From: Ard Biesheuvel Date: Fri, 1 Dec 2017 08:44:58 +0000 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Anthony Perard , Jordan Justen , Julien Grall Subject: Re: [PATCH v2 2/8] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: check PcdMemVarstoreEmuEnable 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: Fri, 01 Dec 2017 08:40:33 -0000 Content-Type: text/plain; charset="UTF-8" On 30 November 2017 at 16:30, Laszlo Ersek wrote: > This patch parallels commit b963ec494c48 ("OvmfPkg: > QemuFlashFvbServicesRuntimeDxe: adhere to -D SMM_REQUIRE", 2015-11-30) in > that if QemuFlashDetected() fails -- because flash is not found --, not > only SMM_REQUIRE=TRUE is a wrong build to execute, but > MEM_VARSTORE_EMU_ENABLE=FALSE as well. > > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf | 1 + > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf | 1 + > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf > index c0dda75bf75f..cf30d5c8f021 100644 > --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf > +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf > @@ -87,6 +87,7 @@ [Pcd] > > [FeaturePcd] > gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire > + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable > > [Depex] > TRUE > diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf > index ba2d3679a46d..d5aa393dbc0b 100644 > --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf > +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf > @@ -86,6 +86,7 @@ [Pcd] > > [FeaturePcd] > gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire > + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable > > [Depex] > TRUE > diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c > index 5677b5ee119c..60bc7a84bd6b 100644 > --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c > +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c > @@ -246,6 +246,7 @@ QemuFlashInitialize ( > > if (!QemuFlashDetected ()) { > ASSERT (!FeaturePcdGet (PcdSmmSmramRequire)); > + ASSERT (FeaturePcdGet (PcdMemVarstoreEmuEnable)); > return EFI_WRITE_PROTECTED; > } > > -- > 2.14.1.3.gb7cf6e02401b > >