From nobody Mon Feb 9 20:13:11 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+107711+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+107711+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1691764408; cv=none; d=zohomail.com; s=zohoarc; b=JQ36ix+DTaGTbZ7uHzjupsCjOJmY1exFakkdfNonRnK1buLT/cQEW0UqzQ51/HHpMeDqzqBXY9xKXcRBoIIZiaj9gYYqmxj3bC5cmDblv3YocqKtTTmuqiMXW2Tw2TaGj7GxKLZDypRZ3TUMngYT6wlfRbhhjawD1uv3CxfT9aU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691764408; 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=ZAGkwJBYj2LvMpIjDz/aTNH6g0BMiqM/LEwlPtnxXI4=; b=ajovCQpE66X5ktWmwvtO/qPOo2TvOyRvOAv7ZtASdnPZI1AYOYj2ukyTPcur82xWCksfgGvLXDQvZDdLlNbjaPbeeJUarHz+2Ys7HkfeZ6DNNK3NuMGwv6NAYU42HFkCNQOJ7vpo2NRr4RcA58UHoZwFa8NvGDLVp0C9L4n3KEA= 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+107711+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 169176440792351.767643018915805; Fri, 11 Aug 2023 07:33:27 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=5nv5Xs9qMRzE98paVgLVr29+DuCeeAX4PD3Fh42lM8E=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691764407; v=1; b=ULgE0RX74FERWt+ZWIYX1w6iqKyejCDbPFfLqqy/IgUIFqihw/gGXRCKh3Nf7Z6zB9kGc6mY Qb/FbyoIswJeZy48OTMNxXEyDhrnV0GM6woWWCjm3ku3c7FyHtIHO7ff+6DDunA336Kw7FXuxcz 1JaigzajMvz7+/qiS9aTUeBc= X-Received: by 127.0.0.2 with SMTP id 6t9KYY1788612xFW6nQpvxyU; Fri, 11 Aug 2023 07:33:27 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.44270.1691764406522302610 for ; Fri, 11 Aug 2023 07:33:26 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8B62B1424; Fri, 11 Aug 2023 07:34:08 -0700 (PDT) X-Received: from e126645.arm.com (unknown [10.57.35.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0D7F33F64C; Fri, 11 Aug 2023 07:33:23 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Ard Biesheuvel , Sami Mujawar , Kun Qin Subject: [edk2-devel] [PATCH v6 2/9] MdePkg: Add deprecated warning to BaseRngLibTimer Date: Fri, 11 Aug 2023 16:33:03 +0200 Message-Id: <20230811143310.55101-3-pierre.gondois@arm.com> In-Reply-To: <20230811143310.55101-1-pierre.gondois@arm.com> References: <20230811143310.55101-1-pierre.gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk 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,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: V10lYAWpwcKWHbRxpTgzZF1Lx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691764409558100015 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4504 To keep the MdePkg self-contained and avoid dependencies on GUIDs defined in other packages, the BaseRngLibTimer was moved to the MdePkg. Add a constructor to warn and request to use the MdeModulePkg implementation. Signed-off-by: Pierre Gondois Reviewed-by: Liming Gao Reviewed-by: Sami Mujawar Tested-by: Kun Qin --- .../BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 1 + .../Library/BaseRngLibTimerLib/RngLibTimer.c | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf b/Mde= Pkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf index f857290e823b..96c90db63f6f 100644 --- a/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf +++ b/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf @@ -23,6 +23,7 @@ [Defines] MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D RngLib + CONSTRUCTOR =3D BaseRngLibTimerConstructor =20 [Sources] RngLibTimer.c diff --git a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c b/MdePkg/Libra= ry/BaseRngLibTimerLib/RngLibTimer.c index 980854d67b72..c4fdd1df68d3 100644 --- a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c +++ b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c @@ -13,6 +13,28 @@ =20 #define DEFAULT_DELAY_TIME_IN_MICROSECONDS 10 =20 +/** + This implementation is to be replaced by its MdeModulePkg copy. + The cause being that some GUIDs (gEdkiiRngAlgorithmUnSafe) cannot + be defined in the MdePkg. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. +**/ +RETURN_STATUS +EFIAPI +BaseRngLibTimerConstructor ( + VOID + ) +{ + DEBUG (( + DEBUG_WARN, + "Warning: This BaseRngTimerLib implementation will be deprecated. " + "Please use the MdeModulePkg implementation equivalent.\n" + )); + + return RETURN_SUCCESS; +} + /** Using the TimerLib GetPerformanceCounterProperties() we delay for enough time for the PerformanceCounter to increment. --=20 2.25.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 (#107711): https://edk2.groups.io/g/devel/message/107711 Mute This Topic: https://groups.io/mt/100684683/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-