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.web11.53707.1583751870831118773 for ; Mon, 09 Mar 2020 04:04:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=033792669b=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 029AwVA0005854; Mon, 9 Mar 2020 11:04:30 GMT Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 2ym63c3465-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Mar 2020 11:04:29 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 2761A4E; Mon, 9 Mar 2020 11:04:29 +0000 (UTC) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 574724A; Mon, 9 Mar 2020 11:04:26 +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 v1] MdePkg/DxeIplHandoffLibNullLib: Abstract DxeIpl Date: Mon, 9 Mar 2020 18:27:40 +0800 Message-Id: <20200309102740.8591-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-09_02:2020-03-08,2020-03-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003090077 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.dsc | 2 ++ .../DxeIplHandoffLibNull.inf | 30 +++++++++++++++++ .../DxeIplHandoffLibNull.c | 33 +++++++++++++++++++ .../DxeIplHandoffLibNull.uni | 14 ++++++++ 4 files changed, 79 insertions(+) create mode 100644 MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoff= LibNull.inf create mode 100644 MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoff= LibNull.c create mode 100644 MdeModulePkg/Library/DxeIplHandoffLibNull/DxeIplHandoff= LibNull.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 @@ #=0D # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
=0D # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
=0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=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/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=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 +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