From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) by mx.groups.io with SMTP id smtpd.web09.2459.1619642666366230261 for ; Wed, 28 Apr 2021 13:44:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=NOjbnzfJ; spf=pass (domain: nuviainc.com, ip: 209.85.166.45, mailfrom: rebecca@nuviainc.com) Received: by mail-io1-f45.google.com with SMTP id a11so11460234ioo.0 for ; Wed, 28 Apr 2021 13:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MEo5hPTiFue2YJj6+ZFDfL9OTGaZAWzNaQrqjGwJLvA=; b=NOjbnzfJS2o+YBcfqHaZ1pTtqvEBk9I35WhIcKR2OTLxfF6ovXWHqkhvQ1ZEGI50cE 3NAd9BSx387uBx/PwWLe2ssXJFESqNpoAf8XxtfnJ57x6N/K1uSzaV2ad4KDuCaM7RXn E8+zLGsR7X/32Ru5xzbwoxrA9ReRycUjRyRiM9o2Kgwl2P44WFAU/RPmgFGq8yzdotzS XCLYDq8dePjaqrIUMrjPZKUxjk8RPkcpxEKuI7EodVDs60MoFnIemjg8/VA2DdStKMGo mNniRLzEl6m+1E2TwKujTNEWaVaHnrVArJbL7rRmV9rD/crN0wWIjgWw+MEtVujUt+6X piOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MEo5hPTiFue2YJj6+ZFDfL9OTGaZAWzNaQrqjGwJLvA=; b=EXycEgu0bHxOfKl0ATQ/xqVUhBdXn96/aSqKeG4XoGzBU8UDfrZvDvtfycMJW/M9th abLkebtXuy7VjP7iov651JSCOIN0JZZkTOxolKslCUNKBGmZ2QdX0tw6KSgo+1sRXACQ ZZ4F0jIjvcXMeTX2pwR6H1NpagRPtCb3lGKCAUoBYZPJ/6GziA6mHxCVaC/REks4y/yx iaEkJ7KwHzl9lM5fWxyfU3kuUQweWqOheu7nmnVVi5XQEaBBsVkQQp4XKbwmYR2rEm5R B7aGFbFw1+iNKKrjioyiVIIsoCUJPpy/lEyg8CriFK+C9Up80rTTR8fj1QOHZP+BNLtO yYjw== X-Gm-Message-State: AOAM533i3L5QAXaOid//cBeMEXHDPW9afIlqUl/+sMfBgAJXNCRb5Dw3 Dcki3DkTm2SYzNGII6M7P1+/8zegJHXP80Ene0RGoXQYcGAyc+qjBpUV5/2G5YIwbHuRDgo9Qy0 qnkyqQ8F1oexq+yxB0Gpahuzk4SQPcKdO4h3qbkezHOCa24MAzOkWUmw77Z7LfyFArA0JSA== X-Google-Smtp-Source: ABdhPJzaEIrRLhzcArJcOWNwElMRhoEDcqv0RMfE6576/vsiw/osb5wBBMCERLlQswW0F1dqEtuiqA== X-Received: by 2002:a5d:9619:: with SMTP id w25mr26204581iol.2.1619642665442; Wed, 28 Apr 2021 13:44:25 -0700 (PDT) Return-Path: Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id 7sm352437ilj.59.2021.04.28.13.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 13:44:25 -0700 (PDT) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Jiewen Yao , Jian J Wang , Michael D Kinney , Liming Gao , Zhiguang Liu , Ard Biesheuvel , Sami Mujawar Subject: [PATCH 0/3] MdePkg,SecurityPkg: Update BaseRngLib and RngDxe to support ARMv8.5 FEAT_RNG Date: Wed, 28 Apr 2021 14:44:12 -0600 Message-Id: <20210428204415.25454-1-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is the RngLib|RNDR implementation from page 11 of the "Proposed update to RNG implementation" presentation from Ard and Sami. The presentation can be found at: https://edk2.groups.io/g/devel/files/Designs/2021/0116/EDKII%20-%20Proposed%20update%20to%20RNG%20implementation.pdf Rebecca Cran (3): MdePkg/BaseLib: Add support for ARMv8.5 RNG instructions MdePkg: Refactor BaseRngLib to support AARCH64 in addition to X86 SecurityPkg: Add support for RngDxe on AARCH64 MdePkg/MdePkg.dec | 9 +- MdePkg/MdePkg.dsc | 4 +- SecurityPkg/SecurityPkg.dsc | 11 +- MdePkg/Library/BaseLib/BaseLib.inf | 4 + MdePkg/Library/BaseRngLib/BaseRngLib.inf | 16 ++- SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf | 19 ++- MdePkg/Include/Library/BaseLib.h | 47 ++++++++ MdePkg/Library/BaseLib/BaseLibInternals.h | 6 + MdePkg/Library/BaseRngLib/BaseRngLibInternals.h | 31 +++++ SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.h | 37 ++++++ SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h | 0 SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h | 0 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h | 88 ++++++++++++++ MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 121 ++++++++++++++++++++ MdePkg/Library/BaseRngLib/BaseRng.c | 55 +++------ MdePkg/Library/BaseRngLib/Rand/RdRand.c | 103 +++++++++++++++++ SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.c | 54 +++++++++ SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c | 108 +++++++++++++++++ SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c | 0 SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c | 0 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c | 120 +++++++++++++++++++ SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c | 117 ++++--------------- MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.S | 29 +++++ MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.asm | 28 +++++ MdePkg/Library/BaseLib/AArch64/ArmRng.S | 51 +++++++++ MdePkg/Library/BaseLib/AArch64/ArmRng.asm | 55 +++++++++ MdePkg/Library/BaseRngLib/BaseRngLib.uni | 6 +- 27 files changed, 961 insertions(+), 158 deletions(-) create mode 100644 MdePkg/Library/BaseRngLib/BaseRngLibInternals.h create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.h rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h (100%) rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h (100%) create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h create mode 100644 MdePkg/Library/BaseRngLib/AArch64/Rndr.c create mode 100644 MdePkg/Library/BaseRngLib/Rand/RdRand.c create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.c create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c (100%) rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c (100%) create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.S create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.asm create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmRng.S create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmRng.asm -- 2.26.2