From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.5160.1584587360556942158 for ; Wed, 18 Mar 2020 20:09:20 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: dandan.bi@intel.com) IronPort-SDR: b8k8Ch/Pa9XOIO2ZJ2zVbkkCtYjA5xRM6bsempeUV5MRNKNEuT0p0wPOEvA8iEgno3rp45t8+G 9u/bTye7rDxQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2020 20:09:20 -0700 IronPort-SDR: JbR6HRuxY50VSXTOuc1FhJ2q7uHgIf3OYO9wRTcYvjMxRHt9V91KvnDVaXoqb8S8bp6vnj2YiR EYL4DowXwM0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,570,1574150400"; d="scan'208";a="444409931" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 18 Mar 2020 20:09:19 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Mar 2020 20:09:19 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Mar 2020 20:09:19 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.96]) with mapi id 14.03.0439.000; Thu, 19 Mar 2020 11:09:16 +0800 From: "Dandan Bi" To: "devel@edk2.groups.io" , "abner.chang@hpe.com" CC: Leif Lindholm , "Kinney, Michael D" , "Gao, Liming" , "Ard Biesheuvel" , Laszlo Ersek , "Schaefer, Daniel (DualStudy)" , "Chen, Gilbert" Subject: Re: [edk2-devel] [edk2/master PATCH DxeIplHandoffLib v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Thread-Topic: [edk2-devel] [edk2/master PATCH DxeIplHandoffLib v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Thread-Index: AQHV+zj49hzNyBrNsUSidjbpZrtaO6hPPL4Q Date: Thu, 19 Mar 2020 03:09:16 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D806BE@SHSMSX104.ccr.corp.intel.com> References: <20200309102740.8591-1-abner.chang@hpe.com> <3C0D5C461C9E904E8F62152F6274C0BB40D7A9FA@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Abner Chang > Sent: Monday, March 16, 2020 10:17 AM > To: Bi, Dandan ; devel@edk2.groups.io > Cc: Leif Lindholm ; Kinney, Michael D > ; Gao, Liming ; Ard > Biesheuvel ; Laszlo Ersek = ; > Schaefer, Daniel (DualStudy) ; Chen, Gilbert > > Subject: Re: [edk2-devel] [edk2/master PATCH DxeIplHandoffLib v1] > MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl >=20 >=20 >=20 > > -----Original Message----- > > From: Bi, Dandan [mailto:dandan.bi@intel.com] > > Sent: Monday, March 16, 2020 9:31 AM > > To: Chang, Abner (HPS SW/FW Technologist) ; > > devel@edk2.groups.io > > Cc: Leif Lindholm ; Kinney, Michael D > > ; Gao, Liming ; Ard > > Biesheuvel ; Laszlo Ersek > > ; Schaefer, Daniel (DualStudy) > > ; Chen, Gilbert > > Subject: RE: [edk2/master PATCH DxeIplHandoffLib v1] > > MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl > > > > 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). > Ok. Will resend the patch. >=20 > > > > 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? > The purpose of this change is to abstract arch from DxeIpl module under > MdeModulePkg and remove the dependencies with arch package from > MdeModulePkg.ci.yaml. > Yes, I already added an instance for RISC-V and revised DxeIpl to consum= e > new lib *only* for RISCV64 arch, this change will be in the set of RISC= -V edk2 > patches. The patch you are reviewing now is the prerequisite for RISC-V = edk2 > port. >=20 > > And for platform, it's incompatible change to use new added library > instance. > > So it's better review it in TianoCore Design Meeting firstly. > It will stay the same for X86, ARM may have to use this NULL instance an= d > remove the dependencies from MdeModulePkg.ci.yaml as well. However, I > can't speak for ARM because the dependence with ARM package in > MdeModulePkg has been in MdeModulePkg.ci.yaml when edk2 CI was > introduced (my guess, not sure the history). RISCV64 is a new arch and w= as > requested to be decoupled from MdeModulePkg. This change don't bring > incompatible issue though. ARM arch can still stay the same as it is in = edk2 > now. Abner, So you will only and one instance used for RISCV64, no instance for other = archs. HandOffToDxeCore logic in DxeLoadFunc.c for IA32 and X64 will keep same wi= th before, do not leverage new DxeIplHandoffLib Then there is no incompatible concern for IA32 and X64, is that correct? Thanks, Dandan >=20 > > > > > > > > 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 ; Kinney, > > > Michael D ; Gao, Liming > > > ; Ard Biesheuvel ; > > > Laszlo Ersek ; Bi, Dandan ; > > > Daniel Schaefer ; Gilbert Chen > > > > > > Subject: [edk2/master PATCH DxeIplHandoffLib v1] > > > MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl > > > > > > BZ:2583: > > > INVALID URI REMOVED > > > e.org_show-5Fbug.cgi-3Fid- > > 3D2583&d=3DDwIFAg&c=3DC5b8zRQO1miGmBeVZ2LFWg&r=3D_ > > > > > > SN6FZBN4Vgi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=3DYQR7NX_kxz4BPRET > > p5nNLWWOK > > > > > > NOimkostEzdrvyvPkA&s=3D7wyyAOitp2IvMKv19tlpbJxt2m0bn_ZsR4R7llYI19c& > > e=3D > > > > > > 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 > > > > > > Cc: Leif Lindholm > > > Cc: Michael D Kinney > > > Cc: Liming Gao > > > Cc: Ard Biesheuvel > > > Cc: Laszlo Ersek > > > Cc: Dandan Bi > > > Cc: Daniel Schaefer > > > Cc: Gilbert Chen > > > --- > > > 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.
# Copyright (c) 2007 - 2019, Intel Corporation. All rights > > > reserved.
+# Copyright (c) 2020, Hewlett Packard Enterprise > > Development LP. All rights > > > reserved.
# # 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.
+#+# SPDX-License-Identifier: BSD-2-Clause- > > > Patent+#+##++[Defines]+ INF_VERSION =3D 0x000100= 1b+ > > > BASE_NAME =3D DxeIplHandoffLibNull+ MODULE_UNI= _FILE > > > =3D DxeIplHandoffLibNull.uni+ FILE_GUID =3D 5c= 18812d-3684-4093- > > > bc75-fc846a595353+ MODULE_TYPE =3D BASE+ VERSIO= N_STRING > > > =3D 1.0+ LIBRARY_CLASS =3D DxeIplHandoffLib++#+# T= he following > > > information is for reference only and not required by the build tool= s.+#+# > > > VALID_ARCHITECTURES =3D 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.
++ SPDX-License-Identifier: BSD-2-Clause- > > > Patent++**/++#include +#include > ++/**+ > > > Transfers control to DxeCore.++ This function performs a CPU > architecture > > > specific operations to execute+ the entry point of DxeCore with th= e > > > parameters of HobList.+ It also installs EFI_END_OF_PEI_PPI to sig= nal the > > > end of PEI phase.++ @param DxeCoreEntryPoint The entry poi= nt of > > > DxeCore.+ @param HobList The start of HobList pa= ssed 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.
+//+// 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 handof= f > to > > > DXE Core Library instance."+-- > > > 2.25.0 >=20 >=20 >=20