public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io
Cc: sandeep.dhanvada@xilinx.com,
	"Tomas Pilar (tpilar)" <tomas@nuviateam.com>
Subject: Re: [edk2-devel] [PATCH 2/2] OvmfPkg: Add EsrtFmpDxe in OVMF X64 Builds.
Date: Tue, 10 Nov 2020 22:17:03 +0100	[thread overview]
Message-ID: <21b3619f-b098-1a3b-46c9-9317d11f3f5f@redhat.com> (raw)
In-Reply-To: <878edf2cd930731cf8bf8fc92779e76029f0da83.1604918017.git.sandeep.dhanvada@xilinx.com>

On 11/09/20 12:03, Sandeep Dhanvada wrote:
> This will allow testing of FMP Capsule update on a PCI device with OVMF.
>
> DxeRuntimeCapsuleLib from DxeCapsuleLibFmp enables capsule update
> support in OVMF.
>
> Inclusion of EsrtFmpDxe in OVMF X64 builds will enable dynamic creation
> of ESRT using FMP produced by UEFI device driver.
>
> Testing these changes with CapsuleApp.efi and with FMP support added in
> UEFI device driver shows that, dump ESRT using -E option displays ESRT
> table and using this efi with a capsule file as argument, is initiating
> the firmware update process using UpdateCapsule API.
>
> Signed-off-by: Sandeep Dhanvada <sandeep.dhanvada@xilinx.com>
> ---
>  OvmfPkg/OvmfPkgX64.dsc | 4 +++-
>  OvmfPkg/OvmfPkgX64.fdf | 1 +
>  2 files changed, 4 insertions(+), 1 deletion(-)


Please see the previous discussion here:

* [edk2-devel] [PATCH v2]
  OvmfPkg: Use DxeRuntimeCapsuleLib from DxeCapsuleLibFmp in X64 builds

  https://edk2.groups.io/g/devel/message/42752
  http://mid.mail-archive.com/6ef09714-fd1f-2f7b-5a1d-fdf5e1a609fb@solarflare.com

(1) Please address the requests that I made in that thread. In
particular:

(1a) Unless this is specific to X64, the same modifications should be
replicated to the IA32 and IA32X64 DSC/FDF files.

(1b) Please make these changes dependent on a new build flag (default
value: FALSE), in the DSC file(s). I suggest:

> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 2637dfaf2de3..232e9ce2726a 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -33,6 +33,7 @@ [Defines]
>    DEFINE SOURCE_DEBUG_ENABLE     = FALSE
>    DEFINE TPM_ENABLE              = FALSE
>    DEFINE TPM_CONFIG_ENABLE       = FALSE
> +  DEFINE PCI_DEV_CAPSULE_ENABLE  = FALSE
>
>    #
>    # Network definition

(1c) Please spell out the role of "CapsuleRuntimeDxe" in the commit
message.

Some new comments:

>
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 7a8bdb8..07cc167 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -138,7 +138,7 @@

(2) Please run "BaseTools/Scripts/SetupGit.py" in your edk2 clone, or
else manually implement the settings at
<https://github.com/tianocore/tianocore.github.io/wiki/Laszlo%27s-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-05>.

I'm asking specifically because the "@@" hunk header above should show
which section of the DSC file is being modified.

>    UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>    BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
>    FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
> -  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
> +  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
>    DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
>    DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> @@ -796,6 +796,8 @@
>    MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>    MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
>    MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> +  MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
> +  MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf

(3) Listing a library instance in the [Components] section of a DSC file
makes no sense in the OVMF DSC files. (It may make sense for in other
packages' DSC files, but not for OVMF.)

>    MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
>    MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
>    MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf {
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index 17ba9e1..97405e8 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -281,6 +281,7 @@ INF  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
>  INF  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
>  INF  MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
>  INF  MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
> +NF  MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf

(4) This change seems corrupt.

(5) Please try to list modules in the DSC and FDF files in the same
order. If you insert EsrtFmpDxe just after CapsuleRuntimeDxe in the DSC
file, then please attempt to follow suit in the FDF file.

Thanks
Laszlo

>
>  INF  OvmfPkg/SioBusDxe/SioBusDxe.inf
>  !if $(SOURCE_DEBUG_ENABLE) == FALSE
> --
> 2.1.1


      reply	other threads:[~2020-11-10 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 11:03 [PATCH 0/2] OvmfPkg: FMP Capsule Update Modifications Sandeep Dhanvada
2020-11-09 11:03 ` [PATCH 1/2] MdeModulePkg: Capsule upgrade fixes Sandeep Dhanvada
2020-11-09 11:03 ` [PATCH 2/2] OvmfPkg: Add EsrtFmpDxe in OVMF X64 Builds Sandeep Dhanvada
2020-11-10 21:17   ` Laszlo Ersek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21b3619f-b098-1a3b-46c9-9317d11f3f5f@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox