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.web09.3700.1641630350260335676 for ; Sat, 08 Jan 2022 00:25:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=BYBLTDiY; 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 (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 208725KO013543 for ; Sat, 8 Jan 2022 08:25:49 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=QofVIs/NL4Suu/vC2Qytquzv7gZDC3fcKJvCzhRGsb0=; b=BYBLTDiYIVbYkvutW1IOyEtBp6Zf7uX9nKQLthePK2juUYceDEivdpBiwuyhJ+uQyjbI bUT9+P+cLUZ/7OjP4cpW2zq6WYOL25FPHlli/HX9S/tLXXQtzRDISZLLJ6ddm4c0Ezzl vour3ngFaGwtzIgsR5mq8d7hxOWCx4Uerlq7LMmPshi7gkZtaA+RRHkRrwzPFMjJVs51 lgkiSbT4sQZrAFoiYCLb0lZNFCuI+SPuSzT6X4rmkfyPm9FoL0yVBvzpPBZdKhD391Kc kbopekB1fb0aIt1ExFDbK4cD3PwCunVG9O0x3+L0yguSixeOF2UwF6ZYIOabrLEC56Ds AA== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3df04bhq0h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 08 Jan 2022 08:25:49 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id C307C65 for ; Sat, 8 Jan 2022 08:25:48 +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 16DAA39; Sat, 8 Jan 2022 08:25:47 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [PATCH 45/79] Platform/RISC-V: Add NULL library instance of RiscVSpecialPlatformLib Date: Sat, 8 Jan 2022 15:24:28 +0800 Message-Id: <20220108072444.17879-4-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: _Ql3W3tQVy_4ZqZJkGjW5IxW2idrG2fv X-Proofpoint-ORIG-GUID: _Ql3W3tQVy_4ZqZJkGjW5IxW2idrG2fv 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 clxscore=1015 mlxlogscore=999 spamscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 phishscore=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) 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 Reviewed-by: Daniel Schaefer Reviewed-by: Sunil V L --- .../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