public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dandan Bi" <dandan.bi@intel.com>
To: Abner Chang <abner.chang@hpe.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Leif Lindholm <leif@nuviainc.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Ard Biesheuvel" <ard.biesheuvel@linaro.org>,
	Laszlo Ersek <lersek@redhat.com>,
	Daniel Schaefer <daniel.schaefer@hpe.com>,
	Gilbert Chen <gilbert.chen@hpe.com>
Subject: Re: [edk2/master PATCH DxeIplHandoffLib v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl
Date: Mon, 16 Mar 2020 01:31:14 +0000	[thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D7A9FA@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20200309102740.8591-1-abner.chang@hpe.com>

Hi Abner,

Some comments as below.

1. For the patch itself
a)  it introduces a new library class, so besides the instance, we also need to add the header file (public interface definitions) in the include/library directory and define the library class in dec file.
b)  EFIAPI keyword should be added with the public API definition ( HandOffToDxeCore).

2. This path is just to add an empty instance for now.
Abner, will you also add other instances for other Archs and update DxeIpl to consume the new library?
And for platform, it's incompatible change to use new added library instance. So it's better review it in TianoCore Design Meeting firstly.



Thanks,
Dandan
> -----Original Message-----
> From: Abner Chang [mailto:abner.chang@hpe.com]
> Sent: Monday, March 9, 2020 6:28 PM
> To: devel@edk2.groups.io
> Cc: abner.chang@hpe.com; Leif Lindholm <leif@nuviainc.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>;
> Laszlo Ersek <lersek@redhat.com>; Bi, Dandan <dandan.bi@intel.com>;
> Daniel Schaefer <daniel.schaefer@hpe.com>; Gilbert Chen
> <gilbert.chen@hpe.com>
> Subject: [edk2/master PATCH DxeIplHandoffLib v1]
> MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl
> 
> BZ:2583:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2583
> 
> Current DxeIpl has bindings for different processor architectures, this results
> in MdeModulePkg has the dependence with processor architecture
> packages such as ArmPkg or RiscVPkg. This also leads CI testing to error
> during package dependency check. Provide a default DxeIplHandoff library to
> abstract processor architecture from DxeIpl driver, platform can provide its
> own library instance for the processor architecture- specific implementation.
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> 
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Gilbert Chen <gilbert.chen@hpe.com>
> ---
>  MdeModulePkg/MdeModulePkg.dsc                 |  2 ++
>  .../DxeIplHandoffLibNull.inf                  | 30 +++++++++++++++++
>  .../DxeIplHandoffLibNull.c                    | 33 +++++++++++++++++++
>  .../DxeIplHandoffLibNull.uni                  | 14 ++++++++
>  4 files changed, 79 insertions(+)
>  create mode 100644
> MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf
>  create mode 100644
> MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.c
>  create mode 100644
> MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.uni
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dsc
> b/MdeModulePkg/MdeModulePkg.dsc index f7dbb27ce2..6eb922dfaa
> 100644
> --- a/MdeModulePkg/MdeModulePkg.dsc
> +++ b/MdeModulePkg/MdeModulePkg.dsc
> @@ -3,6 +3,7 @@
>  # # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR> #
> Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>+#
> Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights
> reserved.<BR> # #    SPDX-License-Identifier: BSD-2-Clause-Patent #@@ -
> 321,6 +322,7 @@
>    MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf
> MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateP
> rogressLibGraphics.inf
> MdeModulePkg/Library/DisplayUpdateProgressLibText/DisplayUpdateProgr
> essLibText.inf+
> MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf
> MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuAp
> p.infdiff --git
> a/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf
> b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf
> new file mode 100644
> index 0000000000..b7210656b7
> --- /dev/null
> +++
> b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf
> @@ -0,0 +1,30 @@
> +## @file+#  Null DXE IPL handoff to DXE Core Library instance.+#+#
> Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights
> reserved.<BR>+#+#  SPDX-License-Identifier: BSD-2-Clause-
> Patent+#+##++[Defines]+  INF_VERSION                    = 0x0001001b+
> BASE_NAME                      = DxeIplHandoffLibNull+  MODULE_UNI_FILE
> = DxeIplHandoffLibNull.uni+  FILE_GUID                      = 5c18812d-3684-4093-
> bc75-fc846a595353+  MODULE_TYPE                    = BASE+  VERSION_STRING
> = 1.0+  LIBRARY_CLASS                  = DxeIplHandoffLib++#+# The following
> information is for reference only and not required by the build tools.+#+#
> VALID_ARCHITECTURES           = RISCV64+#++[Sources]+
> DxeIplHandoffLibNull.c++[Packages]+  MdePkg/MdePkg.dec+diff --git
> a/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.c
> b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.c
> new file mode 100644
> index 0000000000..c83922cb6e
> --- /dev/null
> +++ b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.c
> @@ -0,0 +1,33 @@
> +/** @file+  NULL instance of DXE IPL handoff to DXE Core Library.++
> Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights
> reserved.<BR>++  SPDX-License-Identifier: BSD-2-Clause-
> Patent++**/++#include <PiPei.h>+#include <Library/DebugLib.h>++/**+
> Transfers control to DxeCore.++   This function performs a CPU architecture
> specific operations to execute+   the entry point of DxeCore with the
> parameters of HobList.+   It also installs EFI_END_OF_PEI_PPI to signal the
> end of PEI phase.++   @param DxeCoreEntryPoint         The entry point of
> DxeCore.+   @param HobList                   The start of HobList passed to
> DxeCore.++**/+VOID+HandOffToDxeCore (+  IN EFI_PHYSICAL_ADDRESS
> DxeCoreEntryPoint,+  IN EFI_PEI_HOB_POINTERS   HobList+  )+{+  DEBUG
> ((DEBUG_INFO, "No implementation of DXE IPL handoff to DXE Core
> library.\r\n"));+  ASSERT (FALSE);+}+diff --git
> a/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.uni
> b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.uni
> new file mode 100644
> index 0000000000..5a8973d6e5
> --- /dev/null
> +++
> b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.uni
> @@ -0,0 +1,14 @@
> +// /** @file+// Null DXE IPL handoff to DXE Core Library instance.+//+//
> Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights
> reserved.<BR>+//+// SPDX-License-Identifier: BSD-2-Clause-Patent+//+//
> **/+++#string STR_MODULE_ABSTRACT             #language en-US "Null DXE
> IPL handoff to DXE Core Library instance."++#string
> STR_MODULE_DESCRIPTION          #language en-US "Null DXE IPL handoff to
> DXE Core Library instance."+--
> 2.25.0


  reply	other threads:[~2020-03-16  1:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 10:27 [edk2/master PATCH DxeIplHandoffLib v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Abner Chang
2020-03-16  1:31 ` Dandan Bi [this message]
2020-03-16  2:16   ` Abner Chang
2020-03-19  3:09     ` [edk2-devel] " Dandan Bi
2020-03-19  3:21       ` Abner Chang
2020-03-20  0:59         ` Michael D Kinney
2020-03-20  1:28           ` Abner Chang
     [not found]   ` <15FCA733F3A77F98.14939@groups.io>
2020-03-26  1:12     ` Abner Chang

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=3C0D5C461C9E904E8F62152F6274C0BB40D7A9FA@SHSMSX104.ccr.corp.intel.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