From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web11.6324.1667524578972690518 for ; Thu, 03 Nov 2022 18:16:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=iBHBckl3; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id C4066CD1F6DF for ; Fri, 4 Nov 2022 09:16:16 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1667524576; bh=vcVQkQwxurg75ycBLRWzpLI2Mxb/O5RVKL4UkWuE7Io=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=iBHBckl3GXZF4KnYNISTh5kvdi9Ae7vOrk2MxZ1qHmD6L+PJcHoi8TD95TpmaieJs +INxUIgLLkF1XqoEH1axJdEncnqQcvGqwbWgQuYStTqvwsPQ1MQELC+FqHbaz3ZWBj gj/MwWJIDl0fnauUAh3ZvDGshUaYtOCLEXbAM2IU= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id BFDB3CD1F6CD for ; Fri, 4 Nov 2022 09:16:16 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 8D197CD1F6C6 for ; Fri, 4 Nov 2022 09:16:16 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 1A8BFCD1F73B for ; Fri, 4 Nov 2022 09:16:13 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 04 Nov 2022 09:16:03 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Yao, Jiewen'" , , Cc: "'Sami Mujawar'" , "'Leif Lindholm'" , "'Ard Biesheuvel'" , "'Rebecca Cran'" , "'Kinney, Michael D'" , "'Wang, Jian J'" References: <20221028153259.397445-1-Pierre.Gondois@arm.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjkgMDAvMTldIEFkZCBSYXcgYWxnb3JpdGhtIHN1cHBvcnQgdXNpbmcgQXJtIFRSTkcgaW50ZXJmYWNl?= Date: Fri, 4 Nov 2022 09:16:06 +0800 Message-ID: <030401d8efeb$03c1b890$0b4529b0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQEgTokdd/81cRiCO4twA3U1ujdPNwHLu9H+r5DZYXA= Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Sami, Leif, Ard: Can you give your Reviewed-by for this patch set this week? If so, = this feature can catch stable tag 202211. =20 Stable202211 tag soft feature freeze will start on next Monday Nov = 7th.=20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Yao, Jiewen > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA11=D4=C21=C8=D5 16:56 > =CA=D5=BC=FE=C8=CB: Pierre.Gondois@arm.com; devel@edk2.groups.io > =B3=AD=CB=CD: Sami Mujawar ; Leif Lindholm > ; Ard Biesheuvel = ; > Rebecca Cran ; Kinney, Michael D > ; Gao, Liming ; > Wang, Jian J > =D6=F7=CC=E2: RE: [PATCH v9 00/19] Add Raw algorithm support using Arm = TRNG > interface >=20 > Thanks for the update. >=20 > For SecurityPkg (11~18), Acked-by: Jiewen Yao > Since the update is for AARCH64, I recommend to have an ARM people to = give > Reviewed-by. >=20 > Thank you > Yao Jiewen >=20 >=20 > > -----Original Message----- > > From: Pierre.Gondois@arm.com > > Sent: Friday, October 28, 2022 11:33 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: [PATCH v9 00/19] Add Raw algorithm support using Arm TRNG > > interface > > > > From: Pierre Gondois > > > > Bugzilla: Bug 3668 = (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3668) > > > > The Arm True Random Number Generator Firmware, Interface 1.0, > > specification > > defines an interface between an Operating System (OS) executing at = EL1 > and > > Firmware (FW) exposing a conditioned entropy source that is provided = by a > > TRNG back end. > > This patch-set: > > - defines an Arm TRNG library class that provides an interface to = access > > the entropy source on a platform. > > - implements an Arm TRNG library instance that uses the Arm FW-TRNG > > interface. > > - Adds RawAlgorithm support to RngDxe for Arm architecture using the = Arm > > TRNG interface. > > - Enables RNG support using Arm TRNG interface for Kvmtool = Guest/Virtual > > firmware. > > > > This patch-set is based on the v2 from Sami Mujawar: > > [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface > > v2: > > https://edk2.groups.io/g/devel/message/83775 > > v3: > > https://edk2.groups.io/g/devel/message/90845 > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v3 > > v4: > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v4 > > v5: > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v5 > > v6: > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v6 > > v7: > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v7 > > v8: > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v8 > > v9: > > https://github.com/PierreARM/edk2/tree/Arm_Trng_v9 > > > > v9: > > - Added BaseArmTrngLibNull as default in MdePkg/MdeLibs.dsc.inc. > [Liming] > > - Renamed TrngLib to ArmTrngLib and updated documentation, commit > > messages, function names accordingly. [Jiewen, Leif] > > v8: > > - Added Reviewed-by/Acked-by from Leif on ArmPkg/SecurityPkg > > patches. [Leif] > > - Renamed FID_TRNG_* macros to ARM_SMC_ID_TRNG_*. [Leif] > > v7: > > - Removed Reviewed-by from Leif. > > - Remove Sami's Signed-off. > > V6: > > - Added my signed-off on patches authored by Sami. [Leif] > > - New patch to make it easier to add new libraries in alphabetical > > order: ArmPkg: Sort HVC/SMC section alphbetically in ArmPkg.dsc [Leif] > > - Renmaed ArmHvcNullLib to ArmHvcLibNull. [Leif] > > - Added RISCV64 to the list of VALID_ARCHITECTURES for > BaseTrngLibNull. > > [Leif] > > - Removed unnecessary space in function parameter documentation > > ('[in, out]'). [Rebecca] > > - Updated INF_VERSION to latest spec (1.29) for new libraries. [Rebecca] > > - Dropped the following patches [Leif]: > > - ArmPkg/ArmLib: Add ArmHasRngExt() > > - ArmPkg/ArmLib: Add ArmReadIdIsar0() helper > > - MdePkg/BaseRngLib: Rename ArmReadIdIsar0() to ArmGetFeatRng() > > V5: > > - Removed references in Trnglib.h to 'Special Publication' > > 800-90A and 800-90C, and only reference 'Arm True Random > > Number Generator Firmware, Interface 1.0' in the Arm > > implementation of the TrngLib. [Jiewen] > > V4: > > - Removed dependencies on ArmPkg and dropped patch: > > [PATCH v3 12/22] SecurityPkg: Update Securitypkg.ci.yaml > > [Jiewen] > > - Use a dynamically allocated array to hold available algorithms. > > The array is freed in a new UNLOAD_IMAGE function and > > allocated in arch specific implementations of > > GetAvailableAlgorithms(), available in AArch64/AArch64Algo.c > > and Arm/ArmAlgo.c. > > - Correctly reference gEfiRngAlgorithmSp80090Ctr256Guid > > Guid by copying its address (add missing '&'). [Jiewen] > > V3: > > - Address Leif's comment (moving definitions, optimizations, ...) > > - Add ArmMonitorLib to choose Hvc/Smc conduit depending on a Pcd. > > - Re-factor some parts of SecurityPkg/RngDxe/ to ease the addition > > of new algorithms. > > - Add ArmHasRngExt() function to check Arm's FEAT_RNG extension. > > V2: > > - Updates TrngLib definitions to use RETURN_STATUS as the return = type > > from the interface functions as TrngLib is base type library. > > - Drops the patch "MdePkg: Add definition for NULL GUID" as there = is > > already an equivalent definition provided by gZeroGuid. Thus, the > > use of gNullGuid has been replaced with gZeroGuid. > > > > Pierre Gondois (11): > > ArmPkg/ArmMonitorLib: Definition for ArmMonitorLib library class > > ArmPkg/ArmMonitorLib: Add ArmMonitorLib > > ArmPkg: Sort HVC/SMC section alphbetically in ArmPkg.dsc > > ArmPkg/ArmHvcLibNull: Add NULL instance of ArmHvcLib > > SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid > > SecurityPkg/RngDxe: Remove ArchGetSupportedRngAlgorithms() > > SecurityPkg/RngDxe: Documentation/include/parameter cleanup > > SecurityPkg/RngDxe: Check before advertising Cpu Rng algo > > SecurityPkg/RngDxe: Add debug warning for NULL > > PcdCpuRngSupportedAlgorithm > > SecurityPkg/RngDxe: Rename AArch64/RngDxe.c > > SecurityPkg/RngDxe: Add Arm support of RngDxe > > > > Sami Mujawar (8): > > ArmPkg: PCD to select conduit for monitor calls > > MdePkg/ArmTrngLib: Definition for Arm TRNG library class interface > > MdePkg/ArmTrngLib: Add NULL instance of Arm TRNG Library > > ArmPkg: Add FID definitions for Arm TRNG > > ArmPkg/ArmTrngLib: Add Arm TRNG library > > SecurityPkg/RngDxe: Rename RdRandGenerateEntropy to generic name > > SecurityPkg/RngDxe: Add AArch64 RawAlgorithm support through > > ArmTrngLib > > ArmVirtPkg: Kvmtool: Add RNG support using Arm TRNG interface > > > > ArmPkg/ArmPkg.dec | 12 +- > > ArmPkg/ArmPkg.dsc | 5 +- > > ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 109 ++++- > > ArmPkg/Include/Library/ArmMonitorLib.h | 42 ++ > > ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.c | 29 ++ > > .../Library/ArmHvcLibNull/ArmHvcLibNull.inf | 22 + > > ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c | 34 ++ > > .../Library/ArmMonitorLib/ArmMonitorLib.inf | 29 ++ > > ArmPkg/Library/ArmTrngLib/ArmTrngDefs.h | 50 +++ > > ArmPkg/Library/ArmTrngLib/ArmTrngLib.c | 388 > > ++++++++++++++++++ > > ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf | 29 ++ > > ArmVirtPkg/ArmVirtKvmTool.dsc | 10 + > > ArmVirtPkg/ArmVirtKvmTool.fdf | 5 + > > MdePkg/Include/Library/ArmTrngLib.h | 106 +++++ > > .../BaseArmTrngLibNull/BaseArmTrngLibNull.c | 121 ++++++ > > .../BaseArmTrngLibNull/BaseArmTrngLibNull.inf | 30 ++ > > .../BaseArmTrngLibNull/BaseArmTrngLibNull.uni | 12 + > > MdePkg/MdeLibs.dsc.inc | 1 + > > MdePkg/MdePkg.dec | 5 + > > MdePkg/MdePkg.dsc | 1 + > > .../RngDxe/AArch64/AArch64Algo.c | 72 ++++ > > .../RngDxe/Arm/ArmAlgo.c | 51 +++ > > .../RngDxe/{AArch64/RngDxe.c =3D> ArmRngDxe.c} | 81 +++- > > .../RandomNumberGenerator/RngDxe/ArmTrng.c | 71 ++++ > > .../RngDxe/Rand/RdRand.c | 14 +- > > .../RngDxe/Rand/RdRand.h | 43 -- > > .../RngDxe/Rand/RngDxe.c | 62 ++- > > .../RandomNumberGenerator/RngDxe/RngDxe.c | 90 ++-- > > .../RandomNumberGenerator/RngDxe/RngDxe.inf | 18 +- > > .../RngDxe/RngDxeInternals.h | 71 ++-- > > SecurityPkg/SecurityPkg.dsc | 5 +- > > 31 files changed, 1462 insertions(+), 156 deletions(-) > > create mode 100644 ArmPkg/Include/Library/ArmMonitorLib.h > > create mode 100644 ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.c > > create mode 100644 ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.inf > > create mode 100644 ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c > > create mode 100644 ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf > > create mode 100644 ArmPkg/Library/ArmTrngLib/ArmTrngDefs.h > > create mode 100644 ArmPkg/Library/ArmTrngLib/ArmTrngLib.c > > create mode 100644 ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf > > create mode 100644 MdePkg/Include/Library/ArmTrngLib.h > > create mode 100644 > > MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.c > > create mode 100644 > > MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.inf > > create mode 100644 > > MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.uni > > create mode 100644 > > SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/AArch64Algo.c > > create mode 100644 > > SecurityPkg/RandomNumberGenerator/RngDxe/Arm/ArmAlgo.c > > rename > > SecurityPkg/RandomNumberGenerator/RngDxe/{AArch64/RngDxe.c =3D> > > ArmRngDxe.c} (64%) > > create mode 100644 > > SecurityPkg/RandomNumberGenerator/RngDxe/ArmTrng.c > > delete mode 100644 > > SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h > > > > -- > > 2.25.1