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.web10.3726.1641630348802658578 for ; Sat, 08 Jan 2022 00:25:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=oSxDm51g; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=000704d8ca=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20863YOV030849 for ; Sat, 8 Jan 2022 08:25:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=xyJDGbPhjGxlGcLkLQ0mMPEx1gmeIr6azTiytxmR68I=; b=oSxDm51gDKBATL4eqY/cC3UKK5bAJD4+Tn/RoLm8wT1y8cFzd+w0WXsmg8ZMHm2XYQqm 51fu8KHJRCfLDPIL3Jupk2Cyc9cw+l1OiHSGAqwK3BFbJYpzV/KVDUpSAphE7E2sLiFL 6o82g7P6cIJ/4ATjxgyUCT5uKpO0QABGdAPv8o75Sx4zrPTdu9/HHC301Ko933kCOH7H vN87Y+skthXku2bulJjf7fJ5rlGjpYPa+ETI1PWIIRAE6PdK21VYs6IReSW1oXfw+RC4 ijNELJYmJr+vRA5NS+mNtrP7qy6ZyMM0zGGzOIlK8+foqHGmMqkivfOjuc20NPE84CFF Gg== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3df3tfgrm3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 08 Jan 2022 08:25:47 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id AF7D06D for ; Sat, 8 Jan 2022 08:25:46 +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 0302039; Sat, 8 Jan 2022 08:25:45 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [PATCH 43/79] Platform/RISC-V: Add library to get PPI descriptor Date: Sat, 8 Jan 2022 15:24:26 +0800 Message-Id: <20220108072444.17879-2-abner.chang@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220108072444.17879-1-abner.chang@hpe.com> References: <20220108072444.17879-1-abner.chang@hpe.com> MIME-Version: 1.0 X-Proofpoint-GUID: Q5B8pDPwoft5Fl5a27W6DNlTwUQ5AFTb X-Proofpoint-ORIG-GUID: Q5B8pDPwoft5Fl5a27W6DNlTwUQ5AFTb X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-08_03,2022-01-07_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201080063 Content-Transfer-Encoding: quoted-printable (This is migrated from edk2-platforms:Platform) The library to provide the platform PPI descriptors in PEI core entry before executing PEI core. Cc: Sunil V L Cc: Daniel Schaefer Signed-off-by: Abner Chang Reviewed-by: Daniel Schaefer Reviewed-by: Sunil V L --- .../RISC-V/PlatformPkg/RiscVPlatformPkg.dsc | 2 ++ .../PlatformSecPpiLibNull.inf | 36 +++++++++++++++++++ .../Include/Library/PlatformSecPpiLib.h | 24 +++++++++++++ .../PlatformSecPpiLibNull/PlatformSecPpiLib.c | 28 +++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNu= ll/PlatformSecPpiLibNull.inf create mode 100644 Platform/RISC-V/PlatformPkg/Include/Library/PlatformSec= PpiLib.h create mode 100644 Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNu= ll/PlatformSecPpiLib.c diff --git a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc b/Platform/RI= SC-V/PlatformPkg/RiscVPlatformPkg.dsc index 8eec09549f..b96324e961 100644 --- a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc +++ b/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc @@ -61,6 +61,7 @@ [LibraryClasses.common.PEI_CORE]=0D # RISC-V platform PEI core entry point.=0D PeiCoreEntryPoint|Platform/RISC-V/PlatformPkg/Library/PeiCoreEntryPoint/= PeiCoreEntryPoint.inf=0D + PlatformSecPpiLib|Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibN= ull/PlatformSecPpiLibNull.inf=0D =0D [LibraryClasses.common.PEIM]=0D FirmwareContextProcessorSpecificLib|Platform/RISC-V/PlatformPkg/Library/= FirmwareContextProcessorSpecificLib/FirmwareContextProcessorSpecificLib.inf= =0D @@ -82,6 +83,7 @@ Platform/RISC-V/PlatformPkg/Library/FirmwareContextProcessorSpecificLib/= FirmwareContextProcessorSpecificLib.inf=0D Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMemoryInitLibNull/R= iscVPlatformTempMemoryInitLibNull.inf=0D Platform/RISC-V/PlatformPkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.= inf=0D + Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull/PlatformSecPpi= LibNull.inf=0D =0D [Components.common.SEC]=0D Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf=0D diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull/Plat= formSecPpiLibNull.inf b/Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiL= ibNull/PlatformSecPpiLibNull.inf new file mode 100644 index 0000000000..22f5751655 --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull/PlatformSec= PpiLibNull.inf @@ -0,0 +1,36 @@ +## @file=0D +# Library instance to to provide PPI before PEI Core=0D +#=0D +# Copyright (c) 2021, 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 PlatformSecPpiLib=0D + FILE_GUID =3D A2CDDADC-CB65-4EED-9CAE-192B0BDD6C84= =0D + MODULE_TYPE =3D PEIM=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D PlatformSecPpiLib|PEI_CORE=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 + PlatformSecPpiLib.c=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D + MdeModulePkg/MdeModulePkg.dec=0D + Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec=0D + #Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec=0D +=0D +[LibraryClasses]=0D + #BaseLib=0D + #PrintLib=0D +=0D diff --git a/Platform/RISC-V/PlatformPkg/Include/Library/PlatformSecPpiLib.= h b/Platform/RISC-V/PlatformPkg/Include/Library/PlatformSecPpiLib.h new file mode 100644 index 0000000000..88468e660b --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Include/Library/PlatformSecPpiLib.h @@ -0,0 +1,24 @@ +/** @file=0D + RISC-V platform SEC PPI before PEI Core.=0D +=0D + Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D +=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +**/=0D +=0D +#ifndef RISCV_PLATFORM_SEC_PPI_H_=0D +#define RISCV_PLATFORM_SEC_PPI_H_=0D +=0D +#include =0D +=0D +/** Return platform SEC PPI before PEI Core=0D +=0D + @param[in,out] ThisPpiList Pointer to retrieve EFI_PEI_PPI_DESCRIPTOR= .=0D +=0D +**/=0D +EFI_STATUS=0D +GetPlatformPrePeiCorePpiDescriptor (=0D + IN OUT EFI_PEI_PPI_DESCRIPTOR **ThisPpiList=0D +);=0D +=0D +#endif=0D diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull/Plat= formSecPpiLib.c b/Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull= /PlatformSecPpiLib.c new file mode 100644 index 0000000000..d5c089b02d --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull/PlatformSec= PpiLib.c @@ -0,0 +1,28 @@ +/**@file=0D + NULL library instance of PlatformSecPpiLib=0D +=0D + Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D +=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +//=0D +// The package level header files this module uses=0D +//=0D +#include =0D +=0D +/** Return platform SEC PPI before PEI Core=0D +=0D + @param[in,out] ThisPpiList Pointer to retrieve EFI_PEI_PPI_DESCRIPTOR= .=0D +=0D +**/=0D +EFI_STATUS=0D +GetPlatformPrePeiCorePpiDescriptor (=0D + IN OUT EFI_PEI_PPI_DESCRIPTOR **ThisPpiList=0D +)=0D +{=0D + *ThisPpiList =3D NULL;=0D + return EFI_NOT_FOUND;=0D +}=0D +=0D --=20 2.31.1