From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.7826.1666793211545257089 for ; Wed, 26 Oct 2022 07:06:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=HEzIc48z; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666793211; x=1698329211; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WzxKgYEKZidPeW4lwF0nTMJe2Zouypj8t0JWzH5MIY8=; b=HEzIc48zcSMNsv//BhfQ4DbmmZbOlz9oqYutvurZmQBVGh1T2KkTYbat LsJAY6ENOcXzSiOo92q6y1hZ3LzuRwn5QswQ62bZaM/ptyPWIenmRpiQQ vYZJ2XO63iK26v7A4aWROrL9K2MczEJ1lgdACGM4Nv0Vgj/tQnjdWJEwm 0XnGONko4Y+Ch0/gOWjJqJJFJFIKd7W+17ec8IdYNwXn9jL4IP2EU1Nbi dn1NxyVM3L8OI93kC4fp3cqChLZAbudC7BEb08gLd8BfTYtQjqhWwtEAs x13Y8kkLNXrC48UhP+alO6llO45kSFk72JpmRqm5qUrJqWFue5Up7SNSE w==; X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="309643676" X-IronPort-AV: E=Sophos;i="5.95,215,1661842800"; d="scan'208";a="309643676" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2022 07:06:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="877197643" X-IronPort-AV: E=Sophos;i="5.95,215,1661842800"; d="scan'208";a="877197643" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga006.fm.intel.com with ESMTP; 26 Oct 2022 07:06:50 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 26 Oct 2022 07:06:50 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 26 Oct 2022 07:06:49 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 26 Oct 2022 07:06:49 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 26 Oct 2022 07:06:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pgj1Uki299ZBCgoR4dTDqnJvXKBWwt+n8VaSgkzF6nD+uipe073u47B3ppS6J4ThabGqOtljL563oKDPQE91NAki7pnrrAuBIENZixBdsX48yT9Rt3gq2D4dVLi/r5dcpUcCCVW4n9Kcv06PGTkfcrbk0XZ9a02qEbpmP/94UXQDIrncKTliCBp+LMy8pfqGWyAbH614P6VMzhWafocgIELnGdrmQXfzKc3Ua+Xhu96gp5ehlay3UFP7OIS1/BU5IudEasjEbL6NA6w0PFvQFNXR0G5F+8/2+Sa65AJq1PISqEARnEhiLiv8p00RvuvQRMKKvfbfBqUc1/RCfmcLSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mtePua0pKbcnl+ARE1EmAZALbWlCx1jtrQcW0f8BbMs=; b=aVKzeap+ucIYaYnqnMuZG1bN6QkYJwa2XKVX0I3IlO7NpI9KyVoQOArWr33km9IuR5Wgt1X28fioX5HuSbaiQPElMCYXYjYRaAfUJHtQ7V0tqXaWQ0qe3DiWrJVgUwnYqro8vhI0ITd3wzTvHyHkg8Ekqd7AGknGavByRdVw4bQn60p7zYOKRRHzdNKl9dgMSGQo189RwUylYmhXckzag/rwPExfCIJwlgAGhPLZrXEteUHisz5e2M6cfmvfH5kFHEly81ZOibjK2jC9gtrqd9aPiTL7gu7coMLlSKtZLIwdXiN6ej/K1eXg9gr4TsKNwDSqH09IDzzgYrGnjHpMAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by SJ0PR11MB5583.namprd11.prod.outlook.com (2603:10b6:a03:3bb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Wed, 26 Oct 2022 14:06:45 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::8a27:e262:8996:473]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::8a27:e262:8996:473%7]) with mapi id 15.20.5723.033; Wed, 26 Oct 2022 14:06:44 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "quic_llindhol@quicinc.com" CC: "pierre.gondois@arm.com" , Sami Mujawar , Ard Biesheuvel , "Rebecca Cran" , "Kinney, Michael D" , "Gao, Liming" , "Wang, Jian J" Subject: Re: [edk2-devel] [PATCH v8 06/19] MdePkg/TrngLib: Definition for TRNG library class interface Thread-Topic: [edk2-devel] [PATCH v8 06/19] MdePkg/TrngLib: Definition for TRNG library class interface Thread-Index: AQHY4vXd9vfe7eniEEyk4SZp7lSi5q4gtRMAgAAKYwCAAAFgwA== Date: Wed, 26 Oct 2022 14:06:44 +0000 Message-ID: References: <20221018132052.1359530-1-Pierre.Gondois@arm.com> <20221018132052.1359530-7-Pierre.Gondois@arm.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|SJ0PR11MB5583:EE_ x-ms-office365-filtering-correlation-id: 3048b044-e5ed-4e8e-fc1f-08dab75b5090 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gZ3hwUUEMo8R1CCS3nwkP1c7gnhjc/yPlt0xP4kkcriCURM/udgmmrrua5gS2MAv878Jar9Z0WK9NDDz7a/PZZAE2Q7fK/ThOG1rBxhYhSEi02XdBhjY5mItv99IjB0CuS27HS0d2u+KtAaIS6F9dto+D9bLVqbb+Zr9eu3o+oikloEnQAJ1ec2r5jKYczJXWJZ0gY7MYA9LkEASu/+vqYI1aZVuRKwX759rXf+4Zr2OypRqgp72aqiJZwnYWvZ0malJu3EWH9mEZmP4VyOyGXGT7o4vBB0eQqAU+VDtNG0lY9PoD1J43jOvg5N6uuRs8dNkHyDI8cgDWJfaJQXDLQ5vm2Q1RBa/7za+A34PqGra/EMRp86hyDQHsEV9leVdPSwhIs+2BYf/qS6y/OdVC0cxE4OBVD8ZqP/f1E1mTVXnjhMwluMprMlYA/H0jdRxCZV4y0otRSwozck2s3np1A8C3FtQjsHK70LwnItfrOr7Gvh0CNMnxnnGbSILxwfQ/ckNgml1cNifyJ3RxBBGNXaqPl3MQP5XkQWZ0svak96FFvXdcopbok3/kE1jF9t3ylpT6QkU6TLjSLsqKlm9KHpMhpXEninq8nH4ePMmw9WrC2x8d+yPXUUNefLTwaaCoJUG4QIBZ6EzePDFJSVESjbruz1Ab4BD/RqWYCroLiNKBpW8iMWrScLGogHoxqJDbCkdoIw0vZ4zszb1+ksNhfBDqcLcf4O9Jz5EvNZLtAa+OejA+ecvQcusUL7FJ5/62KoRwPz/GkLg/GCciAmQ5Yk+6pXa3HqSszqQ/iDusT9rGn2AiDpsNb/MKuRTX0keNmYcjIh3bbRGaswVJgv8Ng== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(396003)(376002)(39860400002)(136003)(346002)(451199015)(71200400001)(26005)(33656002)(66899015)(316002)(122000001)(86362001)(2906002)(82960400001)(38100700002)(186003)(38070700005)(83380400001)(107886003)(6506007)(54906003)(53546011)(7696005)(66946007)(76116006)(66446008)(110136005)(8676002)(64756008)(66476007)(66556008)(5660300002)(55016003)(41300700001)(4326008)(8936002)(52536014)(9686003)(966005)(478600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?V3ll7YUlDGKDDViFJPj9ZrQaUksqOVQUYwQszqITp9ids5Mbi7BcMRVIGQUp?= =?us-ascii?Q?r+BoDv1jB8Ado9C11lvFlPbHKoy5ok6tZZeCKupVUfiES9CbuutZrF3AM9+5?= =?us-ascii?Q?dpsmEuiZM7JRo47cWxlOiJYDyFVrTawjzk0we5jvVFeKAeva6WjMu20dJA7R?= =?us-ascii?Q?ZdbdYh31RCgbsWr+3wHvgEHFFWrtfi9TtfyrGiKIxYboN4RzjUhXo9nMZFtj?= =?us-ascii?Q?JVFS+h8pQ2GoeYmOzAy+eAIBL/ZxZ8Z0vrh/M9pf0nM+FjdGL+v0fJni6fXA?= =?us-ascii?Q?EXPYpleMPm6I226NGkAxjH32FVJJymLdYEKvNh1HdfnbngLMBMEnpSyxG3it?= =?us-ascii?Q?MHdATAdrZv+wwN2Mu7ULnbrhNoxbo0QBECoNl3acahyppPDTErYvJlbdMeV6?= =?us-ascii?Q?RcL6ts8yOJrLhOXBNpKlsU500bBO4DqGM0Mzd5kbpxUgNcBJSZ6fXmYV0Usn?= =?us-ascii?Q?YTwhEoMm/fdkwPjH4L2m0BEUmsQAtTNoqCStcKs8eM1jyIxfvdwIGwmaPM82?= =?us-ascii?Q?uevKyuxBWrb5AmYeNv7XebMNFxW9SxycfGm1ZqLkkDqhS1r+hN1U8R1FtJ37?= =?us-ascii?Q?qxfYT9KkRLP0fG6Y0hVThChJ+wtXU4X8r0VjhK8V1kuZSnfapfe7aqVRU0yM?= =?us-ascii?Q?eH2U1Z2EZKFirsBjfhN9hpYGS4RWWqMa3qrAVNUsv1mc/2jeD3bqKQYKr2rc?= =?us-ascii?Q?OTO5EE485OsumIeWn1P6Rz6Sr+KU61MsJ4thCCeWLjQW7herQsIbghMKbHOM?= =?us-ascii?Q?kZGDWj3p/EbkBTXyLFwISH1vourn65FUh7HcPmSSqflr2IIsFv84AjxD/ngU?= =?us-ascii?Q?NNa7jk/R6KWhjlCtN3D7q1cL9Wzm8yBuHdShrQHpXl7Ai3U4bHRKJ22GDFIT?= =?us-ascii?Q?YWIZPEGTDI70Va8k8EeFkzdInJ/vDiheWh1UE7rMHVXYW6AtihYH+328kHM6?= =?us-ascii?Q?AFA5U+uowvbFQC6M9TJcBTmDiX2uSvPNDWZ/oUVN2nyaYqrvgtvsCJW4OzQR?= =?us-ascii?Q?nX5wa3LfrWrFHdJ23pMCLrPbsxyMH6j+jf1UTa9vaRt7dguWvZWfEdby7ru3?= =?us-ascii?Q?Hgg1++qrupQBrb3HK9hfM8p2bquzu5Ncp795LJhrTP2AkfdgETaL1RrZvFyh?= =?us-ascii?Q?DHX0gxd8JwVXb4fENTLfv8HrU+oK8+sGDpIuGgXYa2ne8SSDKY2EJ4Fu74cx?= =?us-ascii?Q?haT61N4vchNRRbSbnA6sabZfTQAtTyBPf3/LJkaAhYn9XG5vrcd7gLtyNPJL?= =?us-ascii?Q?TemWhWl7xLnuq3+v3PSDFThutTOqVlKim0/jD0iJsKgJOUtKmjGZAgTE81BO?= =?us-ascii?Q?ls7OBub5mn2nb7Y0/3dyQo9y0QYgSjEAcIyr3otjDvFQ347nPK8Q/IGc7y8z?= =?us-ascii?Q?vgkLDTrFLKOEi+0bA5GAMP/E6tOqipWhESSVVBhMFSsjqXMUdgxpSytpN8Oe?= =?us-ascii?Q?TSpeWmutnmYUERTFFfesOvrVSAiZtN1/NCPGwroigdYWap1z/jWi3LVnLxCW?= =?us-ascii?Q?bP/33/qPKRiMYZJXCkCOT4Og2YrsbKWkOrG3Ub3oTqEPM6y3+a69rMU/9c/d?= =?us-ascii?Q?W1TFTTNyJjPtb1Lx9YTb8FOfCqAcfw0V0cKuhXGF?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3048b044-e5ed-4e8e-fc1f-08dab75b5090 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2022 14:06:44.7307 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4pbZMu8OJN9x2THt1195rbrGfrNAA+ImZvMxJTCOvSQUbLmw+XoQqcyszC4sxzJz4R6101ND0/MrjMLfN2GAQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5583 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Oh, I did not realize we are planning to deprecate ArmPkg. Is there a Bugzilla I can refer to? If so, I don't think MdeModulePkg is better, because we usually say: indust= ry standard can be in MdePkg. With this justification, I would suggest to n= ame this library class to be ArmTrngLib. In the library header, I recommend to say: it follows "Arm True Random Numb= er Generator Firmware, Interface 1.0", but not NIST SP800-90A/B/C. The latt= er is quite misleading, because there is not GetVersion/GetUUID in NIST doc= ument at all. Thank you Yao Jiewen > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Leif > Lindholm > Sent: Wednesday, October 26, 2022 9:56 PM > To: Yao, Jiewen > Cc: devel@edk2.groups.io; pierre.gondois@arm.com; Sami Mujawar > ; Ard Biesheuvel ; > Rebecca Cran ; Kinney, Michael D > ; Gao, Liming ; > Wang, Jian J > Subject: Re: [edk2-devel] [PATCH v8 06/19] MdePkg/TrngLib: Definition for > TRNG library class interface >=20 > Hi Jiewen, >=20 > There could be an argument for moving it to MdeModulePkg, but there is > no argument for it moving to ArmPkg. >=20 > ArmPkg does not have any reason to exist other than that it has not > yet been properly integrated in the core packages. Which clearly is > becoming more urgent, as I seem to be raising this point even more > frequently these days. >=20 > Best Regards, >=20 > Leif >=20 > On Wed, Oct 26, 2022 at 13:25:54 +0000, Yao, Jiewen wrote: > > Hi > > This API is very ARM platform specific. > > > > I don't see any interface like GetVersion or GetUUID is defined in 800- > 90A/90B/90C. > > What it is following is "Arm True Random Number Generator Firmware, > Interface 1.0". As such, I feel uncomfortable to define TrngLib in MdePkg= . > > > > I have raised my concern before. My recommend is to move ArmPkg, for > example ArmTrngLib. > > > > > > > > Thank you > > Yao Jiewen > > > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of > > > PierreGondois > > > Sent: Tuesday, October 18, 2022 9:21 PM > > > To: devel@edk2.groups.io > > > Cc: Sami Mujawar ; Leif Lindholm > > > ; Ard Biesheuvel > > > ; Rebecca Cran ; > Kinney, > > > Michael D ; Gao, Liming > > > ; Yao, Jiewen ; > Wang, > > > Jian J > > > Subject: [edk2-devel] [PATCH v8 06/19] MdePkg/TrngLib: Definition for > > > TRNG library class interface > > > > > > From: Sami Mujawar > > > > > > Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3668= ) > > > > > > The NIST Special Publications 800-90A, 800-90B and 800-90C > > > provide recommendations for random number generation. The > > > NIST 800-90C, Recommendation for Random Bit Generator (RBG) > > > Constructions, defines the GetEntropy() interface that is > > > used to access the entropy source. The GetEntropy() interface > > > is further used by Deterministic Random Bit Generators (DRBG) > > > to generate random numbers. > > > > > > The True Random Number Generator (TRNG) library defines an > > > interface to access the entropy source on a platform. Some > > > platforms/architectures may provide access to the entropy > > > using a firmware interface. In such cases the TRNG library > > > shall be used to provide an abstraction. > > > > > > Signed-off-by: Pierre Gondois > > > --- > > > MdePkg/Include/Library/TrngLib.h | 103 > > > +++++++++++++++++++++++++++++++ > > > MdePkg/MdePkg.dec | 5 ++ > > > 2 files changed, 108 insertions(+) > > > create mode 100644 MdePkg/Include/Library/TrngLib.h > > > > > > diff --git a/MdePkg/Include/Library/TrngLib.h > > > b/MdePkg/Include/Library/TrngLib.h > > > new file mode 100644 > > > index 000000000000..535fd53f4305 > > > --- /dev/null > > > +++ b/MdePkg/Include/Library/TrngLib.h > > > @@ -0,0 +1,103 @@ > > > +/** @file > > > + TRNG interface library definitions. > > > + > > > + Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.
> > > + > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > + > > > + @par Reference(s): > > > + - [1] NIST Special Publication 800-90B, Recommendation for the > Entropy > > > + Sources Used for Random Bit Generation. > > > + (https://csrc.nist.gov/publications/detail/sp/800-90b/final) > > > + > > > + @par Glossary: > > > + - TRNG - True Random Number Generator > > > +**/ > > > + > > > +#ifndef TRNG_LIB_H_ > > > +#define TRNG_LIB_H_ > > > + > > > +/** Get the version of the TRNG backend. > > > + > > > + A TRNG may be implemented by the system firmware, in which case > this > > > + function shall return the version of the TRNG backend. > > > + The implementation must return NOT_SUPPORTED if a Back end is > not > > > present. > > > + > > > + @param [out] MajorRevision Major revision. > > > + @param [out] MinorRevision Minor revision. > > > + > > > + @retval RETURN_SUCCESS The function completed > successfully. > > > + @retval RETURN_INVALID_PARAMETER Invalid parameter. > > > + @retval RETURN_UNSUPPORTED Backend not present. > > > +**/ > > > +RETURN_STATUS > > > +EFIAPI > > > +GetTrngVersion ( > > > + OUT UINT16 *MajorRevision, > > > + OUT UINT16 *MinorRevision > > > + ); > > > + > > > +/** Get the UUID of the TRNG backend. > > > + > > > + A TRNG may be implemented by the system firmware, in which case > this > > > + function shall return the UUID of the TRNG backend. > > > + Returning the TRNG UUID is optional and if not implemented, > > > RETURN_UNSUPPORTED > > > + shall be returned. > > > + > > > + Note: The caller must not rely on the returned UUID as a trustwort= hy > > > TRNG > > > + Back end identity > > > + > > > + @param [out] Guid UUID of the TRNG backend. > > > + > > > + @retval RETURN_SUCCESS The function completed > successfully. > > > + @retval RETURN_INVALID_PARAMETER Invalid parameter. > > > + @retval RETURN_UNSUPPORTED Function not implemented. > > > +**/ > > > +RETURN_STATUS > > > +EFIAPI > > > +GetTrngUuid ( > > > + OUT GUID *Guid > > > + ); > > > + > > > +/** Returns maximum number of entropy bits that can be returned in > a > > > single > > > + call. > > > + > > > + @return Returns the maximum number of Entropy bits that can be > > > returned > > > + in a single call to GetTrngEntropy(). > > > +**/ > > > +UINTN > > > +EFIAPI > > > +GetTrngMaxSupportedEntropyBits ( > > > + VOID > > > + ); > > > + > > > +/** Returns N bits of conditioned entropy. > > > + > > > + See [1] Section 2.3.1 GetEntropy: An Interface to the Entropy Sour= ce > > > + GetEntropy > > > + Input: > > > + bits_of_entropy: the requested amount of entropy > > > + Output: > > > + entropy_bitstring: The string that provides the requested en= tropy. > > > + status: A Boolean value that is TRUE if the request has been > satisfied, > > > + and is FALSE otherwise. > > > + > > > + @param [in] EntropyBits Number of entropy bits requested. > > > + @param [in] BufferSize Size of the Buffer in bytes. > > > + @param [out] Buffer Buffer to return the entropy bits. > > > + > > > + @retval RETURN_SUCCESS The function completed > successfully. > > > + @retval RETURN_INVALID_PARAMETER Invalid parameter. > > > + @retval RETURN_UNSUPPORTED Function not implemented. > > > + @retval RETURN_BAD_BUFFER_SIZE Buffer size is too small. > > > + @retval RETURN_NOT_READY No Entropy available. > > > +**/ > > > +RETURN_STATUS > > > +EFIAPI > > > +GetTrngEntropy ( > > > + IN UINTN EntropyBits, > > > + IN UINTN BufferSize, > > > + OUT UINT8 *Buffer > > > + ); > > > + > > > +#endif // TRNG_LIB_H_ > > > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > > > index 4c81cbd75ab2..0a7859fc1d3f 100644 > > > --- a/MdePkg/MdePkg.dec > > > +++ b/MdePkg/MdePkg.dec > > > @@ -8,6 +8,7 @@ > > > # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved= .
> > > # (C) Copyright 2016 - 2021 Hewlett Packard Enterprise Development > > > LP
> > > # Copyright (c) 2022, Loongson Technology Corporation Limited. All > rights > > > reserved.
> > > +# Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.
> > > # > > > # SPDX-License-Identifier: BSD-2-Clause-Patent > > > # > > > @@ -279,6 +280,10 @@ [LibraryClasses] > > > ## @libraryclass Provides function for SMM CPU Rendezvous Library= . > > > SmmCpuRendezvousLib|Include/Library/SmmCpuRendezvousLib.h > > > > > > + ## @libraryclass Provides services to generate Entropy using a T= RNG. > > > + # > > > + TrngLib|Include/Library/TrngLib.h > > > + > > > [LibraryClasses.IA32, LibraryClasses.X64, LibraryClasses.AARCH64] > > > ## @libraryclass Provides services to generate random number. > > > # > > > -- > > > 2.25.1 > > > > > > > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D > > > Groups.io Links: You receive all messages sent to this group. > > > View/Reply Online (#95322): > > > https://edk2.groups.io/g/devel/message/95322 > > > Mute This Topic: https://groups.io/mt/94407745/1772286 > > > Group Owner: devel+owner@edk2.groups.io > > > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [jiewen.yao@intel.com] > > > -=3D-=3D-=3D-=3D-=3D-=3D > > > > > >=20 >=20 >=20 >=20