From nobody Mon Feb 9 01:16:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82321+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82321+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1634634509; cv=none; d=zohomail.com; s=zohoarc; b=PsRDhTyAuFbzn2Kniv6d93G3K0MUowD7f/A2uzi4Qpggb10kOofWDgFFz2sFVB0ipKntdCn20f7sG0ZHGl4JmStByDlFByho1CP4vUKMjFkGtKeP7DEVzVrgmpX5jvkh+0QSOyDM/o/vB8jFBraB8tTkSuPjSqRd4ilD2nU+2A4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634634509; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=I/GTvxxJY1zkLZkfakK5jmFFqb0OQ+JmdbZGd55aX8c=; b=fAuXNZYYUMtPaNbnxv1bJ+rJzgDbUEldtrbgaDw2q5ZAewiWwLRogX1/m5g4NMl/AYhGXXySY2CiFfRjklOW+03g3MqQiMRgz3V2Sh0dHTABY/7+14zw8IaUunsprp2K00I3XyVOPCNRTaCoYIb1lt3BZhBB08koB3Kw0NUIyH8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82321+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634634509789195.05582259175867; Tue, 19 Oct 2021 02:08:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nsBHYY1788612xX427aFskNx; Tue, 19 Oct 2021 02:08:29 -0700 X-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 X-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 X-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 X-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) X-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-devel] [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> 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 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@hpe.com X-Gm-Message-State: wDHzngbwXJUiqRhGci6f7kmex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634634509; bh=S0YVHLTl9KtjkQFfZoK7eZ+sA5BpRYVRJ5e+BqbpfXg=; h=Cc:Date:From:Reply-To:Subject:To; b=BsYB+LxH5zitxJNLMzJEdbxLkEd5X48+mPH7Z03tybt4UM2w0FXuw55/ebopjsSZO2N h05iESc7P1Oxq2Zmv+xPB1V8ViTQa3fYVJu/rPuT3IdHMTyc51VKTMtRe3UyyQ9Enj6Ra rCHN2eIDITMFe5pIdhpqRhvN8KSCKgx7GGQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634634511455100004 Content-Type: text/plain; charset="utf-8" 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 Library/RiscVOpensbiLib/opensbi # OpenSBI header file reference = ("include/sbi/...") Library/RiscVOpensbiLib/opensbi/include # Header file reference from ope= nsbi files, ("sbi/...") + Library/RiscVOpensbiLib/opensbi/platform/generic/include # Header file r= eference from opensbi files, ("sbi/...") =20 [LibraryClasses] RiscVPlatformDxeIplLib|Include/Library/RiscVPlatformDxeIpl.h 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 @@ =20 [LibraryClasses.common.SEC] ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseE= xtractGuidedSectionLib.inf + RiscVSpecialPlatformLib|Platform/RISC-V/PlatformPkg/Library/RiscVSpecial= PlatformLib/RiscVSpecialPlatformLib.inf =20 [LibraryClasses.common.DXE_DRIVER] PlatformBootManagerLib|Platform/RISC-V/PlatformPkg/Library/PlatformBootM= anagerLib/PlatformBootManagerLib.inf @@ -84,6 +85,7 @@ Platform/RISC-V/PlatformPkg/Library/RiscVPlatformTempMemoryInitLibNull/R= iscVPlatformTempMemoryInitLibNull.inf Platform/RISC-V/PlatformPkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.= inf Platform/RISC-V/PlatformPkg/Library/PlatformSecPpiLibNull/PlatformSecPpi= LibNull.inf + Platform/RISC-V/PlatformPkg/Library/RiscVSpecialPlatformLib/RiscVSpecial= PlatformLib.inf =20 [Components.common.SEC] Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.inf 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 +# Null library instance to provide platform_override for the +# special RISC-V platform. This module incorporates with +# OpensbiPlatformLib and RISC-V Opensbi library. +# +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001b + BASE_NAME =3D RiscVSpecialPlatformLib + FILE_GUID =3D 79361802-18B6-458A-8C79-DA6256DEF776 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D RiscVSpecialPlatformLib|SEC + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D RISCV64 +# + +[Sources] + RiscVSpecialPlatformLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec + Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dec + +[LibraryClasses] + BaseLib 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 + library definition to provide platform_override of special platforms. + This library incorporates with OpensbiPlatformLib and RISC-V Opensbi lib= rary + + Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef RISCV_SPECIAL_PLATFORM_LIB_ +#define RISCV_SPECIAL_PLATFORM_LIB_ + +#include + +// +// This is declared under Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbi= Lib/opensbi/platform/generic/include/ +// +#include + +#endif 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 + Library to provide platform_override for the special + RISC-V platform. This module incorporates with + OpensbiPlatformLib and RISC-V Opensbi library. + + Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +// +// The package level header files this module uses +// +#include + +const struct platform_override *SpecialPlatformArray =3D NULL; +INTN NumberOfPlaformsInArray; + --=20 2.31.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82321): https://edk2.groups.io/g/devel/message/82321 Mute This Topic: https://groups.io/mt/86435672/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-