From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.58995.1584322277973378365 for ; Sun, 15 Mar 2020 18:31:18 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: dandan.bi@intel.com) IronPort-SDR: SkZXuakqwsfc458haM8U2CiZKXwFkTFJaEHXWR1R4mSbaByV7nqLnCW6EiYdZqlA9YJKaOppEN 9LNvllv8pUMw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2020 18:31:17 -0700 IronPort-SDR: G2vYGzwwX3nGq3XRXEcpr8SiXUlM699ZOIJ60EnGk1prBiOhxypIvdGykhkfuablaQD0fwrbEy h9MJhkVWiDpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,558,1574150400"; d="scan'208";a="235886613" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 15 Mar 2020 18:31:17 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 15 Mar 2020 18:31:16 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 15 Mar 2020 18:31:16 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 15 Mar 2020 18:31:16 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.201]) with mapi id 14.03.0439.000; Mon, 16 Mar 2020 09:31:14 +0800 From: "Dandan Bi" To: Abner Chang , "devel@edk2.groups.io" CC: Leif Lindholm , "Kinney, Michael D" , "Gao, Liming" , "Ard Biesheuvel" , Laszlo Ersek , Daniel Schaefer , Gilbert Chen Subject: Re: [edk2/master PATCH DxeIplHandoffLib v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Thread-Topic: [edk2/master PATCH DxeIplHandoffLib v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Thread-Index: AQHV9gKHq7w4SV5NzU6ow90ebtf4FKhKc4Tg Date: Mon, 16 Mar 2020 01:31:14 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D7A9FA@SHSMSX104.ccr.corp.intel.com> References: <20200309102740.8591-1-abner.chang@hpe.com> In-Reply-To: <20200309102740.8591-1-abner.chang@hpe.com> 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 Hi Abner, Some comments as below. 1. For the patch itself a) it introduces a new library class, so besides the instance, we also nee= d to add the header file (public interface definitions) in the include/libr= ary directory and define the library class in dec file. b) EFIAPI keyword should be added with the public API definition ( HandOff= ToDxeCore). 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 instanc= e. 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 ; 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 >=20 > BZ:2583: > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2583 >=20 > Current DxeIpl has bindings for different processor architectures, this r= esults > 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 implementat= ion. >=20 > Signed-off-by: Abner Chang >=20 > 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 >=20 > 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 0x0001001b+ > BASE_NAME =3D DxeIplHandoffLibNull+ MODULE_UNI_FILE > =3D DxeIplHandoffLibNull.uni+ FILE_GUID =3D 5c18812= d-3684-4093- > bc75-fc846a595353+ MODULE_TYPE =3D BASE+ VERSION_STR= ING > =3D 1.0+ LIBRARY_CLASS =3D DxeIplHandoffLib++#+# The fo= llowing > information is for reference only and not required by the build tools.+#+= # > 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 architectu= re > specific operations to execute+ the entry point of DxeCore with the > parameters of HobList.+ It also installs EFI_END_OF_PEI_PPI to signal t= he > 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.
+//+// 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