From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.67]) by mx.groups.io with SMTP id smtpd.web11.15372.1594126105370614756 for ; Tue, 07 Jul 2020 05:48:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=emXiXcwp; spf=pass (domain: arm.com, ip: 40.107.22.67, 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=49HeNnIzegGMBP5c+Q9adVhs8WmI7dtd+0yaZTL/Oac=; b=emXiXcwp3m6HejD6Q19dGK7zQ9dz7FwzlbNHwSMLB9KZYCfMOviyeBr5gLjZ2kT3VF0Elc1lKtMC2ApWUH8KtKGs5mVEXxuMZ392lNcHaHPgisECAuNUMYvlZFI0XReMkJXY29VixDfU/i9rL4j+U6P7jDNkP4ZUyjDOtdd1KlQ= Received: from AM5PR0601CA0032.eurprd06.prod.outlook.com (2603:10a6:203:68::18) by DB8PR08MB5180.eurprd08.prod.outlook.com (2603:10a6:10:e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Tue, 7 Jul 2020 12:48:21 +0000 Received: from VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:68:cafe::27) by AM5PR0601CA0032.outlook.office365.com (2603:10a6:203:68::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27 via Frontend Transport; Tue, 7 Jul 2020 12:48:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass 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 VE1EUR03FT045.mail.protection.outlook.com (10.152.19.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:21 +0000 Received: ("Tessian outbound a4b10e5b482d:v62"); Tue, 07 Jul 2020 12:48:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7bd1676d86454b79 X-CR-MTA-TID: 64aa7808 Received: from 6e384f4a5a70.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FB4D87D0-4361-4A13-A365-5D64E1414F4C.1; Tue, 07 Jul 2020 12:48:13 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6e384f4a5a70.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QKmHVyogHxwguBngt2Tfd8XFSb8QC8MI8AgEJVf7ei8B3r0LtacvJ7QYEM8wAdGmWxs5oCYByP0i6RDTpdAsUHTf2HgvzOGZrQMFs/x6EYuyXVF2JcpBvjuDjqBjOXHEfVWVQnMx8i/MBxIZg1NrxmkJd35B+26oXdpoZYdFA+8UlFJStvNwQztz/l+W2wiGdp0ltVFruqvlnBODbmfOXDLaLhO7ISIFjyG22D1ngcPK6u8+mpJ7BQe6ioJw/vcI9kqChrokCAJFH1kUHozHv1pLuOHBQBln1MykzdPxpTMetO9wR8zpRhhQR3miJv/ejz7/0FRc1oRKHM1mi3ncNQ== 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-SenderADCheck; bh=49HeNnIzegGMBP5c+Q9adVhs8WmI7dtd+0yaZTL/Oac=; b=ckB8E4OztpP/9OkmDh9OZ3m4Z1cmRJxAj9UJHxFMEJ72K58wZAP/drEKbt3QsLB2njFG/H61qNvf5LJnism6SVLiYdiPK6RkFkBOQ9CWzx8HFXNxQ2xR426Xa/W23B1WTAnH0OwcIOScwftzzaG2jtQw2TqSUnq8hq6hJWZ+royqqx7u16rnnZYSz3d38Xi7SQpgh/7V+2FavmZ4wagkgDWKkZ2RT2t7xO6iXt4NXjJ7nolE6GAxXHOAhfr8xIg0d7kfK04tqQ4eEijgV8sHXi1zCozUqqPdKcN+fC+LtHOjvgO0Y2y9L69yOF3tUelnWfEFs4m//qlfnLz8vvRE6w== 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=bestguesspass 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=49HeNnIzegGMBP5c+Q9adVhs8WmI7dtd+0yaZTL/Oac=; b=emXiXcwp3m6HejD6Q19dGK7zQ9dz7FwzlbNHwSMLB9KZYCfMOviyeBr5gLjZ2kT3VF0Elc1lKtMC2ApWUH8KtKGs5mVEXxuMZ392lNcHaHPgisECAuNUMYvlZFI0XReMkJXY29VixDfU/i9rL4j+U6P7jDNkP4ZUyjDOtdd1KlQ= Received: from DB8P191CA0013.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::23) by DB6PR0802MB2582.eurprd08.prod.outlook.com (2603:10a6:4:a2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Tue, 7 Jul 2020 12:48:13 +0000 Received: from DB5EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::a2) by DB8P191CA0013.outlook.office365.com (2603:10a6:10:130::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass 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 DB5EUR03FT023.mail.protection.outlook.com (10.152.20.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:13 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:12 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 7 Jul 2020 12:48:11 +0000 Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:10 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , , , Subject: [PATCH v4 00/15] Kvmtool guest firmware support for Arm Date: Tue, 7 Jul 2020 13:47:54 +0100 Message-ID: <20200707124810.50668-1-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant 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;SFTY:;SFS:(4636009)(396003)(136003)(346002)(376002)(39860400002)(46966005)(426003)(26005)(186003)(336012)(83380400001)(1076003)(316002)(478600001)(2616005)(44832011)(966005)(8676002)(81166007)(8936002)(82740400003)(82310400002)(356005)(47076004)(4326008)(86362001)(36756003)(6666004)(2906002)(5660300002)(54906003)(7696005)(6916009)(70586007)(70206006);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de4cddb3-d00e-42e2-f2d5-08d82274078d X-MS-TrafficTypeDiagnostic: DB6PR0802MB2582:|DB8PR08MB5180: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 0457F11EAF X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: hCNf0t+eYdQjEkNvv4x+X5hUfDhRXAGsGSWRFNkEYoN0A61U7eo9Qnk5QMA0btBMSm3JMRk8saq15CxpkJjpPavx148SqbfUSBLJncM+AZ8KepKHqSM+odn81P6qSYlExsrazu69aE7dERt7lkCLrX1eNIa0VxCa9IAz/BXtU5iNWaPFwZBqN4FNBcS+ZimwM5RzPgRU/gJ7VhUpVTwJaZP9d4Qr8kL4EkmHqo7gKmeBPjLMak69qNP364gNXWtvJuHwHFYqJQg2c+RbzocFkO1Tke5ZpEY++IcV3po37Pp0u6caSYOFVvyCr8OMYxuVRzJicS6lWOKdHcQqrAYESC05UtTMdEpOt5dMfMX92R3eDIM/Ku4Em8lEwXfrfVNLLGL45+mLH9wa1WkvQ7YsfSZOyUY+H6aId4UfxYP9yjPlhg0PxWfxg0E8Hi4uJhz0+ZN48qxpysihKFDtEjU+feaR+BELYT38h9NVe+DdgqE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2582 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com 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;SFTY:;SFS:(4636009)(396003)(376002)(346002)(39860400002)(136003)(46966005)(336012)(2616005)(8936002)(83380400001)(26005)(2906002)(6916009)(7696005)(44832011)(478600001)(86362001)(36756003)(426003)(966005)(4326008)(186003)(6666004)(82310400002)(8676002)(82740400003)(81166007)(316002)(70586007)(70206006)(1076003)(47076004)(5660300002)(36906005)(54906003);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: cc65596b-bfd2-45bc-ad3a-08d8227402be X-Forefront-PRVS: 0457F11EAF X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dBR2192YQTl3+Qv+b2WFzGDzRJMoEDeFR3XHe2PwI4u1wiz7FT5aP0S53WVjLseMOFlXisESZ1hu+FPvAo0jkVMf76sHD/QKNtTTcel7NEXJWZmUya6Jae/himC/uQHcTttT0mkgfA47nu7ljha8Qz/Q/DhAqUVrU7VFJB9aOxqYP4HY6420okxjuzsR5QP4StRdC6TY8qwUZVy8SCUltb4GABp2qrWyLCmI2TIw3v9OgI71268RsdvKC70pTa2oC+lxM5zZWjnvwiH0r0vblrDX9M3bnd/0dMNUJlI5GbNGk9XEX+m6v8OMBN0Z7NzgszUZFRsVofJXMVu0utk2RzvMfUCdSZKGgGzpAcTvp7VaX7G3YBbbmRcmWaAoIteCr83Evq6KvmVFpCgu46D6cdtVZKwDbEcsgph5g+xiSIOu60svaFVr4UZ6JaeQgzw9d/YINnX7IcbJyuhKxqKX7QIXI1EmOt1GvH6LbYEXpEg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:21.0049 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de4cddb3-d00e-42e2-f2d5-08d82274078d 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: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5180 Content-Type: text/plain Kvmtool is a virtual machine manager that can be used to launch guest partitions. Kvmtool additionally supports emulation of hardware like the RTC, CFI etc. essentially providing an emulated platform for a Guest OS to run. To boot a standards-based OS one would need UEFI. In this case it is UEFI at EL1 or guest/virtual firmware. Kvmtool has been enhanced to enable launching of KVM guests with UEFI support e.g. CFI emulation has been added to store UEFI variables, etc. These changes have been merged in the kvmtool repository at: https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git This patch series: - adds UEFI guest firmware support for the Kvmtool emulated Arm platform. - addresses the review feedback for the v3 series discussed on the mailing list at: https://edk2.groups.io/g/devel/message/61662 - Drops patch for early serial port initialisation due to incompatibility with some platforms. The changes for the v4 series can be seen at: https://github.com/samimujawar/edk2/tree/299_kvmtool_plat_support_v4 Sami Mujawar (15): PcAtChipsetPkg: Add MMIO Support to RTC driver ArmVirtPkg: Add Kvmtool RTC Fdt Client Library ArmPlatformPkg: Dynamic flash variable base ArmVirtPkg: Add kvmtool platform driver ArmVirtPkg: kvmtool platform memory map ArmVirtPkg: Add Kvmtool NOR flash lib MdeModulePkg: Fix constructor invocation ordering ArmVirtPkg: GUID Hob for 16550 UART base address ArmVirtPkg: 16550 UART Platform hook library ArmVirtPkg: Add Kvmtool Platform Pei Lib ArmVirtPkg: Support for kvmtool virtual platform ArmVirtPkg: Package dependency for MC146818 RTC ArmVirtPkg: Add kvmtool to package dictionary .python/SpellCheck: Add 'XIPFLAGS' to "words" section Maintainer.txt: Add Kvmtool platform reviewer .pytool/Plugin/SpellCheck/cspell.base.yaml | 1 + ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c | 4 +- ArmVirtPkg/ArmVirtKvmTool.dsc | 321 +++++++++++++++++++ ArmVirtPkg/ArmVirtKvmTool.fdf | 234 ++++++++++++++ ArmVirtPkg/ArmVirtPkg.ci.yaml | 6 +- ArmVirtPkg/ArmVirtPkg.dec | 2 + ArmVirtPkg/Include/Guid/Early16550UartBaseAddress.h | 22 ++ ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c | 82 +++++ ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf | 44 +++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c | 138 ++++++++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf | 36 +++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.c | 57 ++++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf | 39 +++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.uni | 14 + ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c | 78 +++++ ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf | 48 +++ ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c | 230 ++++++++++++++ ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf | 42 +++ ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c | 96 ++++++ ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf | 42 +++ ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c | 336 ++++++++++++++++++++ ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf | 49 +++ Maintainers.txt | 10 + MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 17 + MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf | 3 + PcAtChipsetPkg/PcAtChipsetPkg.dec | 16 + PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c | 120 ++++++- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h | 2 + PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c | 58 +++- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf | 8 + 30 files changed, 2138 insertions(+), 17 deletions(-) create mode 100644 ArmVirtPkg/ArmVirtKvmTool.dsc create mode 100644 ArmVirtPkg/ArmVirtKvmTool.fdf create mode 100644 ArmVirtPkg/Include/Guid/Early16550UartBaseAddress.h create mode 100644 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c create mode 100644 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf create mode 100644 ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c create mode 100644 ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf create mode 100644 ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.c create mode 100644 ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf create mode 100644 ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.uni create mode 100644 ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c create mode 100644 ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf create mode 100644 ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c create mode 100644 ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf create mode 100644 ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c create mode 100644 ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf create mode 100644 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c create mode 100644 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'