From nobody Sun Apr 28 15:15:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55862+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55862+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1584329409; cv=none; d=zohomail.com; s=zohoarc; b=S/1pYWwU9+WTXLQHYaZqC5JURpKwbMdVMdweE1D5aHToYMsOJv/uG3OrkscUTNyjVdvJlZ5qqKVNew8jkxPgVLW0FnRmu9qrdR6yszVbAcDgcWIGMAoghsJOuI28FySaitdGi0Ie7NUHzgT+DSfVUOOvfYYtZCcQGfaZyxh8zcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584329409; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=IVrNswTSyBCDeRV7KGyWN+j2A2IfLvmpJ3nzaOdkXP8=; b=KnBzy8/D8FUXyiVa1xy5cEm8so9olwMYmfQyNSRqBj2lsFeYnKXsvZ8678bH+NmugYDOcJq5Ewqbn1kOl+ThWVl2cE5/a/AjKLOBnBQLjdAk/HOP3L0sAo50K1aDdIkVzEhgho5Vb0rXnjzUeC05XYSY8+wxgVlCotlcccIudQQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55862+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1584329409538261.93425412071156; Sun, 15 Mar 2020 20:30:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fWlUYY1788612x9EwJdT1rwv; Sun, 15 Mar 2020 20:30:09 -0700 X-Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web12.60982.1584329407734542220 for ; Sun, 15 Mar 2020 20:30:08 -0700 X-Received: from pps.filterd (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02G3Bq8Q006862; Mon, 16 Mar 2020 03:30:07 GMT X-Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 2yrt37a9r0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Mar 2020 03:30:06 +0000 X-Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 3FE3E9C; Mon, 16 Mar 2020 03:30:06 +0000 (UTC) X-Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 51C0D49; Mon, 16 Mar 2020 03:30:03 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Leif Lindholm , Michael D Kinney , Liming Gao , Ard Biesheuvel , Laszlo Ersek , Dandan Bi , Daniel Schaefer , Gilbert Chen Subject: [edk2-devel] [edk2/master PATCH DxeIplHandoffLib v2] MdeModulePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Date: Mon, 16 Mar 2020 10:53:08 +0800 Message-Id: <20200316025308.27924-1-abner.chang@hpe.com> X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@hpe.com X-Gm-Message-State: PBER4cePDJ2TvEYbdEB887ysx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1584329409; bh=o+/MmFFab3Gy3ffm7r1c6/zhxrun6aHhe+1ZSJJ2V3o=; h=Cc:Date:From:Reply-To:Subject:To; b=RMMgzw/TwdrTMTTTz0S3CozNNFLzJD4OITVdI2D7StepZLNdCTgSZI3AyH+Z8c8KEph fzGZXEKmqQfukAJeh3L8p0EHYOxWOcn0gG1ANbpRxHg1hH/zoIpBavZApzCcPTOyMK8OS YbdtauPKlTZQqffHjqAdymyyP3M8y6tNkOc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ:2583: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2583 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.dec | 7 +++- MdeModulePkg/MdeModulePkg.dsc | 2 ++ .../DxeIplHandoffLibNull.inf | 30 ++++++++++++++++ .../Include/Library/DxeIplHandoffLib.h | 34 +++++++++++++++++++ .../DxeIplHandoffLibNull.c | 34 +++++++++++++++++++ .../DxeIplHandoffLibNull.uni | 14 ++++++++ 6 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoff= LibNull.inf create mode 100644 MdeModulePkg/Include/Library/DxeIplHandoffLib.h create mode 100644 MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoff= LibNull.c create mode 100644 MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoff= LibNull.uni diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 91a3c60823..2876b97846 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -6,7 +6,7 @@ # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.
# Copyright (c) 2016, Linaro Ltd. All rights reserved.
-# (C) Copyright 2016 - 2019 Hewlett Packard Enterprise Development LP
+# (C) Copyright 2016 - 2020 Hewlett Packard Enterprise Development LP
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# Copyright (c) 2016, Microsoft Corporation
# SPDX-License-Identifier: BSD-2-Clause-Patent @@ -144,6 +144,11 @@ # DisplayUpdateProgressLib|Include/Library/DisplayUpdateProgressLib.h =20 + ## @libraryclass Provides interface to performs a CPU architecture spec= ific operations to + ## transit to DXE phase. + # + DxeIplHandoffLib|Include/Library/DxeIplHandoffLib.h + [Guids] ## MdeModule package token space guid # Include/Guid/MdeModulePkgTokenSpace.h diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index f7dbb27ce2..ea018fac92 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.
+# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -321,6 +322,7 @@ MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgr= essLibGraphics.inf MdeModulePkg/Library/DisplayUpdateProgressLibText/DisplayUpdateProgressL= ibText.inf + MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf =20 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf diff --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 righ= ts 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 5c18812d-3684-4093-bc75-fc846a595353 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D DxeIplHandoffLib + +# +# The following 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/Include/Library/DxeIplHandoffLib.h b/MdeModulePkg= /Include/Library/DxeIplHandoffLib.h new file mode 100644 index 0000000000..a2c4cddf87 --- /dev/null +++ b/MdeModulePkg/Include/Library/DxeIplHandoffLib.h @@ -0,0 +1,34 @@ +/** @file + Provides interface to performs a CPU architecture specific operations to + transit to DXE phase. + + Copyright (c) 2020, Hewlett Packard Enterprise Development LP.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef DXEIPL_HANDOFF_LIB__ +#define DXEIPL_HANDOFF_LIB__ + +#include + +/** + 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 +EFIAPI +HandOffToDxeCore ( + IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint, + IN EFI_PEI_HOB_POINTERS HobList + ); + +#endif diff --git a/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull= .c b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.c new file mode 100644 index 0000000000..44bdb10837 --- /dev/null +++ b/MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.c @@ -0,0 +1,34 @@ +/** @file + NULL instance of DXE IPL handoff to DXE Core Library. + + Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s 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 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 +EFIAPI +HandOffToDxeCore ( + IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint, + IN EFI_PEI_HOB_POINTERS HobList + ) +{ + DEBUG ((DEBUG_INFO, "No implementation of DXE IPL handoff to DXE Core li= brary.\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 righ= ts reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Null DXE IPL hand= off to DXE Core Library instance." + +#string STR_MODULE_DESCRIPTION #language en-US "Null DXE IPL hand= off to DXE Core Library instance." + --=20 2.25.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55862): https://edk2.groups.io/g/devel/message/55862 Mute This Topic: https://groups.io/mt/71990217/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-