From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=034405edd7=abner.chang@hpe.com) 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 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 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) 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/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-Mailer: git-send-email 2.25.0 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-15_05:2020-03-12,2020-03-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003160015 Content-Transfer-Encoding: quoted-printable 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.=0D # Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.
=0D # Copyright (c) 2016, Linaro Ltd. All rights reserved.
=0D -# (C) Copyright 2016 - 2019 Hewlett Packard Enterprise Development LP
= =0D +# (C) Copyright 2016 - 2020 Hewlett Packard Enterprise Development LP
= =0D # Copyright (c) 2017, AMD Incorporated. All rights reserved.
=0D # Copyright (c) 2016, Microsoft Corporation
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D @@ -144,6 +144,11 @@ #=0D DisplayUpdateProgressLib|Include/Library/DisplayUpdateProgressLib.h=0D =0D + ## @libraryclass Provides interface to performs a CPU architecture spec= ific operations to=0D + ## transit to DXE phase.=0D + #=0D + DxeIplHandoffLib|Include/Library/DxeIplHandoffLib.h=0D +=0D [Guids]=0D ## MdeModule package token space guid=0D # Include/Guid/MdeModulePkgTokenSpace.h=0D 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 @@ #=0D # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
=0D # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
=0D +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -321,6 +322,7 @@ MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf=0D MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgr= essLibGraphics.inf=0D MdeModulePkg/Library/DisplayUpdateProgressLibText/DisplayUpdateProgressL= ibText.inf=0D + MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoffLibNull.inf=0D =0D MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf=0D 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=0D +# Null DXE IPL handoff to DXE Core Library instance.=0D +#=0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x0001001b=0D + BASE_NAME =3D DxeIplHandoffLibNull=0D + MODULE_UNI_FILE =3D DxeIplHandoffLibNull.uni=0D + FILE_GUID =3D 5c18812d-3684-4093-bc75-fc846a595353= =0D + MODULE_TYPE =3D BASE=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D DxeIplHandoffLib=0D +=0D +#=0D +# The following information is for reference only and not required by the = build tools.=0D +#=0D +# VALID_ARCHITECTURES =3D RISCV64=0D +#=0D +=0D +[Sources]=0D + DxeIplHandoffLibNull.c=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D +=0D 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=0D + Provides interface to performs a CPU architecture specific operations to= =0D + transit to DXE phase.=0D +=0D + Copyright (c) 2020, Hewlett Packard Enterprise Development LP.
=0D +=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef DXEIPL_HANDOFF_LIB__=0D +#define DXEIPL_HANDOFF_LIB__=0D +=0D +#include =0D +=0D +/**=0D + Transfers control to DxeCore.=0D +=0D + This function performs a CPU architecture specific operations to execut= e=0D + the entry point of DxeCore with the parameters of HobList.=0D + It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.=0D +=0D + @param DxeCoreEntryPoint The entry point of DxeCore.=0D + @param HobList The start of HobList passed to DxeCore= .=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +HandOffToDxeCore (=0D + IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,=0D + IN EFI_PEI_HOB_POINTERS HobList=0D + );=0D +=0D +#endif=0D 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=0D + NULL instance of DXE IPL handoff to DXE Core Library.=0D +=0D + Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D +=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include =0D +#include =0D +=0D +/**=0D + Transfers control to DxeCore.=0D +=0D + This function performs a CPU architecture specific operations to execut= e=0D + the entry point of DxeCore with the parameters of HobList.=0D + It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.=0D +=0D + @param DxeCoreEntryPoint The entry point of DxeCore.=0D + @param HobList The start of HobList passed to DxeCore= .=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +HandOffToDxeCore (=0D + IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,=0D + IN EFI_PEI_HOB_POINTERS HobList=0D + )=0D +{=0D + DEBUG ((DEBUG_INFO, "No implementation of DXE IPL handoff to DXE Core li= brary.\r\n"));=0D + ASSERT (FALSE);=0D +}=0D +=0D 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=0D +// Null DXE IPL handoff to DXE Core Library instance.=0D +//=0D +// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +//=0D +// SPDX-License-Identifier: BSD-2-Clause-Patent=0D +//=0D +// **/=0D +=0D +=0D +#string STR_MODULE_ABSTRACT #language en-US "Null DXE IPL hand= off to DXE Core Library instance."=0D +=0D +#string STR_MODULE_DESCRIPTION #language en-US "Null DXE IPL hand= off to DXE Core Library instance."=0D +=0D --=20 2.25.0