From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web08.7304.1634634500366225397 for ; Tue, 19 Oct 2021 02:08:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=f85mcCPa; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0926d272d9=abner.chang@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19J869tN021715; Tue, 19 Oct 2021 09:08:20 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=naq2kc4u17c3laBEPPzZx4esHkHSfO5FlpZK+CPpIz4=; b=f85mcCPahwXRNSwUZd8OQjyXSkDaDZhxHs3eR2orX3ByTKYS94WvEN6TWTx17pWa1AMQ 5iGe06POxOatB1D8GRX6FtLpgXR4SzsFr6/zeQM1J0s7Aflm0rDtd8AkQhUYOFXUBaXI xVhdY0orynPsQGsEobUtkD5TC4e0H/YZbQHCX6sBCvr0d8XKXh61fRCFSP4X1NQZsmSk PN15nnHBlaFpwCdn+tgYbi3oveiborCZYh/8GHjOSjA49Tmy0hEt54ISjzz/3cNyfuft OB8msjJmmbo+A4A55uQ8CTM8kdOz4QPuynjaQhVcUmUKE+uIoFwOXDRs4O4tz6QcL+79 hA== Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3bst7b8g5c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 09:08:20 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3427.houston.hpe.com (Postfix) with ESMTP id 3628D76; Tue, 19 Oct 2021 09:08:19 +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 26DB248; Tue, 19 Oct 2021 09:08:17 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Sunil V L , Daniel Schaefer Subject: [edk2-platforms][PATCH 05/30] Platform/RISC-V: Add library to get PPI descriptor Date: Tue, 19 Oct 2021 16:09:42 +0800 Message-Id: <20211019081007.31165-6-abner.chang@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211019081007.31165-1-abner.chang@hpe.com> References: <20211019081007.31165-1-abner.chang@hpe.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: O2xTd6G1OnUaN8UU1js29GuWodxLzUry X-Proofpoint-GUID: O2xTd6G1OnUaN8UU1js29GuWodxLzUry X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_07,2021-10-18_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 malwarescore=0 phishscore=0 suspectscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190056 Content-Transfer-Encoding: quoted-printable 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 --- .../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