From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.41]) by mx.groups.io with SMTP id smtpd.web11.8744.1637062423182703751 for ; Tue, 16 Nov 2021 03:33:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=f9hQp4Aq; spf=pass (domain: arm.com, ip: 40.107.21.41, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H/Os2m7GP8X8smU0LQtnTOERqkUDESA0BIXrK5SscNM=; b=f9hQp4AqOPfN7rsViiVUHtRjTbHBLvX//6Nm2neKgGY0qvXKgEcW5oV8/h/ZVBbyQyoFuWWlb5d5+4bI8sQrbQ3h2F4RWTpcPjoplMQ0QGIBthuTnSpMProU/lXu4Sv5k2f8uP3RjtAmqeuBkuE7Uq/2suVbL7UxpHMkj8aTOlo= Received: from AM6P195CA0038.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:87::15) by AM6PR08MB4232.eurprd08.prod.outlook.com (2603:10a6:20b:b4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19; Tue, 16 Nov 2021 11:33:24 +0000 Received: from VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:87:cafe::ca) by AM6P195CA0038.outlook.office365.com (2603:10a6:209:87::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Tue, 16 Nov 2021 11:33:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT040.mail.protection.outlook.com (10.152.18.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.20 via Frontend Transport; Tue, 16 Nov 2021 11:33:23 +0000 Received: ("Tessian outbound c61f076cbd30:v110"); Tue, 16 Nov 2021 11:33:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 77a241f314c2d2c5 X-CR-MTA-TID: 64aa7808 Received: from e3f28bad79e9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 659C0923-DB4E-406D-9B75-9AA957F783B7.1; Tue, 16 Nov 2021 11:33:16 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e3f28bad79e9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 16 Nov 2021 11:33:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eR3+4nO5Ov9+0JgQYsCvk4vxzmEVQs/ztmBs/ujFNUBNvlt6WxH91t/Rnb12nc7LLdSaNKh/oZp5nInKqfOr9ViUDzz618nuHbpilEN2Dr2Uu9XhQZi/vtITwliJ5J6lgxauedF8Zu/thIwjnV9U4iJJMcJ5XneB3BMzWoxdfe+Or64aCLKdMW+UYPip3wimr0y7qmic6tBuJH3BzHNFOltOtg0h5KvkgsmHStPs8QoIYCgW0Y2clzmrqnXuodyKyDV9miDudLIZwP4iREVPFzc69tQtLgWyRXFJERmpEAsHzvlYJ7n91hervfzBSUpkigVbfAwo7dr3Nez8P8167w== 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=H/Os2m7GP8X8smU0LQtnTOERqkUDESA0BIXrK5SscNM=; b=dzKiZRJdo1OFftQdo1YKLrEkblaQCrnX1gVOZbkuPc+lONMaJGQq8hdJ4ktS3CBM8yI24y3SLhR3R4/Qpc4KupdH5LxN/502ahUBV7pMETw5e/ru2+zGcMlAMv6pewkPv4NoRQQT/GodZJBFN0PkBGA0jhJT0MxPYmHg7GKAghU8zNp0RJiGiiGJTpfFocK2Y0RDE5c7M/Mpe2JcUXcSmBu5VARRE9DwrbGq3YrtoAvF22LiLf4OUYGV9bwr9ErZNi1OJPnsuk3E9UoaD9FXo2+m42lxlNgxofgshfsQIYdP+jLqjJjNs7uIvgowPvDMXbOo2vtX8ZUvT1misWoTYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H/Os2m7GP8X8smU0LQtnTOERqkUDESA0BIXrK5SscNM=; b=f9hQp4AqOPfN7rsViiVUHtRjTbHBLvX//6Nm2neKgGY0qvXKgEcW5oV8/h/ZVBbyQyoFuWWlb5d5+4bI8sQrbQ3h2F4RWTpcPjoplMQ0QGIBthuTnSpMProU/lXu4Sv5k2f8uP3RjtAmqeuBkuE7Uq/2suVbL7UxpHMkj8aTOlo= Received: from AS9PR05CA0052.eurprd05.prod.outlook.com (2603:10a6:20b:489::10) by PA4PR08MB6063.eurprd08.prod.outlook.com (2603:10a6:102:ed::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Tue, 16 Nov 2021 11:33:13 +0000 Received: from VE1EUR03FT029.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:489:cafe::91) by AS9PR05CA0052.outlook.office365.com (2603:10a6:20b:489::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Tue, 16 Nov 2021 11:33:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT029.mail.protection.outlook.com (10.152.18.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Tue, 16 Nov 2021 11:33:13 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 16 Nov 2021 11:32:58 +0000 Received: from E114225.Arm.com (10.1.196.43) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Tue, 16 Nov 2021 11:32:57 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , , , , Subject: [PATCH v2 8/8] ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface Date: Tue, 16 Nov 2021 11:33:00 +0000 Message-ID: <20211116113301.31088-9-sami.mujawar@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20211116113301.31088-1-sami.mujawar@arm.com> References: <20211116113301.31088-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88e4c07b-5271-4853-238e-08d9a8f4e624 X-MS-TrafficTypeDiagnostic: PA4PR08MB6063:|AM6PR08MB4232: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: L742mU3PAnulHd//jFZvDiJRXRlGGQGPtoTjtDe60XGM/en5hZTLivBwMljtLiYjfQh85FEXd5axHeNHY6/io5Uy044/V+6duxgoDBdXaaNCWAx5IBV0w23XfNDLFMt9TQ7ty6mvNw64xoVPnWuYJfqW2cGb1qqgeB1Ty0uMBKUW85AORxy2mBplOKItckoofTlolkIz9h00r3pl7GCgkv0vZtG5FtMHUjR527PjIGm3flmOMOr/CN5yl0heR2wA/JtAQ3wvTzBE9JGeaIVT6lcLH2x0Y0hU/P9wiycR9YMFWmNhoSZbPPimbP8grMCNKquekmcP7VsWskyxhf6IRR9/bZEkhMJVQRj8P6nLTEb9hXMS8ybFzPc3XKxxnUVG6qiDQiyuLtNz4SKYQE4xtsXPyP4xYhX7NrQYl8cttqJHR3ncECB/7OiRuKUEFxP9Gf9Oe4W6RQ/xFdl39MVWo6QXi3bBr5NyEyX8EV8egdILKk55nWt4w+QBhKR35ltqSq5pW5D3fK/ONYnXSw1lX19XWUMvjYH2Fu3M/oKq6VmI7TXXHbL+aAh1IqtedNFwcxiKOcUrBMlCVgOhI3weN6KIoS8SObnRXu+vm/Y89DAi2oBbJ06imoyP5jaZSp32sZpE/UitnZhELF+XDKsbkUe4L2WTnMbfmfSJQAqTSRNRiUesgpu8+sJiBKxedNbvx/AS2O7BoiYRbGwx2T15L/JUgnQDfueULCxOaVj0UElY0RbwOaqqIi7j3LUKOIHoMeUWCjeHUV+YBl2Iz77AF3hCsftlas9lCMpdmm97lMDjGWwTfNIbo9fLjr8Q0DrJ X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(70206006)(356005)(70586007)(26005)(82310400003)(54906003)(36756003)(6666004)(6916009)(2906002)(336012)(47076005)(7416002)(4326008)(186003)(426003)(86362001)(83380400001)(8676002)(508600001)(8936002)(44832011)(5660300002)(81166007)(36860700001)(316002)(2616005)(7696005)(1076003)(19627235002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6063 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 37f6e690-40b8-43c6-bf50-08d9a8f4e02e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Cd3rgSSRR0oLV2FACyPLAm3s0acFZCJ9xee/rzRWA5sGmgHGU224CIga+C1LjrP3BOlc9VI4pGFJSsgt2UPgGSuFIwNOwbZO+H4AOezmLnpD+7Cds5C1VJ4SQr/ZybHmMtLF99jgSDQ5X4ENOZqp4h+SIUdFuCDxjxu6Ekpqz22RE2l01aGBg7S7fdF6nxyTmB7XXzpdMFkDLroOt/PBSIgaqJnmAM5l5t21547NVkzOCaHq6V4ZgNDKHScz5fUXELQTTWgj61p1WhnwUyWDzgA4VYgsNMSYAnohGvLgaLOk7MhUMrk9iDWZcJHQ+0J4qemnRIrP8gfYYBREy1jViiXO7uCL92/MaSbUA7hPiWhHfs8yqBRiGUrBZap5LS1hR63oj0sJh7e7owqkb1LWInDxlxXmlV9IsA+6DAwDOR3CKx6bPXRrTVoEojwM/y/2K8aIZcUtCVktHGJ4NEWG6I2IoHSCJ0b1ogT/rXim1nR6TAARX5k7B0i4GPgVU2XFNUNgTykobAF+j5PpFAOAZFC+JcogHZqyIj1aY3LjAexMu5bbFbb21cZQUrLIDkPdYc9RNkePJlfRXKOfxAFCQcF6qG9+KlDqr505A966gLAb8yQEU7e8WXlt7kXa3j+PVfRS1HcqrDtMxrJCy32dkVJONDlBgRC7Kwx7sx3AB7XFdrpq4cIgzaUOrVcPYZIcP9AvfybzZ9TBvJQkkNX5Pqgha7q9ZsQcKy2rlhHbritfo3TjTZGcdXnUApAFleFKG+OUKSwhXnsxWT7J3FT6QKpkEDxnu2DORehLH8pB2U= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(6666004)(316002)(7696005)(26005)(6916009)(36756003)(5660300002)(54906003)(186003)(2906002)(36860700001)(83380400001)(2616005)(81166007)(4326008)(70206006)(82310400003)(86362001)(1076003)(508600001)(44832011)(426003)(47076005)(8936002)(336012)(70586007)(19627235002)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2021 11:33:23.5212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88e4c07b-5271-4853-238e-08d9a8f4e624 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4232 Content-Type: text/plain Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) The EFI_RNG_PROTOCOL published by RngDxe has been updated to implement the EFI_RNG_ALGORITHM_RAW using the Arm FW-TRNG interface to provide access to entropy. Therefore, enable EFI_RNG_PROTOCOL for the Kvmtool guest/virtual firmware. Signed-off-by: Sami Mujawar --- Notes: v2: - No code change since v1. Re-sending with V2 series. [SAMI] ArmVirtPkg/ArmVirtKvmTool.dsc | 10 ++++++++++ ArmVirtPkg/ArmVirtKvmTool.fdf | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index 9d23072d8fa893907848ef105b2c96953a68c56e..418ae894681d0390907ff25538b58bf0162018b0 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -71,6 +71,8 @@ [LibraryClasses.common] PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf + TrngLib|ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.inf + [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM] PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf @@ -102,6 +104,8 @@ [PcdsFeatureFlag.common] # Use MMIO for accessing RTC controller registers. gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE + gArmTokenSpaceGuid.PcdMonitorConduitHvc|TRUE + [PcdsFixedAtBuild.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F @@ -353,3 +357,9 @@ [Components.common] } OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf OvmfPkg/Virtio10Dxe/Virtio10.inf + + # + # Rng Support + # + SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf + diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf index 14a5fce43a0928d6d78b1af5d7bc3a16b6f07918..ed7e5cfcfad8ef762921de52af66f76351736468 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.fdf +++ b/ArmVirtPkg/ArmVirtKvmTool.fdf @@ -211,6 +211,11 @@ [FV.FvMain] # INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf + # + # Rng Support + # + INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf + [FV.FVMAIN_COMPACT] FvAlignment = 16 ERASE_POLARITY = 1 -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'