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.web12.7276.1634634507235827302 for ; Tue, 19 Oct 2021 02:08:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=mU/qqZ/6; 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 (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19J8CJbV021113; Tue, 19 Oct 2021 09:08:27 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=oTB/Jw9ucvqikIwkIqTVz/z5XwUsRNYwSLj310D5ZNs=; b=mU/qqZ/6u0qUAt9HkJB5G+L8n7Ir0DPAdyUvUBd/JBetJ3DPxcVTVBtB8Oqte4pC5NaM jkDVRYcEhFTE9bZm8NECTtXdg6FrvzBIatfjOp/qqqATQG0oR7wirz5S+kDKQgOxkvaR 3EoYt3drZyd6DW4ERbITeRfSz1dOvtsycFx7UuuThWZGU7thERBgsvkku8kFF20/HVMQ sEViJ8kkI9f4nlAe4TLjOGdyZFGV7py1SBc/2wzPl8vm1oVlHAd2sCVR5cVQkxhkwNt1 MK1NbpA22rfE0qQJr7ol6Jsqo9p2VbCVWO2EMpOTfIjbUrzDlIykqPCSEqtzqesHxelH 6g== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0a-002e3701.pphosted.com with ESMTP id 3bsta50egw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 09:08:26 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 32F3292; Tue, 19 Oct 2021 09:08:26 +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 236DC4D; Tue, 19 Oct 2021 09:08:24 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Sunil V L , Daniel Schaefer Subject: [edk2-platforms][PATCH 10/30] Platform/RISC-V: Add NULL library instance of RiscVSpecialPlatformLib Date: Tue, 19 Oct 2021 16:09:47 +0800 Message-Id: <20211019081007.31165-11-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-GUID: YjaF4DiTFXZQebb9izgstJ0CtPK7KxPf X-Proofpoint-ORIG-GUID: YjaF4DiTFXZQebb9izgstJ0CtPK7KxPf 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 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 priorityscore=1501 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190056 Content-Transfer-Encoding: quoted-printable This is the library instance to provide platform_override for the special RISC-V platform. This module incorporates with OpensbiPlatformLib and RISC-V Opensbi library. Cc: Sunil V L Cc: Daniel Schaefer Signed-off-by: Abner Chang --- .../RISC-V/ProcessorPkg/RiscVProcessorPkg.dec | 1 + .../RISC-V/PlatformPkg/RiscVPlatformPkg.dsc | 2 ++ .../RiscVSpecialPlatformLib.inf | 36 +++++++++++++++++++ .../Include/Library/RiscVSpecialPlatformLib.h | 20 +++++++++++ .../RiscVSpecialPlatformLib.c | 19 ++++++++++ 5 files changed, 78 insertions(+) create mode 100644 Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatfor= mLib/RiscVSpecialPlatformLib.inf create mode 100644 Platform/RISC-V/PlatformPkg/Include/Library/RiscVSpecia= lPlatformLib.h create mode 100644 Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatfor= mLib/RiscVSpecialPlatformLib.c diff --git a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec b/Silicon/RI= SC-V/ProcessorPkg/RiscVProcessorPkg.dec index 08279a97b1..9c8b57cce3 100644 --- a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec +++ b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec @@ -19,6 +19,7 @@ Include/Library=0D Library/RiscVOpensbiLib/opensbi # OpenSBI header file reference = ("include/sbi/...")=0D Library/RiscVOpensbiLib/opensbi/include # Header file reference from ope= nsbi files, ("sbi/...")=0D + Library/RiscVOpensbiLib/opensbi/platform/generic/include # Header file r= eference from opensbi files, ("sbi/...")=0D =0D [LibraryClasses]=0D RiscVPlatformDxeIplLib|Include/Library/RiscVPlatformDxeIpl.h=0D diff --git a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc b/Platform/RI= SC-V/PlatformPkg/RiscVPlatformPkg.dsc index b96324e961..ec8875be14 100644 --- a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc +++ b/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc @@ -71,6 +71,7 @@ =0D [LibraryClasses.common.SEC]=0D ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseE= xtractGuidedSectionLib.inf=0D + RiscVSpecialPlatformLib|Platform/RISC-V/PlatformPkg/Library/RiscVSpecial= PlatformLib/RiscVSpecialPlatformLib.inf=0D =0D [LibraryClasses.common.DXE_DRIVER]=0D PlatformBootManagerLib|Platform/RISC-V/PlatformPkg/Library/PlatformBootM= anagerLib/PlatformBootManagerLib.inf=0D @@ -84,6 +85,7 @@ 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 + Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatformLib/RiscVSpecial= PlatformLib.inf=0D =0D [Components.common.SEC]=0D Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf=0D diff --git a/Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatformLib/Ri= scVSpecialPlatformLib.inf b/Platform/RISC-V/PlatformPkg/Library/RiscVSpecia= lPlatformLib/RiscVSpecialPlatformLib.inf new file mode 100644 index 0000000000..567eeee56d --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatformLib/RiscVSpec= ialPlatformLib.inf @@ -0,0 +1,36 @@ +## @file=0D +# Null library instance to provide platform_override for the=0D +# special RISC-V platform. This module incorporates with=0D +# OpensbiPlatformLib and RISC-V Opensbi library.=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 RiscVSpecialPlatformLib=0D + FILE_GUID =3D 79361802-18B6-458A-8C79-DA6256DEF776= =0D + MODULE_TYPE =3D BASE=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D RiscVSpecialPlatformLib|SEC=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 + RiscVSpecialPlatformLib.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 diff --git a/Platform/RISC-V/PlatformPkg/Include/Library/RiscVSpecialPlatfo= rmLib.h b/Platform/RISC-V/PlatformPkg/Include/Library/RiscVSpecialPlatformL= ib.h new file mode 100644 index 0000000000..644bb08ebf --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Include/Library/RiscVSpecialPlatformLib.h @@ -0,0 +1,20 @@ +/** @file=0D + library definition to provide platform_override of special platforms.=0D + This library incorporates with OpensbiPlatformLib and RISC-V Opensbi lib= rary=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_SPECIAL_PLATFORM_LIB_=0D +#define RISCV_SPECIAL_PLATFORM_LIB_=0D +=0D +#include =0D +=0D +//=0D +// This is declared under Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbi= Lib/opensbi/platform/generic/include/=0D +//=0D +#include =0D +=0D +#endif=0D diff --git a/Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatformLib/Ri= scVSpecialPlatformLib.c b/Platform/RISC-V/PlatformPkg/Library/RiscVSpecialP= latformLib/RiscVSpecialPlatformLib.c new file mode 100644 index 0000000000..3a77ff6b17 --- /dev/null +++ b/Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatformLib/RiscVSpec= ialPlatformLib.c @@ -0,0 +1,19 @@ +/**@file=0D + Library to provide platform_override for the special=0D + RISC-V platform. This module incorporates with=0D + OpensbiPlatformLib and RISC-V Opensbi library.=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 +const struct platform_override *SpecialPlatformArray =3D NULL;=0D +INTN NumberOfPlaformsInArray;=0D +=0D --=20 2.31.1