From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65855+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673272617855.0171655798509; Fri, 2 Oct 2020 14:14:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id MaVrYY1788612x1FBOa9htwP; Fri, 02 Oct 2020 14:14:32 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.81]) by mx.groups.io with SMTP id smtpd.web11.5737.1601673268413831003 for ; Fri, 02 Oct 2020 14:14:29 -0700 X-Received: from DBBPR09CA0043.eurprd09.prod.outlook.com (2603:10a6:10:d4::31) by AM5PR0802MB2420.eurprd08.prod.outlook.com (2603:10a6:203:9e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:24 +0000 X-Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:d4:cafe::5e) by DBBPR09CA0043.outlook.office365.com (2603:10a6:10:d4::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:24 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65855+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:24 +0000 X-Received: ("Tessian outbound 7161e0c2a082:v64"); Fri, 02 Oct 2020 21:14:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d2d245109b4a730e X-CR-MTA-TID: 64aa7808 X-Received: from c4dcbcad97ea.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 342F8C56-92F2-4A5A-9F98-A5E0990A0BA3.1; Fri, 02 Oct 2020 21:14:19 +0000 X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c4dcbcad97ea.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BYOcAA7pwPoho0qn/rjN0LpfN+e+y4eSMrrr9smik4dzGiTUWdpebpA7bGfg7rQetqS66UGmGEw2TgK+RHYccYlcsiFY60kFiV3zBG3ujBsjS5yPeTMVu+a1AFxJieFL+0CKGfAGiKFw5p1RnDgwMw1xIEsQhVP0zApVcN4Yea02565536foxyjFrKi7VMYpZ3NaeK/qdwrlq+CWSdohXPIFKfeu/0YQsD9/eH/O+1G4noFsaRwWjwogpSD0P3sL54fcVODQAGhhT7mfHras78g+4fqRitZD9TL6Z2Vc4tpIXBppuJKEY0nuinnCFYAYWmlmYaWqbr8ulZWktvsyrg== 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=VlNt/19C1npXnibaApJisgr6KNy/dDqUJ+V3K4JNSv0=; b=Vch/FGnhn4Gj/zJJqp2RO5mnf3dY92Q6wJjMyjSfHVpFzuO3xEhLOlnFAhoA6V/5uRfhrTsG7IGStz33SW8XSQDYTPeKepqO/fmI8iwg7hYXXoiB5ORpLpWeedmThexoeqpOzLgtvQmEB3SwW52+DGAo8rm/Q0MwhK6zSN9dwXQhaJ0TF733w0x5xCYTdcLOBsJ3KUsAnB7woolKSG1pAOrtmc7CqUXJ4wCKcjA9PTWxuiWjRaKs0KIRjFdMUcRnooWT4pDPt+L05yjGDVVAPiA4nLn/K+pDPsFmFR8c2OwL9/5hOg8P5QlKoxiRu3Xr/2nlc4BViAgxSaqbj9ozdQ== 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 X-Received: from MR2P264CA0079.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::19) by AM7PR08MB5480.eurprd08.prod.outlook.com (2603:10a6:20b:de::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:17 +0000 X-Received: from VE1EUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:32:cafe::c9) by MR2P264CA0079.outlook.office365.com (2603:10a6:500:32::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:17 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT046.mail.protection.outlook.com (10.152.19.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:16 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Fri, 2 Oct 2020 21:14:11 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:10 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 01/15] PcAtChipsetPkg: Add MMIO Support to RTC driver Date: Fri, 2 Oct 2020 22:13:55 +0100 Message-ID: <20201002211409.43888-2-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0df91c25-abdd-40f6-40ae-08d867182389 X-MS-TrafficTypeDiagnostic: AM7PR08MB5480:|AM5PR0802MB2420: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:3968;OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 5BWGqo/83Qh8WaWT60sdYKoIMQa2Gf8RjUeMhHUavFPAf1QX13VD6a3XMaQrWckcT1Ty73sg59yU1oTrO3jyI5IBV1UX1ZytmCOj5jSCXVbiJwLsofE02NK3p+rzEIUKsqb7xbww4MR1Z6kFT9KuF9j7OLHt9AGKkvVlrkVVEyvavngi4ko5eYa9LP2Vea00x9DxD1IoucSl+1oYuc0z+GqHDx7SgJk6rOXXXpbESJmBYOHu4GBunEtIesyQQhD3K2t4sw6mvT/988BzUNfSpBSXfNpelCUGddRYsFIfPcEXeMariSVkhd4Md+z+OB4HJuM2ldVcrJ4WbQhBpPxSbru7dehm4rDFaJ+RjIPiulldk4TEwg+2K+i7IJKParPtaTw7WNjBwKY7phcld6E/iwcmB2HWYsG4UUn4JInwTAezKglmLkwnUPUz4O2pqqc6EMMS30ykWohKIu4Ib09/5L7zhae+jjTQ3rBGwrLc+Tg= 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:(6029001)(4636009)(136003)(39850400004)(376002)(396003)(346002)(46966005)(6916009)(30864003)(2616005)(86362001)(36756003)(426003)(6666004)(316002)(336012)(2906002)(54906003)(8936002)(478600001)(26005)(186003)(966005)(82310400003)(47076004)(81166007)(4326008)(83380400001)(5660300002)(356005)(1076003)(82740400003)(19627235002)(8676002)(44832011)(70586007)(7696005)(83080400001)(70206006);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5480 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a4c450d0-367d-409e-45e5-08d867181ee7 X-Microsoft-Antispam-Message-Info: 7oC1NaPMx6ct7UN5mMQZGSodDnd8JnqgkeSuVrI3FwHo6SQ9l2Ok80vVlAMigPwpwxz6D2DmJM21hge8jUgy8JOIyb+1H4gSZffE/0WludjzJuaMGtB8UPzKV+JAyHdLhM6GCCc+wFH33N0RY+HMBaVIMNTTtnQ9Qm6mRL7uaYf9HkCeh0g7VhbTHUx3xsFW5DwiZ4DnofPK1UrdIXRyMcE2Z9J449Z/soNigDwNC4ulwmbX1XhFIGM0NU8Wt4qA2fQX+Nv7e3oMWrrjisMCXGCgsFaU/OTp3FSVSjYj2GiP8SAVs1bs5NXUfMHY2MZlQOCIUnWqk+a67j9X8FFHySeK2orayM7oL8/jjUpMAMj886GpJm7kR3hggPxjJBqSp8XtMJAoVcFhCsyy1L3aR2fD4k3eRrEW0yDL/aNcQETVcw5geCDCMSn25/Ftuv39otFHJVY/uvAb0eJEm6lMiwe1JNmGtKSOiSdjUlda6gA= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:24.5918 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0df91c25-abdd-40f6-40ae-08d867182389 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: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2420 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: vpBEmgt6tKpVJBaDy1zEaVPHx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673272; bh=eUBV5zJAc06Zx/6EPSrvXwAefQ6ULuTLylywxERGK44=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=KpbhOyOm73H8CUt0ZDEGwjFm0mixAuA4hJmeFBbS+JOY6Jg1oNrLkUTKHZGETVaxFbV ZmcUNgA8hefzrjHK6HlHil7StDzrUaOtEj7ArQvlZwZmk4eKI4AFAG3UtcibY/0HDSEt4 hBc1Q8EtakvMGJf7I5jNXUk3eIC2AevEpVg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some virtual machine managers like Kvmtool emulate the MC146818 RTC controller in the MMIO space so that architectures that do not support I/O Mapped I/O can use the RTC. This patch adds MMIO support to the RTC controller driver. The PCD PcdRtcUseMmio has been added to select I/O or MMIO support. If PcdRtcUseMmio is: TRUE - Indicates the RTC port registers are in MMIO space. FALSE - Indicates the RTC port registers are in I/O space. Default is I/O space. Additionally two new PCDs PcdRtcIndexRegister64 and PcdRtcTargetRegister64 have been introduced to provide the base address for the RTC registers in the MMIO space. When MMIO support is selected (PcdRtcUseMmio =3D=3D TRUE) the driver converts the pointers to the RTC MMIO registers so that the RTC registers are accessible post ExitBootServices. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- Notes: v5: - Updated based on review comments. [Sami] - Drop the unnecessary whitespace and header changes to [Ard] PcRtc.h, and the whitespace changes to PcRtcEntry.c Ref: https://edk2.groups.io/g/devel/topic/75354083 =20 v4: - Updated based on review comments. [Sami] - Use static helper functions instead of function pointers. [Ard] Ref: https://edk2.groups.io/g/devel/topic/75081468 =20 v3: - Make PcdRtcUseMmio a feature PCD. [Sami] - Read the RTC MMIO base address from the DT. [Andr= e] - Introduce PCDs for RTC Index and Target register base [Sami] address in the MMIO space. - Move RTC MMIO region mapping code to a separate platform [Sami] specific library. This library also reads the base addresses for the RTC from DT and configures the RTC Index and Target register PCDs. Ref: https://edk2.groups.io/g/devel/topic/74200905#60307 =20 v2: - Code review comments incorporated. [Sami] =20 v1: - Add support to read/write from RTC registers using [Sami] MMIO access - Use wrapper functions for RtcRead/Write accessors [Leif] Ref: https://edk2.groups.io/g/devel/topic/30915281#30695 PcAtChipsetPkg/PcAtChipsetPkg.dec = | 16 +++ PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c = | 120 ++++++++++++++++++-- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c = | 54 ++++++++- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf= | 8 ++ 4 files changed, 186 insertions(+), 12 deletions(-) diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dec b/PcAtChipsetPkg/PcAtChipset= Pkg.dec index 88de5cceea593176c3a2425a5963b66b789f2b9e..ed2d95550b8d153995b30cdc290= cf3bb905e211b 100644 --- a/PcAtChipsetPkg/PcAtChipsetPkg.dec +++ b/PcAtChipsetPkg/PcAtChipsetPkg.dec @@ -6,6 +6,7 @@ # # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
# Copyright (c) 2017, AMD Inc. All rights reserved.
+# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -41,6 +42,13 @@ [PcdsFeatureFlag] # @Prompt Configure HPET to use MSI. gPcAtChipsetPkgTokenSpaceGuid.PcdHpetMsiEnable|TRUE|BOOLEAN|0x00001000 =20 + ## Indicates the RTC port registers are in MMIO space, or in I/O space. + # Default is I/O space.

+ # TRUE - RTC port registers are in MMIO space.
+ # FALSE - RTC port registers are in I/O space.
+ # @Prompt RTC port registers use MMIO. + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|FALSE|BOOLEAN|0x00000021 + [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx, PcdsPatchableInModule] ## This PCD specifies the base address of the HPET timer. # @Prompt HPET base address. @@ -68,6 +76,14 @@ [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx, PcdsPatch= ableInModule] # @Expression 0x80000001 | gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValid= Year < gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear + 100 gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2097|UINT16|0x0000000E =20 + ## Specifies RTC Index Register address in MMIO space. + # @Prompt RTC Index Register address + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0|UINT64|0x00000022 + + ## Specifies RTC Target Register address in MMIO space. + # @Prompt RTC Target Register address + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0|UINT64|0x000000= 23 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## Defines the ACPI register set base address. # The invalid 0xFFFF is as its default value. It must be configured to = the real value. diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c b/PcAtChips= etPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c index 52af17941786ef81c3911512ee64551724e67209..64f36f6fbbd1b03967bd1a1290d= 108d5b0f294fa 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c @@ -3,6 +3,7 @@ =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Inc. All rights reserved.
+Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -10,6 +11,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include "PcRtc.h" =20 +extern UINTN mRtcIndexRegister; +extern UINTN mRtcTargetRegister; + // // Days of month. // @@ -54,38 +58,132 @@ IsWithinOneDay ( ); =20 /** + Read RTC content through its registers using IO access. + + @param Address Address offset of RTC. It is recommended to use + macros such as RTC_ADDRESS_SECONDS. + + @return The data of UINT8 type read from RTC. +**/ +STATIC +UINT8 +IoRtcRead ( + IN UINTN Address + ) +{ + IoWrite8 ( + PcdGet8 (PcdRtcIndexRegister), + (UINT8)(Address | (UINT8)(IoRead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x= 80)) + ); + return IoRead8 (PcdGet8 (PcdRtcTargetRegister)); +} + +/** + Write RTC through its registers using IO access. + + @param Address Address offset of RTC. It is recommended to use + macros such as RTC_ADDRESS_SECONDS. + @param Data The content you want to write into RTC. + +**/ +STATIC +VOID +IoRtcWrite ( + IN UINTN Address, + IN UINT8 Data + ) +{ + IoWrite8 ( + PcdGet8 (PcdRtcIndexRegister), + (UINT8)(Address | (UINT8)(IoRead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x= 80)) + ); + IoWrite8 (PcdGet8 (PcdRtcTargetRegister), Data); +} + +/** + Read RTC content through its registers using MMIO access. + + @param Address Address offset of RTC. It is recommended to use + macros such as RTC_ADDRESS_SECONDS. + + @return The data of UINT8 type read from RTC. +**/ +STATIC +UINT8 +MmioRtcRead ( + IN UINTN Address + ) +{ + MmioWrite8 ( + mRtcIndexRegister, + (UINT8)(Address | (UINT8)(MmioRead8 (mRtcIndexRegister) & 0x80)) + ); + return MmioRead8 (mRtcTargetRegister); +} + +/** + Write RTC through its registers using MMIO access. + + @param Address Address offset of RTC. It is recommended to use + macros such as RTC_ADDRESS_SECONDS. + @param Data The content you want to write into RTC. + +**/ +STATIC +VOID +MmioRtcWrite ( + IN UINTN Address, + IN UINT8 Data + ) +{ + MmioWrite8 ( + mRtcIndexRegister, + (UINT8)(Address | (UINT8)(MmioRead8 (mRtcIndexRegister) & 0x80)) + ); + MmioWrite8 (mRtcTargetRegister, Data); +} + +/** Read RTC content through its registers. =20 - @param Address Address offset of RTC. It is recommended to use macros = such as - RTC_ADDRESS_SECONDS. + @param Address Address offset of RTC. It is recommended to use + macros such as RTC_ADDRESS_SECONDS. =20 @return The data of UINT8 type read from RTC. **/ +STATIC UINT8 RtcRead ( - IN UINT8 Address + IN UINTN Address ) { - IoWrite8 (PcdGet8 (PcdRtcIndexRegister), (UINT8) (Address | (UINT8) (IoR= ead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x80))); - return IoRead8 (PcdGet8 (PcdRtcTargetRegister)); + if (FeaturePcdGet (PcdRtcUseMmio)) { + return MmioRtcRead (Address); + } + + return IoRtcRead (Address); } =20 /** Write RTC through its registers. =20 - @param Address Address offset of RTC. It is recommended to use macros = such as - RTC_ADDRESS_SECONDS. - @param Data The content you want to write into RTC. + @param Address Address offset of RTC. It is recommended to use + macros such as RTC_ADDRESS_SECONDS. + @param Data The content you want to write into RTC. =20 **/ +STATIC VOID RtcWrite ( - IN UINT8 Address, + IN UINTN Address, IN UINT8 Data ) { - IoWrite8 (PcdGet8 (PcdRtcIndexRegister), (UINT8) (Address | (UINT8) (IoR= ead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x80))); - IoWrite8 (PcdGet8 (PcdRtcTargetRegister), Data); + if (FeaturePcdGet (PcdRtcUseMmio)) { + MmioRtcWrite (Address, Data); + } else { + IoRtcWrite (Address, Data); + } } =20 /** diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAt= ChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c index ccda6331373bfe4069b0a59495b5e5cc731c8fc8..606b88adafb7ef5d81e32e21279= 4a5ccae9d0443 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c @@ -2,16 +2,23 @@ Provides Set/Get time operations. =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 +#include #include "PcRtc.h" =20 PC_RTC_MODULE_GLOBALS mModuleGlobal; =20 EFI_HANDLE mHandle =3D NULL; =20 +STATIC EFI_EVENT mVirtualAddrChangeEvent; + +UINTN mRtcIndexRegister; +UINTN mRtcTargetRegister; + /** Returns the current time and date information, and the time-keeping capa= bilities of the hardware platform. @@ -106,6 +113,30 @@ PcRtcEfiSetWakeupTime ( } =20 /** + Fixup internal data so that EFI can be called in virtual mode. + Call the passed in Child Notify event and convert any pointers in + lib to virtual mode. + + @param[in] Event The Event that is being processed + @param[in] Context Event Context +**/ +VOID +EFIAPI +LibRtcVirtualNotifyEvent ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + // Only needed if you are going to support the OS calling RTC functions = in + // virtual mode. You will need to call EfiConvertPointer (). To convert = any + // stored physical addresses to virtual address. After the OS transition= s to + // calling in virtual mode, all future runtime calls will be made in vir= tual + // mode. + EfiConvertPointer (0x0, (VOID**)&mRtcIndexRegister); + EfiConvertPointer (0x0, (VOID**)&mRtcTargetRegister); +} + +/** The user Entry Point for PcRTC module. =20 This is the entry point for PcRTC module. It installs the UEFI runtime s= ervice @@ -131,6 +162,11 @@ InitializePcRtc ( EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_CALLBACK); mModuleGlobal.CenturyRtcAddress =3D GetCenturyRtcAddress (); =20 + if (FeaturePcdGet (PcdRtcUseMmio)) { + mRtcIndexRegister =3D (UINTN)PcdGet64 (PcdRtcIndexRegister64); + mRtcTargetRegister =3D (UINTN)PcdGet64 (PcdRtcTargetRegister64); + } + Status =3D PcRtcInit (&mModuleGlobal); ASSERT_EFI_ERROR (Status); =20 @@ -165,7 +201,23 @@ InitializePcRtc ( NULL, NULL ); - ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + return Status; + } + + if (FeaturePcdGet (PcdRtcUseMmio)) { + // Register for the virtual address change event + Status =3D gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_NOTIFY, + LibRtcVirtualNotifyEvent, + NULL, + &gEfiEventVirtualAddressChangeGuid, + &mVirtualAddrChangeEvent + ); + ASSERT_EFI_ERROR (Status); + } =20 return Status; } diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRu= ntimeDxe.inf b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClock= RuntimeDxe.inf index c73ee98105e510f9e4e23c1a6c1e5c505325d2c9..0d8eca28b65954b073a72fc4fe5= ad6247320e79d 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDx= e.inf +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDx= e.inf @@ -6,6 +6,7 @@ # # Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
# Copyright (c) 2017, AMD Inc. All rights reserved.
+# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -61,6 +62,11 @@ [Guids] ## SOMETIMES_CONSUMES ## SystemTable gEfiAcpiTableGuid =20 + gEfiEventVirtualAddressChangeGuid + +[FeaturePcd] + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio ## CONSUMES + [FixedPcd] gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterA ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterB ## CONSUMES @@ -72,6 +78,8 @@ [Pcd] gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister ## CONSUMES + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64 ## CONSUMES + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64 ## CONSUMES =20 [Depex] gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65855): https://edk2.groups.io/g/devel/message/65855 Mute This Topic: https://groups.io/mt/77270941/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65852+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673269730537.3254142334833; Fri, 2 Oct 2020 14:14:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Qli8YY1788612xoB3kSPy3Yf; Fri, 02 Oct 2020 14:14:27 -0700 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.43]) by mx.groups.io with SMTP id smtpd.web11.5734.1601673266344568195 for ; Fri, 02 Oct 2020 14:14:27 -0700 X-Received: from AM5PR0602CA0020.eurprd06.prod.outlook.com (2603:10a6:203:a3::30) by DB7PR08MB3835.eurprd08.prod.outlook.com (2603:10a6:10:75::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:a3:cafe::2b) by AM5PR0602CA0020.outlook.office365.com (2603:10a6:203:a3::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65852+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT010.mail.protection.outlook.com (10.152.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: ("Tessian outbound 7fc8f57bdedc:v64"); Fri, 02 Oct 2020 21:14:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8ddf6cf7bc2ac4e3 X-CR-MTA-TID: 64aa7808 X-Received: from fcdbb084d6ec.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E6D77E0E-A9B5-495E-A035-CFCF9EA74297.1; Fri, 02 Oct 2020 21:14:17 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fcdbb084d6ec.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h5tEjUgU9X9ACSINndEpK0UpzxCKEJOeB9yzsrsHUaU1SjuqxqbnrTZIqj3yb5qklp9XSKZB0j7xt8ewSCo7sF8TLlF/1BCcMMZwy1qo9xM2kERHAT2HboJC1GetaqNoPQVbJS+kgNac3r7qzW1gY/XnXvFF7Tml/TWRq7zXUnke+vQNS08D2b2he1ti/6lkECVJlZtAyFsJMwffnTGcVbZqeA/KOh0yMSK5MCWfDRkmyA/kmTosW66KrrkVY1QZQQTkYNzoH7jebg9nv31mCRsFhyZ4Wol5BxEoo4aDZmRvOx9k1pvbzz2CejXyj6RkU7UENrp4V57R5KomUSi7Mg== 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=tJf7xAf9OcjxhkqeYFpOGLEbQGjW08mlB5kLcv1IW/I=; b=QsuqS6ZNOzIwSfzs5fu2fgOZfJbuUtXTtZM82Pys4a3lMoXx52tJiHRLcoq/qWzLI7o0A5j06N/USS73uQ6c5m5dX8+U4YzCYb8vrjuDoTWrL4NW7ijELclNgRjnb42OWGPgHY83idtbATxztX0fcyWqGyF3ZwylqiAeVCX5XTBYjXvWNGzdBTNLpSu3orFnYUeOv/IdsDjVNiJK/t1Q07ybIlDq9YeI/OKte+X+X3GCFN1mPrO7X7gsk5MA51l5mpc938zFzBviau3IDGEivvel3d3NzelivX1foU07hmlAQI4ZzVR2v2twN6buGDKwj3IGLLKBjLVzCz9a8bfCDg== 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 X-Received: from AM6P194CA0045.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::22) by VI1PR08MB4479.eurprd08.prod.outlook.com (2603:10a6:803:fc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.23; Fri, 2 Oct 2020 21:14:15 +0000 X-Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::27) by AM6P194CA0045.outlook.office365.com (2603:10a6:209:84::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:15 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:15 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Fri, 2 Oct 2020 21:14:13 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 2 Oct 2020 21:14:13 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:12 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 02/15] ArmVirtPkg: Add Kvmtool RTC Fdt Client Library Date: Fri, 2 Oct 2020 22:13:56 +0100 Message-ID: <20201002211409.43888-3-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15446c0f-84e4-49ad-16e9-08d8671822cf X-MS-TrafficTypeDiagnostic: VI1PR08MB4479:|DB7PR08MB3835: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ToQndQNircexrQo6897afHXEk4uMbZSwXJXOl/V1jvJez/eJtq9zNJSY8qo/ooe+8YI89OhA06s4vnJmD4hvJIIKxnZtaFN7W3sbiHUDT0yLFZ00c1hwVXeRxUEizaLuydh9ddlZkNi3ybjhLtg+DswRiy9fDK1ZRYleKaz27k/eLZqOWxMVxIdTXVvAARvW/xgfYc5g/L2+5zYeUO7uVwf+43n/YyQpPIkW94YKGHj3rQJl2QoIHGjrPPifEMDm4+NOBms5mOwAegeV5isnxUBXs+8+3KnPqu0NZCk9TDIf6SLjO+qMGxCBFobm9xh4pWifBB/T2YQ4lyrMfPLQHPDuE7ACIVVaaydKzG168Tl7ivtqBcC210G8Zp8ZWvJsScxj6HnU6IDQ7RHOSQ8oe3InMfsCMSKKqF5lxEOkhxvT053vXSsg0TgPb9uUqpsPkU8R4Txk3ciQ8LPPFI9wD556qcrWE8NppTzQceEbhyv8QOLcULeN6BMTGzIb74ROsikh/ppAU4F+pV+LMNDpUQ== 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)(136003)(376002)(346002)(39850400004)(396003)(46966005)(2906002)(82310400003)(70206006)(70586007)(36756003)(966005)(6916009)(82740400003)(316002)(4326008)(426003)(478600001)(54906003)(83380400001)(47076004)(81166007)(7696005)(44832011)(336012)(6666004)(186003)(2616005)(356005)(8676002)(26005)(8936002)(86362001)(5660300002)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4479 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 3856a2d1-147a-4859-7250-08d867181dde X-Microsoft-Antispam-Message-Info: csFwAc9gGuUcJsrCGf94ktIvzX166MEkcSIbV/Qz25TUYjiYAvL5Edrj4UlxH8Uifm4OavRB657J9NA3LHCBNum1kQ1R6fVTvMoaa/W2mq0ONyOX2ouxwGSuQX7eo1Bo/Sb/ykDS7mfAwX2UYpBWJRX57gzRkDx3WBorLpQjcGMyedJWoed3L7YSPQ1F/UAun6liQo59CTFlyxXyd4ycbK6saQu0cSLB371l79w2asWjUX5lbZ8vsM5odCaTfgMNj/FhpR2zo3+ifAYHm64yswdJz6zYP3dt9oj6JvE9Ce49rZcnttuaSwWTtM1eAaECER8N/+b9OMJHJcU9we0ICXIZdJWN/up1coMm0H0QCu3pEmkneF04/TQDZyEcZbWshPqR3Pu/Xuzkx8kbPvkK+0WslLIFwgKEt8fOkGIx0bL0XSydbqFZuH5noPQWSLuL1zmWQtSD6NWAbvb2KDZvpwmVL8QIQvcmY2jZsLvfChw= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:23.2339 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15446c0f-84e4-49ad-16e9-08d8671822cf 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: VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3835 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: PxGujx4U46Sb6doPDNF8fXvux1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673267; bh=PlDdg4j+r6ywhbRhX2AdXakYk1Fdv0d23vysRnxhTUc=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=EM8Il/1CImJL4i6L7YYI28DBh/LVjTMLAS7GNNzvcP+B5aZJ1DbJBeoLlzTneitBAAI 1CNYmsMxxmBNnuMSBRl8WKrYGDmoMitKjRZHT5YTdcxh45sct+fMILu/pGINg1NUCmFNZ a0vbRXsS7i58ElfM7Nup/aBmOAAEENARzbI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add library that parses the Kvmtool device tree and updates the dynamic PCDs describing the RTC Memory map. It also maps the MMIO region used by the RTC as runtime memory so that the RTC registers are accessible post ExitBootServices. Since UEFI takes ownership of the RTC hardware disable the RTC node in the DT to prevent the OS from attaching its device driver as well. Signed-off-by: Sami Mujawar --- Notes: v5: - Fixed minor ECC reported issues in file header. [Sami] Ref: https://edk2.groups.io/g/devel/topic/75354087 =20 v4: - Updated based on review comments. [Sami] - Cleanup include file list, make local functions static, [Ard] drop EFIAPI, use EFI_PAGE_MASK and use ReadUnaligned64. Ref: https://edk2.groups.io/g/devel/topic/75081472 =20 v3: - Introduce library to read and map the MMIO base addresses [Sami] for the RTC registers from the DT and configure the Index and Target register PCDs. ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c | 230= ++++++++++++++++++++ ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf | 42= ++++ 2 files changed, 272 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientL= ib.c b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c new file mode 100644 index 0000000000000000000000000000000000000000..93715958952f933007ff143a22c= be81606cc539e --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c @@ -0,0 +1,230 @@ +/** @file + FDT client library for motorola,mc146818 RTC driver + + Copyright (c) 2020, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include + +/** RTC Index register is at offset 0x0 +*/ +#define RTC_INDEX_REG_OFFSET 0x0ULL + +/** RTC Target register is at offset 0x1 +*/ +#define RTC_TARGET_REG_OFFSET 0x1ULL + +/** Add the RTC controller address range to the memory map. + + @param [in] ImageHandle The handle to the image. + @param [in] RtcPageBase Base address of the RTC controller. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND Flash device not found. +**/ +STATIC +EFI_STATUS +KvmtoolRtcMapMemory ( + IN EFI_HANDLE ImageHandle, + IN EFI_PHYSICAL_ADDRESS RtcPageBase + ) +{ + EFI_STATUS Status; + + Status =3D gDS->AddMemorySpace ( + EfiGcdMemoryTypeMemoryMappedIo, + RtcPageBase, + EFI_PAGE_SIZE, + EFI_MEMORY_UC | EFI_MEMORY_RUNTIME + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, "Failed to add memory space. Status =3D %r\n", + Status + )); + return Status; + } + + Status =3D gDS->AllocateMemorySpace ( + EfiGcdAllocateAddress, + EfiGcdMemoryTypeMemoryMappedIo, + 0, + EFI_PAGE_SIZE, + &RtcPageBase, + ImageHandle, + NULL + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "Failed to allocate memory space. Status =3D %r\n", + Status + )); + gDS->RemoveMemorySpace ( + RtcPageBase, + EFI_PAGE_SIZE + ); + return Status; + } + + Status =3D gDS->SetMemorySpaceAttributes ( + RtcPageBase, + EFI_PAGE_SIZE, + EFI_MEMORY_UC | EFI_MEMORY_RUNTIME + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "Failed to set memory attributes. Status =3D %r\n", + Status + )); + gDS->FreeMemorySpace ( + RtcPageBase, + EFI_PAGE_SIZE + ); + gDS->RemoveMemorySpace ( + RtcPageBase, + EFI_PAGE_SIZE + ); + } + + return Status; +} + +/** Entrypoint for KvmtoolRtcFdtClientLib. + + Locate the RTC node in the DT and update the Index and + Target register base addresses in the respective PCDs. + Add the RTC memory region to the memory map. + Disable the RTC node as the RTC is owned by UEFI. + + @param [in] ImageHandle The handle to the image. + @param [in] SystemTable Pointer to the System Table. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND Flash device not found. +**/ +EFI_STATUS +EFIAPI +KvmtoolRtcFdtClientLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + FDT_CLIENT_PROTOCOL *FdtClient; + INT32 Node; + CONST UINT32 *Reg; + UINT32 RegSize; + UINT64 RegBase; + UINT64 Range; + RETURN_STATUS PcdStatus; + + Status =3D gBS->LocateProtocol ( + &gFdtClientProtocolGuid, + NULL, + (VOID **)&FdtClient + ); + ASSERT_EFI_ERROR (Status); + + Status =3D FdtClient->FindCompatibleNode ( + FdtClient, + "motorola,mc146818", + &Node + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: No 'motorola,mc146818' compatible DT node found\n", + __FUNCTION__ + )); + return Status; + } + + Status =3D FdtClient->GetNodeProperty ( + FdtClient, + Node, + "reg", + (CONST VOID **)&Reg, + &RegSize + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: No 'reg' property found in 'motorola,mc146818' compatible DT no= de\n", + __FUNCTION__ + )); + return Status; + } + + ASSERT (RegSize =3D=3D 16); + + RegBase =3D SwapBytes64 (ReadUnaligned64 ((VOID *)&Reg[0])); + Range =3D SwapBytes64 (ReadUnaligned64 ((VOID *)&Reg[2])); + DEBUG (( + DEBUG_INFO, + "Found motorola,mc146818 RTC @ 0x%Lx Range =3D 0x%x\n", + RegBase, + Range + )); + + // The address range must cover the RTC Index and the Target registers. + ASSERT (Range >=3D 0x2); + + // RTC Index register is at offset 0x0 + PcdStatus =3D PcdSet64S ( + PcdRtcIndexRegister64, + (RegBase + RTC_INDEX_REG_OFFSET) + ); + ASSERT_RETURN_ERROR (PcdStatus); + + // RTC Target register is at offset 0x1 + PcdStatus =3D PcdSet64S ( + PcdRtcTargetRegister64, + (RegBase + RTC_TARGET_REG_OFFSET) + ); + ASSERT_RETURN_ERROR (PcdStatus); + + Status =3D KvmtoolRtcMapMemory (ImageHandle, (RegBase & ~EFI_PAGE_MASK)); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "Failed to map memory for motorola,mc146818. Status =3D %r\n", + Status + )); + return Status; + } + + // + // UEFI takes ownership of the RTC hardware, and exposes its functionali= ty + // through the UEFI Runtime Services GetTime, SetTime, etc. This means we + // need to disable it in the device tree to prevent the OS from attaching + // its device driver as well. + // + Status =3D FdtClient->SetNodeProperty ( + FdtClient, + Node, + "status", + "disabled", + sizeof ("disabled") + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_WARN, + "Failed to set motorola,mc146818 status to 'disabled', Status =3D %r= \n", + Status + )); + } + + return EFI_SUCCESS; +} diff --git a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientL= ib.inf b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.i= nf new file mode 100644 index 0000000000000000000000000000000000000000..deb3bf635c1e89433832c480132= 8087c5b9daddc --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf @@ -0,0 +1,42 @@ +## @file +# FDT client library for motorola,mc146818 RTC driver +# +# Copyright (c) 2020, ARM Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D KvmtoolRtcFdtClientLib + FILE_GUID =3D 3254B4F7-30B5-48C6-B06A-D8FF97F3EF95 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D KvmtoolRtcFdtClientLib|DXE_DRIVER DXE= _RUNTIME_DRIVER + CONSTRUCTOR =3D KvmtoolRtcFdtClientLibConstructor + +[Sources] + KvmtoolRtcFdtClientLib.c + +[Packages] + ArmVirtPkg/ArmVirtPkg.dec + MdePkg/MdePkg.dec + PcAtChipsetPkg/PcAtChipsetPkg.dec + +[LibraryClasses] + BaseLib + DebugLib + PcdLib + UefiBootServicesTableLib + DxeServicesTableLib + +[Protocols] + gFdtClientProtocolGuid ## CONSUMES + +[Pcd] + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64 + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64 + +[Depex] + gFdtClientProtocolGuid --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65852): https://edk2.groups.io/g/devel/message/65852 Mute This Topic: https://groups.io/mt/77270938/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65860+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673277807978.4290728015421; Fri, 2 Oct 2020 14:14:37 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bPtIYY1788612xKjwAWfd3Ie; Fri, 02 Oct 2020 14:14:37 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.88]) by mx.groups.io with SMTP id smtpd.web12.5584.1601673274506853338 for ; Fri, 02 Oct 2020 14:14:35 -0700 X-Received: from DB6PR07CA0051.eurprd07.prod.outlook.com (2603:10a6:6:2a::13) by VI1PR08MB5536.eurprd08.prod.outlook.com (2603:10a6:803:13b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Fri, 2 Oct 2020 21:14:28 +0000 X-Received: from DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2a:cafe::6e) by DB6PR07CA0051.outlook.office365.com (2603:10a6:6:2a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.13 via Frontend Transport; Fri, 2 Oct 2020 21:14:28 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65860+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT003.mail.protection.outlook.com (10.152.20.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:28 +0000 X-Received: ("Tessian outbound bac899b43a54:v64"); Fri, 02 Oct 2020 21:14:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 352445f4b2a5b16e X-CR-MTA-TID: 64aa7808 X-Received: from 3f1940c2cfef.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EFC3BF5C-257A-4DD9-9E27-5D0C0AA74404.1; Fri, 02 Oct 2020 21:14:22 +0000 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3f1940c2cfef.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mKcUE8q4osCr1smiK9H9s+D75cmzQ5dLGpc0syKFULO0IexqiJnP4c/HTP013/8l2piCJM+Q8mrRl8+kbH2K+8KIBf3o7HyZ37v7NKdhE/NVPZCgnNxxmSJnOfwLG799yJeALYZAciMlEKTqIH7MzqiRnTCrGP+wHHEJnf4IVRsRdxNEAeVTNIj1D4PKFGBvtjmAKSko43OGgI+W0eFvlJkW+jpRRlpq/VYqpFQhvq6McCp6kKniRz6DD0gx6OxglwWp3Dejxr7z36CdgddmWX13Ycqoc5eXM/F3bkFmEz2Bdqy8XiAz+2QEpMaCQCqzSge6YuwQB212C/WRGjuQ6Q== 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=ImMBcne63JI3kfxfu1sXF/E7TG3e32l/cY6surYBT6w=; b=cyUp1jBFABJgq+zocmTcbzpRBz6jfUdxRQkKzH/e1LAVPgqnpZTC+9X64/Y8iQTT9sBjqQKvFTaeYPPL6KSTRWUdNjg51UgjZ0d4UBrS2zpzq3Tmca3DdcnSEDIW4b8oTOCI/ivL3O/4TYaHHSUuzrDx0JJ6LUODGZO2Rv2NwSlmg6mALOAY60ZK9UFY/sI8t2nItEu1k8ltd/M1OQa46d9TqPz2A/NhAyGA0Vonx35cmGPIiam6C4LYd2Ck3WLAUvq5QCAAc6C4NmDF2wvRcPXTfBhnHVbf1PQfi9SeepmfDf1Zyt/Xg12TR8zwpmCoaE1eKzswMn5oZmXy1YEObg== 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 X-Received: from MR2P264CA0074.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::14) by VI1PR08MB4224.eurprd08.prod.outlook.com (2603:10a6:803:bc::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:20 +0000 X-Received: from VE1EUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:32:cafe::8f) by MR2P264CA0074.outlook.office365.com (2603:10a6:500:32::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:20 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT046.mail.protection.outlook.com (10.152.19.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:19 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Fri, 2 Oct 2020 21:14:13 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:13 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v5 03/15] ArmPlatformPkg: Dynamic flash variable base Date: Fri, 2 Oct 2020 22:13:57 +0100 Message-ID: <20201002211409.43888-4-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8817d470-4d7c-4390-29b1-08d8671825d3 X-MS-TrafficTypeDiagnostic: VI1PR08MB4224:|VI1PR08MB5536: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: XgI2tHsXRKtav9UGt9y+RjLi1lfIRp4VYP2avJ2qrVHc1/ksoBXpSrts9Q/nmrIEhSMWAaB5wl9883Mju0ZP/sL0NFmS1XVi4KaWjc6uqCwjhpQyOuf0SWO8JQEGY7oOZk16NxLElinJ4VAqBGYJGK5oESezP7KokhS53R7s047uUHATjBTTy+/xNZQ90eejpMjkNk5eArsObu7aBV231IkbB/Mz2/aEUgS7QeTqQOc9yPYu3+PM1xDH6FY8TvKRYd1KBZJT3oiY6/2hfJN6HJgL8JRgJujE6IrOpWwhMdD/nIuFwJqY+WpgFc8oYi5+FEuzPDZZD+P8vMvrIKpF4roFtrytOnlOBHtADtTaI90J32/vut5ODsTQ7Gx7BEuxs9CpiIt61Lknl7gz0AbvMuyQgVnko8lm5gho46nDmlQzaovM+IT1ceY1R3mQB2xlTF9k6Gx4QWo44FqBKmX/ThFzUS3E17mAa53SYgE0RzA= 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)(39850400004)(346002)(396003)(376002)(136003)(46966005)(82740400003)(47076004)(83080400001)(70586007)(356005)(81166007)(6916009)(54906003)(70206006)(36756003)(26005)(316002)(6666004)(2906002)(8676002)(426003)(1076003)(336012)(2616005)(86362001)(82310400003)(5660300002)(478600001)(186003)(966005)(8936002)(7696005)(4326008)(44832011)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4224 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f674ec0e-9928-46b9-583b-08d8671820c5 X-Microsoft-Antispam-Message-Info: v+V3SN3DBrMcWnoxqAdaAIgaUPvcbUGLGhEiNqoYLXn7Xa86oUUXzIbjiPxfQEu6vdUVnPr/fWYwHyHKRoDlLyr7rE2JDja2O3hEov11+8ZmKNVHOe/K7vIKbomnKj3C4B9mG98oi6/Qp9zF7hNTVCKKM9wo0qvu87c7ip0Xnw/ap4Lb0bidVQafte2jzqqLdF8tvlSRDKbn8hH8ZB2ReW4MEMmw2cBDb9PXbDLWF9V/W9asR9C3ATY0rhSfnxEVS/uMTwuqApcCelf9yA4xRD4tzTGzJeAtQvEXiZcHN6owNma0eDKSONLhCVHgtVIeM5stMVWwiT6EkW4y/Nlk/tSW44lTvP2ayV7nGwL48tYbhMPzuRR6d72DOfPk24KR/fRh3rwNq6OiZT1moEClF5uYMawHIVwWTeswneO4eskZdcsrGyTPbwhaNi1UeLh92y5ySPJRUVrqdeeWsXkiBK9FzEA3Uh1PyFYlX1OMwDE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:28.4327 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8817d470-4d7c-4390-29b1-08d8671825d3 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: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5536 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: nB5CRPz51JyM7pnkst04L1bZx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673277; bh=4nO4w805PA+tSCBxcJKyZ2fB6Gu3y6fUpRaKEf+GpTE=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=kYUDCPR0oXJq2qJCadvzU1TI/H55Yux6lR+ctO+OdpDClqnnxCbH7yw7JpsHm//uecC jhHuLa4ZBjkZZHLM+k7sXsnG8IPi8XbJCKfTycxYwWpvLQ5y1j45ogWrJKXd4V4n63gkW PwVdCU+fxuakWkI5Mbp9bpMmorVNc/IBgcE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some virtual machine managers like kvmtool can relocate the devices in the system memory map. The information about the devices location in memory is described in the device tree. Therefore, the CFI memory region and the associated Non volatile storage variables need to be adjusted accordingly. To support such use cases the non-volatile storage variable base PCD PcdFlashNvStorageVariableBase has been defined as a dynamic PCD. The NOR flash driver was using the Flash non-volatile storage variable base PCD as a fixed PCD, thereby preventing runtime resolution of the variable base address. Therefore update the NOR flash driver to load the PCD using PcdGet32 instead of FixedPcdGet32. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daude --- Notes: v5: - No code changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62140 =20 v4: - No code changes, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61666 =20 v3: - Resend patch with updated series. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200906#60337 =20 v2: - Add support to make PCD PcdFlashNvStorageVariableBase [Sami] a dynamic PCD and update NOR flash driver to PcdGet32 instead of FixedPcdGet32 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c b/ArmPlatf= ormPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c index e248fdf6db94191648b5d33bf1a9263f446ee141..9cdd85096a463f69b3b864cecde= af247e65f4f73 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c @@ -1,6 +1,6 @@ /*++ @file NorFlashFvbDxe.c =20 - Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2020, ARM Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -736,7 +736,7 @@ NorFlashFvbInitialize ( EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); ASSERT_EFI_ERROR (Status); =20 - mFlashNvStorageVariableBase =3D FixedPcdGet32 (PcdFlashNvStorageVariable= Base); + mFlashNvStorageVariableBase =3D PcdGet32 (PcdFlashNvStorageVariableBase); =20 // Set the index of the first LBA for the FVB Instance->StartLba =3D (PcdGet32 (PcdFlashNvStorageVariableBase) - Insta= nce->RegionBaseAddress) / Instance->Media.BlockSize; --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65860): https://edk2.groups.io/g/devel/message/65860 Mute This Topic: https://groups.io/mt/77270948/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65853+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 160167326974254.503554237095955; Fri, 2 Oct 2020 14:14:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bCEaYY1788612xOxMUXs8GSr; Fri, 02 Oct 2020 14:14:27 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.80]) by mx.groups.io with SMTP id smtpd.web12.5577.1601673266627963602 for ; Fri, 02 Oct 2020 14:14:27 -0700 X-Received: from DB6P193CA0001.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::11) by DB8PR08MB3931.eurprd08.prod.outlook.com (2603:10a6:10:ab::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::f2) by DB6P193CA0001.outlook.office365.com (2603:10a6:6:29::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65853+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT044.mail.protection.outlook.com (10.152.21.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: ("Tessian outbound 34b830c8a0ef:v64"); Fri, 02 Oct 2020 21:14:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7223e876afb7ab6b X-CR-MTA-TID: 64aa7808 X-Received: from 6f80e1e24439.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A3CF31A0-7F28-4031-B56D-E2F57E023ED3.1; Fri, 02 Oct 2020 21:14:18 +0000 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6f80e1e24439.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WVccU4nFmJromY4vb8qjEszCFswgBsqO8n9ECQE+U9bbCewgQYp1LLZIewsREIhncXqSY7jE/2jvH9P7Xk/POpRB5nklrQqY5x5aZzstXfM+da8TYQ3Mw4JZzKOPum5LQ8U0XvCa+202QKG+8CmdHHP55GCgqQvuAhyUyufQ7l1GCRN95CafyROSoraq9XNUJOuBuI1LTiQTJnqk1tdkuTrCPWj3nBYEwjZE3Q3+mwmcUnGaLdd2yzsmc+DiW/iybY7Q0MarnCEMlnwV7Dl/KIGyMDz2J0AO6GILpcYDUkSQ6eS1cTPoA9g2DZz7SexGuXWGS5zj93omuRZdWq62AA== 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=10PnDy+pFiQWbub5SuJ17M8AOU7lYBs1dAoH5UIkr3o=; b=SW5sl29s86h49j41TltlrTbg7xCub2BF6bucUjfQ35I3TkpwM43Pt6RQn6ZVYSqGPRfNUrH/JphDeTYRapUKAYCy+/eWL50KJ20EbuzGCn0Hgcwlzd62hkkiJarJo7QLjaEc3I5H6NELjbXjg5xpZGvV9h4WeKvb5z4ERZHtiFtD0z/cYcZt7c8W1w7KlYfkrMwz1fRiLv0gt8x20Pwbe1dyfj1fBvveS2dCl+Gg71k+7qy7AzdlyTKQCBdvnLgV2po3415wj0aVaudWTJWpjTb7LEhYYHKE/m67A7HIiDs7+dPIBImHp/EGYVlPsAOpkcmR6dgYHuO6eSrxZOZNYw== 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 X-Received: from AM6P194CA0057.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::34) by AM6PR08MB4421.eurprd08.prod.outlook.com (2603:10a6:20b:71::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36; Fri, 2 Oct 2020 21:14:16 +0000 X-Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::38) by AM6P194CA0057.outlook.office365.com (2603:10a6:209:84::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:16 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:16 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Fri, 2 Oct 2020 21:14:15 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 2 Oct 2020 21:14:14 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:13 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 04/15] ArmVirtPkg: Add kvmtool platform driver Date: Fri, 2 Oct 2020 22:13:58 +0100 Message-ID: <20201002211409.43888-5-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a092741-306b-41b5-4061-08d867182308 X-MS-TrafficTypeDiagnostic: AM6PR08MB4421:|DB8PR08MB3931: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: U+sGdW5SBwhwq3z8VyBi8xjsshuJGAG/gkAcYVGknOF35NNaCD91yqHwfF+kvR89MjpjX0RAmtn9mysKeV3eeP/SrG4kA7LDmunwOFvHQW+mP+uNjA9BtiBCHuTu1J2GYpmp54Rpqpd8/zT8yswtyFQIC2p+pOoQ1KZ3kwyRqI6gqE0fKkSBSJi7ewR2exzbUziaqNvOO/iYbq2qHywHZX9VjCoD8YxAG6TY//LRm64eWi+2lnhBa+nvaOX5dccs+29ENMFvWwF6eWhCAABXea5iLBC/aCir4qVPJQHJV+U8xKJpZD2gzYZSM1qL304sQuSUBxNQDY9WY14e+g2+mNBLha2vIJFEa5Gv2Wp7RvOH77iqdctVKCFkLaJEKsd/1JcPO3jyYd7nBg5vhWyu+2bwj5FaehscBgbh3dkFvSCV+9FV56UNWYb0dyOREQ3KnLep556qTZrUKfxtNC4aC0Ykamm6g0/t89Nc42tdsvI= 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)(396003)(376002)(136003)(346002)(39860400002)(46966005)(186003)(1076003)(6916009)(2906002)(82740400003)(86362001)(966005)(316002)(36756003)(426003)(2616005)(478600001)(54906003)(44832011)(6666004)(336012)(356005)(81166007)(82310400003)(47076004)(83080400001)(70206006)(83380400001)(7696005)(8676002)(8936002)(26005)(4326008)(70586007)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4421 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 130c1c55-367a-439c-63a1-08d867181ea6 X-Microsoft-Antispam-Message-Info: ceFnBFjySMf/Ir0gxvfqpZ9cJvSMhBjIJL/OFqvvox9V9a1UpAC8CN43wCHlRoQKBVHgH0NMP06kuLFeImwNXAgmRCmD/U1oa9nxANGfZIX3wS2dUW8+vEARBR0uZBPsFiiOEElwDXjY7d1wcHusMtE7sWisJ+rvTVaRVEKvKVPPfN4Tvv4YonyTo2IYGE3dXEDATqvlnBPEsxGh4BDyj0HCs4ja++RXM+CkM3InXBX8qn+EiPx2VwCe8W+/dxwXY3NqQ7X0HSzbjPvYMbP7kTYs2Iw6+17YWjWs08A0iA3R8TWUnmMQO4LKY4Xk70qdj+CewW0FEwtJVKhARnYZBm63cBCh7Z+5Kg7++wX5T6PlMtmyElQbClI44Bv7Rnf4byYTjNJr8d1hDE6ZqfpD9ubP9nGthkCTiKgBZhvhVWXZupX1n7gViuDyyK64cOSV8ExAIgL4jjSSrJIahzfTKd862xohh5Xf0vFa6k02DwQ= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:23.7474 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a092741-306b-41b5-4061-08d867182308 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: DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB3931 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: stjNE2HnjOoOZeU4gJ3XmTqqx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673267; bh=Zuprr9krRMu30M+X8MAEVF/LtTel3LAvGfwEEM009zs=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vphnhoN/GB7kgrwc0fIYZaZXpoDFwo/4sb8Yn7/YLK/gl5pdiRM3doOvBMx1vd54hhf Sm6hMWc+ZA1Lo8KXIBTm4mTNKXd0XAW9riE4URufchhisPzkcaDeWs501Fyo66pEVq7bS yur1an7fjR8iLpNf24QubF0ZCqfyQsLo7k8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool is a virtual machine manager that enables hosting KVM guests. It essentially provides a virtual hardware platform for guest operating systems. Kvmtool hands of a device tree containing the current hardware configuration to the firmware. A standards-based operating system would use ACPI to consume the platform hardware information, while some operating systems may prefer to use Device Tree. The KvmtoolPlatformDxe performs the platform actions like determining if the firmware should expose ACPI or the Device Tree based hardware description to the operating system. Signed-off-by: Sami Mujawar Acked-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: v5: - Fixed minor ECC reported issues in file header. [Sami] Ref: https://edk2.groups.io/g/devel/message/62159 =20 v4: - Cleaned up include file and LibraryClasses list. [Sami] - Missing MemoryAllocationLib here - either add it [Ard] here, or remove it from LibraryClasses. Ref: https://edk2.groups.io/g/devel/message/61714 =20 v3: - Don't use CpuDeadLoop()s in your drivers. [Ard] - Returned error code instead of dead loop. [Sami] - Installing a protocol on an image handle should not [Ard] ever fail. So just use ASSERT_EFI_ERROR(). - Added assert and returned status code. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200911#59650 =20 v2: - Updated according to review comments. [Sami] =20 v1: - Add kvmtool platform driver to support loading platform [Sami] specific information. - Keep code to initialise the variable storage PCDs in the [Laszlo] platform-specific FVB driver. - Document code derived from [Laszlo] "ArmVirtPkg/PlatformHasAcpiDtDxe" Ref: https://edk2.groups.io/g/devel/topic/30915278#30757 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c | 82 ++++++++++++++++= ++++ ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf | 43 ++++++++++ 2 files changed, 125 insertions(+) diff --git a/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c b/ArmVirtPk= g/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c new file mode 100644 index 0000000000000000000000000000000000000000..a42b64d1061dcdf8163775f66b6= d2f550e481315 --- /dev/null +++ b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c @@ -0,0 +1,82 @@ +/** @file + + The KvmtoolPlatformDxe performs the platform specific initialization lik= e: + - It decides if the firmware should expose ACPI or Device Tree-based + hardware description to the operating system. + + Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include + +/** Decide if the firmware should expose ACPI tables or Device Tree and + install the appropriate protocol interface. + + Note: This function is derived from "ArmVirtPkg/PlatformHasAcpiDtDxe", + by dropping the word size check, and the fw_cfg check. + + @param [in] ImageHandle Handle for this image. + + @retval EFI_SUCCESS Success. + @retval EFI_OUT_OF_RESOURCES There was not enough memory to install t= he + protocols. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + +**/ +STATIC +EFI_STATUS +PlatformHasAcpiDt ( + IN EFI_HANDLE ImageHandle + ) +{ + if (!PcdGetBool (PcdForceNoAcpi)) { + // Expose ACPI tables + return gBS->InstallProtocolInterface ( + &ImageHandle, + &gEdkiiPlatformHasAcpiGuid, + EFI_NATIVE_INTERFACE, + NULL + ); + } + + // Expose the Device Tree. + return gBS->InstallProtocolInterface ( + &ImageHandle, + &gEdkiiPlatformHasDeviceTreeGuid, + EFI_NATIVE_INTERFACE, + NULL + ); +} + +/** Entry point for Kvmtool Platform Dxe + + @param [in] ImageHandle Handle for this image. + @param [in] SystemTable Pointer to the EFI system table. + + @retval EFI_SUCCESS Success. + @retval EFI_OUT_OF_RESOURCES There was not enough memory to install t= he + protocols. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + +**/ +EFI_STATUS +EFIAPI +KvmtoolPlatformDxeEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status =3D PlatformHasAcpiDt (ImageHandle); + ASSERT_EFI_ERROR (Status); + + return Status; +} diff --git a/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf b/ArmVirt= Pkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf new file mode 100644 index 0000000000000000000000000000000000000000..1cf25780f8300edab607d0c1dfb= f7255404226df --- /dev/null +++ b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf @@ -0,0 +1,43 @@ +## @file +# The KvmtoolPlatformDxe performs the platform specific initialization li= ke: +# - It decides if the firmware should expose ACPI or Device Tree-based +# hardware description to the operating system. +# +# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D KvmtoolPlatformDxe + FILE_GUID =3D 7479CCCD-D721-442A-8C73-A72DBB886669 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D KvmtoolPlatformDxeEntryPoint + +[Sources] + KvmtoolPlatformDxe.c + +[Packages] + ArmVirtPkg/ArmVirtPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + UefiBootServicesTableLib + UefiDriverEntryPoint + +[Guids] + gEdkiiPlatformHasAcpiGuid ## SOMETIMES_PRODUCES ## PROTOCOL + gEdkiiPlatformHasDeviceTreeGuid ## SOMETIMES_PRODUCES ## PROTOCOL + +[Pcd] + gArmVirtTokenSpaceGuid.PcdForceNoAcpi + +[Depex] + TRUE --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65853): https://edk2.groups.io/g/devel/message/65853 Mute This Topic: https://groups.io/mt/77270939/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65858+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673276031692.5209840645924; Fri, 2 Oct 2020 14:14:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5G37YY1788612xkf8SMmjcah; Fri, 02 Oct 2020 14:14:35 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.80]) by mx.groups.io with SMTP id smtpd.web12.5583.1601673274255340087 for ; Fri, 02 Oct 2020 14:14:34 -0700 X-Received: from AM7PR04CA0027.eurprd04.prod.outlook.com (2603:10a6:20b:110::37) by VI1PR08MB2848.eurprd08.prod.outlook.com (2603:10a6:802:23::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Fri, 2 Oct 2020 21:14:26 +0000 X-Received: from VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::8f) by AM7PR04CA0027.outlook.office365.com (2603:10a6:20b:110::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:26 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65858+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT031.mail.protection.outlook.com (10.152.18.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:25 +0000 X-Received: ("Tessian outbound bac899b43a54:v64"); Fri, 02 Oct 2020 21:14:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 28d30adc3747670e X-CR-MTA-TID: 64aa7808 X-Received: from e93ae44121dc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4D3916D4-CFAB-47B0-8D4D-A2B453E6CDB0.1; Fri, 02 Oct 2020 21:14:18 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e93ae44121dc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UR1sc9yIbjUs/9do943UK5zoCFB+5lfH85N1Kxj7jpU23PkBMj6Aixyy3tj9CBUaDcLvSXPMcFfISmE6Ly3PA5u5/tNZ7R8XXErSZN5mQukoQXcRb8k3EsRvIY859VhzM5SI3K4WJwjm0kMyoU5drzhZf9ePKCZlcdi/dbLdQdWrequA3l2nZQ9ykYvC5M1r1OGnYNbyQwrGUrvpHQqOnav3dgCJfCftUEA+WL+lWwOlLk6tI8lzkslgOezwks4PxFcQoNZtPtgCgRinGSf2ue8CednpbpKcJj3IrLav2bfmYrvc/T7eYVlqHF58EO2n+wXQ62TSBZ2DD6G7E98/xw== 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=EfcV1P3dWHIJUTVppSkzpGIIxiobeB1jvJvI6xxfnSo=; b=ka839vEHTyjNxEZkVb0z0cdGsuFvKkVvixDAfl+C+5o783VH15wy6sd9ItX1Q86vyzQIFEsBffZ4YoCqDIwI50hhMOICXzu05IYpnU6ojH9Z/sUEI5zZuOZzlLUa9cKWRTS1CaX8cI4TX9de/iaHOrSH9BLLM+DB9CiAR9o7tPOyCcB65iCXmq/RAlrMHBTI5KTyOAyu30FyPNi0s/6ogdbIZvoPrvPVHLleHvTeOTFfBlqT04SNh58C37bEHCyxb12E4bkXyOIkLeU+9Z3F3BjL2rFUt43rcOT4RF1iIvOgqcm7oDB5ghTbW552Z8MrBvpNnkTaheAHxkL7Ik6/TQ== 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 X-Received: from AM6P194CA0038.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::15) by AM6PR08MB4738.eurprd08.prod.outlook.com (2603:10a6:20b:cf::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:17 +0000 X-Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::14) by AM6P194CA0038.outlook.office365.com (2603:10a6:209:84::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:17 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:17 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:15 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:14 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 05/15] ArmVirtPkg: kvmtool platform memory map Date: Fri, 2 Oct 2020 22:13:59 +0100 Message-ID: <20201002211409.43888-6-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22323522-fecd-424a-b98c-08d867182436 X-MS-TrafficTypeDiagnostic: AM6PR08MB4738:|VI1PR08MB2848: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1hJDoc9NlkRHRunJ/JDZP7z82vO9Sx40QkR6L6m8SVqOeL6Mj8+d6PpqIglOMtULcmqtQ1C2rET06nBx0pJR9k7q90fndMb9nKbfwwb6nHnlEVJUY819nYI3KrXjeuswz/YyD/HXETJ9lTfQt0bt9leQE4DFQnr6VG7GW8eXUiWF8OdivwwxLCzJbYfBqLaMs+hc4THWNe64DVgOlAgSFmR4GY7X25Q/TKic2BHbZ/OQPPJ54bJB7svTnqpRjcBeLlLQBa2XM3SwXCjvzT+rhZ5N9tNBx/WWKLvznI/j6BnZCtjOXG+ngJQDEOlzU3p69X11VD4F5qouCXUmUkxpZ6xOm9964bifUv9gHT2674wqkzq6cDfepjoKCQuMEHV9CtrNy51NtIhXt877xNrVF8/wkAVGLvExRndWQVEMKZqQRPnYjJCwhQPKAK3k4/nWcptzZKVziTgd96FTlTfK1UVUkh5749YQNgSOVm7oTQs= 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)(39850400004)(396003)(136003)(346002)(376002)(46966005)(47076004)(7696005)(44832011)(8676002)(5660300002)(356005)(82740400003)(966005)(8936002)(36756003)(81166007)(83080400001)(478600001)(186003)(336012)(4326008)(6916009)(426003)(6666004)(70206006)(26005)(86362001)(2906002)(83380400001)(82310400003)(1076003)(54906003)(2616005)(316002)(70586007);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4738 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ce1ceada-4d01-4001-d1d3-08d867181f2d X-Microsoft-Antispam-Message-Info: fL0sV9CFMN7xSkwbmE03R10Eagd0YrGFDj9Qo6TK1Z4nDHX2kH3dYDzdV/UBkJ2D+NW4bnxqaO7AgmRInIDfC0zyzuXuJmM1nJljKyCQ8WMX89kdNK8PJgubAIHnggnILgI3gL8Z0La/vslhNqUp4NdjdaSfrx/2fY56qSMdfgKnIi2Nbwn8x7OPBcU+VnRL9QMHzxBkGpdwAeCrhDebWhL01hGXoc+Os1x5dpkVPT5VQD8Egv+0pQG7cJjCcA/bplMq/DfsLMRtYnzima4UYyMNzgwY0d345Y5N47A9rSCQ/5M51glf0VhEgKB2Fmzw+TZwDDuoNeEIBIWDd5SO/danvKKXmkBilnmEzIrT/t60Vzq2STd2TfeJWM9LbNqfo14AbGCtnFug/VE+NT3YTCztWOlGbJYrC11JwPTul22PHtU4Xj7HsJs45I3RqQfoDjL/tXwYhyf5Efd/pFHOWMdDBPRyK1NqYX0ob/YunvjqPWw0VLXcgJcD19eX8xXOkqOop9La3e/0EcG3mqQnSQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:25.6169 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22323522-fecd-424a-b98c-08d867182436 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: VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2848 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: 51QVlozlGJZMh0OovUbr6nHZx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673275; bh=W5Uf9FZHT8ByCO57y6+YWfrfQQzRaxgTND20jWS+XV8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=jGJwLgUzynYC/O8VpL4+0nu0gKAk3az/nIti3MDpgfj8cimbpt6AJwZr1cnzq9LijOw 9JSBB6r2rakIQ6xQDIT0HUmh+AcG942jpw/yvLr8XS2yAgRzwGmdKXNq17DRECtAnbyA6 SkOaFKRhNg9kP1nHDA0NoT5xIhMjemP5F60= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool is a virtual machine manager that enables hosting KVM guests. Kvmtool allows to vary the hardware configuration of the virtual platform it provides to the guest partition. It provides the current hardware configuration to the firmware by handing off a device tree containing the hardware information. This library parses the kvmtool provided device tree and populates the system memory map for the kvmtool virtual platform. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- Notes: v5: - Fixed minor ECC reported issues in file header and [Sami] also a minor fix for ECC error "5007: There should be no initialization of a variable as part of its declaration". Ref: https://edk2.groups.io/g/devel/message/62145 =20 v4: - Remove logging code as this requires support for Early [Sami] serial port initialisation which is dropped in this series as it would not work with Xen. Ref: https://edk2.groups.io/g/devel/message/61669 https://edk2.groups.io/g/devel/topic/75081479 =20 v3: - Fix coding style, use "Txt" in LOG_VM_MAP(txt). [Laszlo] - Fixed coding style and also formatted log output. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200913#59548 v2: - Library to populate Kvmtool system memory map. [Sami] ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c | 98 ++= ++++++++++++++++++ ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf | 43 ++= +++++++ 2 files changed, 141 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib= .c b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c new file mode 100644 index 0000000000000000000000000000000000000000..63bb81ef91ce0d16b604f5606a6= a340647b706ad --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c @@ -0,0 +1,98 @@ +/** @file + Kvmtool virtual memory map library. + + Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include + +// Number of Virtual Memory Map Descriptors +#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 5 + +/** + Return the Virtual Memory Map of your platform + + This Virtual Memory Map is used by MemoryInitPei Module to initialize th= e MMU + on your platform. + + @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR + describing a Physical-to-Virtual Memory + mapping. This array must be ended by a + zero-filled entry. The allocated memory + will not be freed. + +**/ +VOID +ArmVirtGetMemoryMap ( + OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap + ) +{ + ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; + UINTN Idx; + EFI_PHYSICAL_ADDRESS TopOfAddressSpace; + + ASSERT (VirtualMemoryMap !=3D NULL); + + TopOfAddressSpace =3D LShiftU64 (1ULL, ArmGetPhysicalAddressBits ()); + + VirtualMemoryTable =3D (ARM_MEMORY_REGION_DESCRIPTOR*) + AllocatePages ( + EFI_SIZE_TO_PAGES ( + sizeof (ARM_MEMORY_REGION_DESCRIPTOR) * + MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS + ) + ); + if (VirtualMemoryTable =3D=3D NULL) { + DEBUG (( + DEBUG_ERROR, + "%a: Error: Failed to Allocate Pages\n", + __FUNCTION__ + )); + return; + } + + Idx =3D 0; + // System DRAM + VirtualMemoryTable[Idx].PhysicalBase =3D PcdGet64 (PcdSystemMemoryBase); + VirtualMemoryTable[Idx].VirtualBase =3D VirtualMemoryTable[Idx].Physica= lBase; + VirtualMemoryTable[Idx].Length =3D PcdGet64 (PcdSystemMemorySize); + VirtualMemoryTable[Idx].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_WRI= TE_BACK; + + // Peripheral space before DRAM + VirtualMemoryTable[++Idx].PhysicalBase =3D 0x0; + VirtualMemoryTable[Idx].VirtualBase =3D 0x0; + VirtualMemoryTable[Idx].Length =3D PcdGet64 (PcdSystemMemoryBase= ); + VirtualMemoryTable[Idx].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; + + // Peripheral space after DRAM + VirtualMemoryTable[++Idx].PhysicalBase =3D PcdGet64 (PcdSystemMemoryBase= ) + + PcdGet64 (PcdSystemMemorySize); + VirtualMemoryTable[Idx].VirtualBase =3D VirtualMemoryTable[Idx].Physi= calBase; + VirtualMemoryTable[Idx].Length =3D TopOfAddressSpace - + VirtualMemoryTable[Idx].Physica= lBase; + VirtualMemoryTable[Idx].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; + + // Map the FV region as normal executable memory + VirtualMemoryTable[++Idx].PhysicalBase =3D PcdGet64 (PcdFvBaseAddress); + VirtualMemoryTable[Idx].VirtualBase =3D VirtualMemoryTable[Idx].Physica= lBase; + VirtualMemoryTable[Idx].Length =3D FixedPcdGet32 (PcdFvSize); + VirtualMemoryTable[Idx].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_WRI= TE_BACK; + + // End of Table + VirtualMemoryTable[++Idx].PhysicalBase =3D 0; + VirtualMemoryTable[Idx].VirtualBase =3D 0; + VirtualMemoryTable[Idx].Length =3D 0; + VirtualMemoryTable[Idx].Attributes =3D (ARM_MEMORY_REGION_ATTRIBUTE= S)0; + + ASSERT((Idx + 1) <=3D MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS); + + *VirtualMemoryMap =3D VirtualMemoryTable; +} diff --git a/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib= .inf b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..4b0cf06e1e6950d57c397502a77= abd8aa738254d --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf @@ -0,0 +1,43 @@ +## @file +# Kvmtool virtual memory map library. +# +# Copyright (c) 2018, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D KvmtoolVirtMemInfoLib + FILE_GUID =3D B752E953-394F-462C-811C-F8BE35C8C071 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ArmVirtMemInfoLib + +[Sources] + KvmtoolVirtMemInfoLib.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmVirtPkg/ArmVirtPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + ArmLib + BaseLib + BaseMemoryLib + DebugLib + MemoryAllocationLib + PcdLib + +[Pcd] + gArmTokenSpaceGuid.PcdFvBaseAddress + gArmTokenSpaceGuid.PcdSystemMemoryBase + gArmTokenSpaceGuid.PcdSystemMemorySize + +[FixedPcd] + gArmTokenSpaceGuid.PcdFvSize + --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65858): https://edk2.groups.io/g/devel/message/65858 Mute This Topic: https://groups.io/mt/77270946/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65865+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673281086401.3207553728954; Fri, 2 Oct 2020 14:14:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IkFrYY1788612xoLFFeuiMNA; Fri, 02 Oct 2020 14:14:40 -0700 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.50]) by mx.groups.io with SMTP id smtpd.web11.5747.1601673278880268090 for ; Fri, 02 Oct 2020 14:14:39 -0700 X-Received: from DB6PR0301CA0087.eurprd03.prod.outlook.com (2603:10a6:6:30::34) by VI1PR08MB4285.eurprd08.prod.outlook.com (2603:10a6:803:f8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Fri, 2 Oct 2020 21:14:33 +0000 X-Received: from DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:30:cafe::1e) by DB6PR0301CA0087.outlook.office365.com (2603:10a6:6:30::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:33 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65865+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT057.mail.protection.outlook.com (10.152.20.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:32 +0000 X-Received: ("Tessian outbound e8cdb8c6f386:v64"); Fri, 02 Oct 2020 21:14:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ddec25d1a734a1bd X-CR-MTA-TID: 64aa7808 X-Received: from 9959e02feae2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 46A191D8-1CC0-44B4-B1F3-437726B8BBE7.1; Fri, 02 Oct 2020 21:14:26 +0000 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9959e02feae2.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FcIR6si+hnSiY+sqrcl5g68Gu6vBE9Dva9HsCN38vtjgTYgsP6nM/xvQkJD5G/kEusdZ++z5Xl8zZioajWYpEJQaACvquK0hgeoHdCJkbGTr0AJAm0zwUl9GkComBHhtfzDfIh1Hg85Thsv/vGsr/IFwrCBdJI2Tznv2/qp4MbZCdHHF9ZAp4CKWSQxW1JR2gT+OADugXGyVBlUmHTzF6r7hdKBOR6sHEdzgluqVrltBFyiUG2YEGZahZaHe8Qv1Lqph8RIcaeuI+xTGletw4ae52VLNc/Qna74SQ7nS2Nsfx3rKHuYno+s2xtLaNN9zUY/rTVNGHKOnDmacCPfpXA== 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=oH1uPeKwL8/ssWRCBOglGvX3hm7pWs//XxiIffAHHGY=; b=Qaba2rQONNaygYW3h1FdDoZbVIbNJx+8CsUfdcKtzkxIQMkUvNwOLvwtWalAo9tXjisGgQpesTCLqoIetyR6QDDQ0Sxv9zTPTXMLHYIGijP5K0lUu4Df5SFb29FfVPmIsz6Mx/JTy551ivEXDlwZOu3vGAM5RDrWQ+re/n+qf6qdzMR5cvdPzVxA803TipKeYN/bhv+wLAsy8asCTwkBUd6Ag7VGdhsAJBUsuRvjasuupLQKdukLk0UnRkKnb/Jjew2TBeFGbOUxrUhAorW4qtMSUcyd/iQGSQm2Oq0Epb/f4EV5zmL4fKWUcJsbemAaFS+5GfTuOlLQfBgLkasH8g== 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 X-Received: from MR2P264CA0093.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::33) by VE1PR08MB5119.eurprd08.prod.outlook.com (2603:10a6:803:114::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Fri, 2 Oct 2020 21:14:24 +0000 X-Received: from VE1EUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:32:cafe::7d) by MR2P264CA0093.outlook.office365.com (2603:10a6:500:32::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT046.mail.protection.outlook.com (10.152.19.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +0000 X-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.2044.4; Fri, 2 Oct 2020 21:14:17 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 2 Oct 2020 21:14:16 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:15 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [edk2-devel] [PATCH v5 06/15] ArmVirtPkg: Add Kvmtool NOR flash lib Date: Fri, 2 Oct 2020 22:14:00 +0100 Message-ID: <20201002211409.43888-7-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af3a1fce-e8b0-44cd-9aee-08d867182879 X-MS-TrafficTypeDiagnostic: VE1PR08MB5119:|VI1PR08MB4285: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: IL6LqIO3rE54DW+w7aMd96x0waAh345xgN/ywG0INXuxdR7zijnfSM8HNwGy+Q99Jz9+R2s26Hcrx7HQOvhPujgtxR+vXKDuQLeb39RgbQV7aKdxPSzJtKBzj0s6baH694k8q1GO95yBe7BWY/Z7q04gpbgtWSu05HXzY2QmUsmNTnb+EQwquUH4vPWO/+lFkMPe0c/N2WdYJxDKmdOo6murq2f0rOlbP71llS4OWZo1yEo8QqpvTGsAVmwMJCuf9hjb190+R9S0N7oNKnDSfCA4uycGpzQG2TAzR3kHqwfE6uaj4FlYSA2rtpMgQHy0akDcIliF4QwIfO2SOS3tw/9vPl149nIQAo36YETqrmfkc9VAbgLoKvuORJekNaAXKt9/X9K+OIansjgW3+qKHP3MtEDkFY6vT9FjULE4/dD91D6rLu8yiJz4djqeJXHG6ObzD/8bNstuTB9K6IfgvHjiXAz+VbM0egjKJA0v3Jw= 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)(396003)(39850400004)(136003)(346002)(376002)(46966005)(356005)(26005)(54906003)(36756003)(186003)(83380400001)(2616005)(44832011)(7696005)(966005)(5660300002)(426003)(478600001)(30864003)(82310400003)(81166007)(70206006)(336012)(2906002)(8936002)(6916009)(70586007)(1076003)(47076004)(316002)(8676002)(82740400003)(6666004)(86362001)(4326008)(83080400001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5119 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 60dacbb1-2476-4977-e91e-08d8671822ef X-Microsoft-Antispam-Message-Info: rZNP8AALWytyTp1wh8WoHb2K3AK893lz6vlo22O7M54k7VyZbZirh7sTdL+qTUtBdcZLsJAWAA3LqWEcDyYjJX35u3RtNyU4+vTNNEJZBSKb30pozOJNfr4h+4wrmEAE+ARuB3vCSQhKs3QCGVpWcjZSlad6+wlh05SAOS3LE/At7Izv0DxfK54uric4mlccQcZez0QKki5bKuT45KI3lH4UqgBTOuAAOv7j+We1Z/Yr0XtUO7180jFmqJthSYt8O1teN0nLtly/ug7vaaQVoHRU4IL/QmmSBpOCLiri15JfKhGbtmQ55J3zZzmqYgjKRLjMPj3QBiMj7Ye5TrrgO9P89U2qCS2L/J1j8QOo62ejXdDyYzUuv6yzbFLi5ipZkmBRsGoxmkLl1W952JuKXgzO+Ez9jHb5hZl8QSNjLZofIAXre35pzlwOSEfYPO6rAUjDO8wDxJfXId4RRavOOOHLJHihBcXDrOVj6wgMO84= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:32.8739 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af3a1fce-e8b0-44cd-9aee-08d867182879 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: DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4285 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: RLIJ9H0A5QRzUjCBW3sLRwTdx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673280; bh=VzmiWQA7L55iCM4khBcv2sOjvgeXjG42BHl8xm9utO0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=U7hr+rrxGmStADSsNO+zdSkkP21qQnkoSdGpl21FrjUhV678cp1bCjZ7Q5OEwP1eKQC UFCzZROc3X8pGRuje/zRkPfPSEBM4kpRQRuhx8hDk9y9LQzMnzzmt7tUP9p2fwaTH41fO kwLLjp5BRjnM2DrpUWnHhAFVxPJg1jwOpJM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool places the base address of the CFI flash in the device tree it passes to UEFI. This library parses the kvmtool device tree to read the CFI base address and initialise the PCDs use by the NOR flash driver and the variable storage. UEFI takes ownership of the CFI flash hardware, and exposes its functionality through the UEFI Runtime Variable Service. Therefore, disable the device tree node for the CFI flash used for storing the UEFI variables, to prevent the OS from attaching its device driver as well. Signed-off-by: Sami Mujawar Acked-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: v5: - Fixed minor ECC reported issues in file header. [Sami] Ref: https://edk2.groups.io/g/devel/message/62160 =20 v4: - Added STATIC to local functions and updated comments [Sami] to explain why DT node deferred to be disabled in NorFlashPlatformInitialization() - Use STATIC for local functions and explain why DT [Ard] node for flash is disabled in NorFlashPlatformInitialization()? Ref: https://edk2.groups.io/g/devel/topic/75081477 =20 v3: - ASSERT is sufficient to test Locating [Ard] gFdtClientProtocolGuid as DEPEX ensures that this is guaranteed to succeed. - Removed additional error handling based on review [Sami] feedback. - Fix confusion caused by use of macro MAX_FLASH_BANKS. [Philippe] - Renamed MAX_FLASH_BANKS to MAX_FLASH_DEVICES. [Sami] - Use macro to define block size for flash. [Philippe] - Defined macro KVMTOOL_NOR_BLOCK_SIZE and also configured [Sami] to reflect the correct block size 64KB. - Disable the DT flash node used for UEFI variable storage [Sami] as UEFI takes ownership of the flash device. Ref: https://edk2.groups.io/g/devel/topic/74200914#60341 =20 v2: - Library to read CFI flash base address from DT and initialise [Sami] PCDs used for NOR flash variables. ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c | 336 +++++++= +++++++++++++ ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf | 50 +++ 2 files changed, 386 insertions(+) diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c b/ArmV= irtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c new file mode 100644 index 0000000000000000000000000000000000000000..dce585b779a87dabde280cf4bbc= a5b828ceccda4 --- /dev/null +++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c @@ -0,0 +1,336 @@ +/** @file + An instance of the NorFlashPlatformLib for Kvmtool platform. + + Copyright (c) 2020, ARM Ltd. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + **/ + +#include +#include +#include +#include +#include + +/** Macro defining the NOR block size configured in Kvmtool. +*/ +#define KVMTOOL_NOR_BLOCK_SIZE SIZE_64KB + +/** Macro defining the maximum number of Flash devices. +*/ +#define MAX_FLASH_DEVICES 4 + +/** Macro defining the cfi-flash label describing the UEFI variable store. +*/ +#define LABEL_UEFI_VAR_STORE "System-firmware" + +STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[MAX_FLASH_DEVICES]; +STATIC UINTN mNorFlashDeviceCount =3D 0; +STATIC INT32 mUefiVarStoreNode =3D MAX_INT32; +STATIC FDT_CLIENT_PROTOCOL *mFdtClient; + +/** This function performs platform specific actions to initialise + the NOR flash, if required. + + @retval EFI_SUCCESS Success. +**/ +EFI_STATUS +NorFlashPlatformInitialization ( + VOID + ) +{ + EFI_STATUS Status; + + DEBUG ((DEBUG_INFO, "NorFlashPlatformInitialization\n")); + + if ((mNorFlashDeviceCount > 0) && (mUefiVarStoreNode !=3D MAX_INT32)) { + // + // UEFI takes ownership of the cfi-flash hardware, and exposes its + // functionality through the UEFI Runtime Variable Service. This means= we + // need to disable it in the device tree to prevent the OS from attach= ing + // its device driver as well. + // Note: This library is loaded twice. First by FaultTolerantWriteDxe = to + // setup the PcdFlashNvStorageFtw* and later by NorFlashDxe to provide= the + // NorFlashPlatformLib interfaces. If the node is disabled when the li= brary + // is first loaded, then during the subsequent loading of the library = the + // call to FindNextCompatibleNode() from the library constructor skips= the + // FDT node used for UEFI storage variable. Due to this we cannot setu= p the + // NOR flash device description i.e. mNorFlashDevices[]. + // Since NorFlashPlatformInitialization() is called only by NorFlashDx= e, + // we know it is safe to disable the node here. + // + Status =3D mFdtClient->SetNodeProperty ( + mFdtClient, + mUefiVarStoreNode, + "status", + "disabled", + sizeof ("disabled") + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "Failed to set cfi-flash status to 'disabled'\n"= )); + } + } else { + Status =3D EFI_NOT_FOUND; + DEBUG ((DEBUG_ERROR, "Flash device for UEFI variable storage not found= \n")); + } + + return Status; +} + +/** Initialise Non volatile Flash storage variables. + + @param [in] FlashDevice Pointer to the NOR Flash device. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_OUT_OF_RESOURCES Insufficient flash storage space. +**/ +STATIC +EFI_STATUS +SetupVariableStore ( + IN NOR_FLASH_DESCRIPTION * FlashDevice + ) +{ + UINTN FlashRegion; + UINTN FlashNvStorageVariableBase; + UINTN FlashNvStorageFtwWorkingBase; + UINTN FlashNvStorageFtwSpareBase; + UINTN FlashNvStorageVariableSize; + UINTN FlashNvStorageFtwWorkingSize; + UINTN FlashNvStorageFtwSpareSize; + + FlashNvStorageVariableSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + FlashNvStorageFtwWorkingSize =3D PcdGet32 (PcdFlashNvStorageFtwWorkingSi= ze); + FlashNvStorageFtwSpareSize =3D PcdGet32 (PcdFlashNvStorageFtwSpareSize); + + if ((FlashNvStorageVariableSize =3D=3D 0) || + (FlashNvStorageFtwWorkingSize =3D=3D 0) || + (FlashNvStorageFtwSpareSize =3D=3D 0)) { + DEBUG ((DEBUG_ERROR, "FlashNvStorage size not defined\n")); + return EFI_INVALID_PARAMETER; + } + + // Setup the variable store + FlashRegion =3D FlashDevice->DeviceBaseAddress; + + FlashNvStorageVariableBase =3D FlashRegion; + FlashRegion +=3D PcdGet32 (PcdFlashNvStorageVariableSize); + + FlashNvStorageFtwWorkingBase =3D FlashRegion; + FlashRegion +=3D PcdGet32 (PcdFlashNvStorageFtwWorkingSize); + + FlashNvStorageFtwSpareBase =3D FlashRegion; + FlashRegion +=3D PcdGet32 (PcdFlashNvStorageFtwSpareSize); + + if (FlashRegion > (FlashDevice->DeviceBaseAddress + FlashDevice->Size)) { + DEBUG ((DEBUG_ERROR, "Insufficient flash storage size\n")); + return EFI_OUT_OF_RESOURCES; + } + + PcdSet32S ( + PcdFlashNvStorageVariableBase, + FlashNvStorageVariableBase + ); + + PcdSet32S ( + PcdFlashNvStorageFtwWorkingBase, + FlashNvStorageFtwWorkingBase + ); + + PcdSet32S ( + PcdFlashNvStorageFtwSpareBase, + FlashNvStorageFtwSpareBase + ); + + DEBUG (( + DEBUG_INFO, + "PcdFlashNvStorageVariableBase =3D 0x%x\n", + FlashNvStorageVariableBase + )); + DEBUG (( + DEBUG_INFO, + "PcdFlashNvStorageVariableSize =3D 0x%x\n", + FlashNvStorageVariableSize + )); + DEBUG (( + DEBUG_INFO, + "PcdFlashNvStorageFtwWorkingBase =3D 0x%x\n", + FlashNvStorageFtwWorkingBase + )); + DEBUG (( + DEBUG_INFO, + "PcdFlashNvStorageFtwWorkingSize =3D 0x%x\n", + FlashNvStorageFtwWorkingSize + )); + DEBUG (( + DEBUG_INFO, + "PcdFlashNvStorageFtwSpareBase =3D 0x%x\n", + FlashNvStorageFtwSpareBase + )); + DEBUG (( + DEBUG_INFO, + "PcdFlashNvStorageFtwSpareSize =3D 0x%x\n", + FlashNvStorageFtwSpareSize + )); + + return EFI_SUCCESS; +} + +/** Return the Flash devices on the platform. + + @param [out] NorFlashDescriptions Pointer to the Flash device descri= ption. + @param [out] Count Number of Flash devices. + + @retval EFI_SUCCESS Success. + @retval EFI_NOT_FOUND Flash device not found. +**/ +EFI_STATUS +NorFlashPlatformGetDevices ( + OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions, + OUT UINT32 *Count + ) +{ + if (mNorFlashDeviceCount > 0) { + *NorFlashDescriptions =3D mNorFlashDevices; + *Count =3D mNorFlashDeviceCount; + return EFI_SUCCESS; + } + return EFI_NOT_FOUND; +} + +/** Entrypoint for NorFlashPlatformLib. + + @param [in] ImageHandle The handle to the image. + @param [in] SystemTable Pointer to the System Table. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND Flash device not found. +**/ +EFI_STATUS +EFIAPI +NorFlashPlatformLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable + ) +{ + INT32 Node; + EFI_STATUS Status; + EFI_STATUS FindNodeStatus; + CONST UINT32 *Reg; + UINT32 PropSize; + UINT64 Base; + UINT64 Size; + UINTN UefiVarStoreIndex; + CONST CHAR8 *Label; + UINT32 LabelLen; + + if (mNorFlashDeviceCount !=3D 0) { + return EFI_SUCCESS; + } + + Status =3D gBS->LocateProtocol ( + &gFdtClientProtocolGuid, + NULL, + (VOID **)&mFdtClient + ); + ASSERT_EFI_ERROR (Status); + + UefiVarStoreIndex =3D MAX_UINTN; + for (FindNodeStatus =3D mFdtClient->FindCompatibleNode ( + mFdtClient, + "cfi-flash", + &Node + ); + !EFI_ERROR (FindNodeStatus) && + (mNorFlashDeviceCount < MAX_FLASH_DEVICES); + FindNodeStatus =3D mFdtClient->FindNextCompatibleNode ( + mFdtClient, + "cfi-flash", + Node, + &Node + )) { + Status =3D mFdtClient->GetNodeProperty ( + mFdtClient, + Node, + "label", + (CONST VOID **)&Label, + &LabelLen + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: GetNodeProperty ('label') failed (Status =3D=3D %r)\n", + __FUNCTION__, + Status + )); + } else if (AsciiStrCmp (Label, LABEL_UEFI_VAR_STORE) =3D=3D 0) { + UefiVarStoreIndex =3D mNorFlashDeviceCount; + mUefiVarStoreNode =3D Node; + } + + Status =3D mFdtClient->GetNodeProperty ( + mFdtClient, + Node, + "reg", + (CONST VOID **)&Reg, + &PropSize + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: GetNodeProperty () failed (Status =3D=3D %= r)\n", + __FUNCTION__, Status)); + continue; + } + + ASSERT ((PropSize % (4 * sizeof (UINT32))) =3D=3D 0); + + while ((PropSize >=3D (4 * sizeof (UINT32))) && + (mNorFlashDeviceCount < MAX_FLASH_DEVICES)) { + Base =3D SwapBytes64 (ReadUnaligned64 ((VOID *)&Reg[0])); + Size =3D SwapBytes64 (ReadUnaligned64 ((VOID *)&Reg[2])); + Reg +=3D 4; + + PropSize -=3D 4 * sizeof (UINT32); + + // + // Disregard any flash devices that overlap with the primary FV. + // The firmware is not updatable from inside the guest anyway. + // + if ((PcdGet64 (PcdFvBaseAddress) + PcdGet32 (PcdFvSize) > Base) && + (Base + Size) > PcdGet64 (PcdFvBaseAddress)) { + continue; + } + + DEBUG (( + DEBUG_INFO, + "NOR%d : Base =3D 0x%lx, Size =3D 0x%lx\n", + mNorFlashDeviceCount, + Base, + Size + )); + + mNorFlashDevices[mNorFlashDeviceCount].DeviceBaseAddress =3D (UINTN)= Base; + mNorFlashDevices[mNorFlashDeviceCount].RegionBaseAddress =3D (UINTN)= Base; + mNorFlashDevices[mNorFlashDeviceCount].Size =3D (UINTN)Size; + mNorFlashDevices[mNorFlashDeviceCount].BlockSize =3D KVMTOOL_NOR_BLO= CK_SIZE; + mNorFlashDeviceCount++; + } + } // for + + // Setup the variable store in the last device + if (mNorFlashDeviceCount > 0) { + if (UefiVarStoreIndex =3D=3D MAX_UINTN) { + // We did not find a label matching the UEFI Variable store. Default= to + // using the last cfi-flash device as the variable store. + UefiVarStoreIndex =3D mNorFlashDeviceCount - 1; + mUefiVarStoreNode =3D Node; + } + if (mNorFlashDevices[UefiVarStoreIndex].DeviceBaseAddress !=3D 0) { + return SetupVariableStore (&mNorFlashDevices[UefiVarStoreIndex]); + } + } + + return EFI_NOT_FOUND; +} + diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf b= /ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..b811e99156e2d55a95b4941e927= a1006eb18a610 --- /dev/null +++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf @@ -0,0 +1,50 @@ +## @file +# Nor Flash library for Kvmtool. +# +# Copyright (c) 2020, ARM Ltd. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D NorFlashKvmtoolLib + FILE_GUID =3D E75F07A1-B160-4893-BDD4-09E32FF847DC + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D NorFlashPlatformLib + CONSTRUCTOR =3D NorFlashPlatformLibConstructor + +[Sources.common] + NorFlashKvmtool.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + ArmVirtPkg/ArmVirtPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + PcdLib + UefiBootServicesTableLib + +[Protocols] + gFdtClientProtocolGuid ## CONSUMES + +[Pcd] + gArmTokenSpaceGuid.PcdFvBaseAddress + gArmTokenSpaceGuid.PcdFvSize + + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize + +[Depex] + gFdtClientProtocolGuid + --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65865): https://edk2.groups.io/g/devel/message/65865 Mute This Topic: https://groups.io/mt/77270957/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65857+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673275029279.3958424387454; Fri, 2 Oct 2020 14:14:35 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hPQMYY1788612x8SvdMITXt6; Fri, 02 Oct 2020 14:14:34 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.79]) by mx.groups.io with SMTP id smtpd.web12.5581.1601673272804650587 for ; Fri, 02 Oct 2020 14:14:33 -0700 X-Received: from AM6PR08CA0017.eurprd08.prod.outlook.com (2603:10a6:20b:b2::29) by VI1PR0801MB1935.eurprd08.prod.outlook.com (2603:10a6:800:87::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:27 +0000 X-Received: from VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:b2:cafe::1) by AM6PR08CA0017.outlook.office365.com (2603:10a6:20b:b2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:27 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65857+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT030.mail.protection.outlook.com (10.152.18.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:27 +0000 X-Received: ("Tessian outbound a0bffebca527:v64"); Fri, 02 Oct 2020 21:14:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a30b65e8c64cf590 X-CR-MTA-TID: 64aa7808 X-Received: from e032ac99c5fa.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5DA91D3D-6CEE-498A-9AB0-91BB1D1248FE.1; Fri, 02 Oct 2020 21:14:21 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e032ac99c5fa.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpvqPOy1Sro/kY85yKvmTPT79Urkxjm/poLldF1N3Ocq2yb0/mQnqhdV7pGU43BG618C5v+Mj/7Q2P7TirfAiRXCcRgFfOUZUU0fqekJ+J61T9CZ/CIDJHMTgulqLzZpY7a5nE1c2Xqqn6s7B6IkcdLI8zJJ2D74pzdewExd7wa14jfR9ggrMnWEp96eC1byBfRJWkxQfPmF7TIt4MPPKsJ1mxiVwBM+CAOPEar8KYJqFhtwexfouvpJ2i+kgRqtKm4j3kFA/BRGYQRpXn1FRxdYj2lsjBejnMdpL1bhneIKAO6sJxJapRuLiuFq7rX3OJglPy4nE6OV9cm05q4I7w== 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=RdWWG2WYj3y2Ie6qVuYl2rdrZvGGAkfaKh4o65VLJjw=; b=gxZ57kGsRXnvKg1E3eZCaDP2R3v0o97TieV4NRGPc4+t6rmFAqvQ3DNwUyDa6CavwMGlE9hiJOqqJAL4u5IzeY4mNIrW6R9WtZa0QrZLkwv/84b6MStJ57s6nrFDC4kGIe3GvDZ8LcfVma0QUSbRDM1TA+1I+AgvV02evFNQ8R1PSzL3bkRAa3bfgqzx6iL2lw3OCsC+D8TAMBIH0OTCebyhzK4d9UBSsvIGoy/1WN+V6Y057X2RLV0U3Q+w4QQurtoiGXdUNaS9zLFukWA5Ebknt6s0FllvrLlRZYoSV6JrzOtHsFn8jiX0gBat8YvWL2LE1zMSJaJ6qznQCynCCA== 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 X-Received: from AM3PR05CA0118.eurprd05.prod.outlook.com (2603:10a6:207:2::20) by DB6PR0801MB2086.eurprd08.prod.outlook.com (2603:10a6:4:7a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:20 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2:cafe::4c) by AM3PR05CA0118.outlook.office365.com (2603:10a6:207:2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:20 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:20 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:17 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:17 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v5 07/15] MdeModulePkg: Fix constructor invocation ordering Date: Fri, 2 Oct 2020 22:14:01 +0100 Message-ID: <20201002211409.43888-8-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9115111f-a18f-4a9c-bbed-08d867182514 X-MS-TrafficTypeDiagnostic: DB6PR0801MB2086:|VI1PR0801MB1935: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +eB9Eq1H1PzszO64J31HXPsQdb+VFuvQWrHH+x7pRE3zKt99neqpEE6X6F+OYxlLR1p0fayfijMRvs+vWJOzmKCT5CD1q1sCrmTEMTqBnF1TDZw0h/y1amo/twgelRPVOaPSWVr14W12NAqxr3qyHrbtqghnHh6+dSa1mcwvlPU6iGzXk7dzmRZ1cQpYgEnQhrRo8lbseXiRx6DvnfHi9vwpDRT4VZFDUwuO3Gv/z9y0V7/1EQz2v4zbzFBYtenAISPEMSO7OjJs7OsQrnJD597j6r31YOQihJ5TmZClFqggBgK145lr0iRizBy2TWCKEZu9qDMVqBuYWAsfKDjLeGobAVEWogSjOrOXXrnRYZ0w3KqWU8CuTEtSOl5smA35WlWwlS1dxrXwyFfPx4fwqg07drTdosBB32d/CZiJ7H7eKF5GEg0CsCvlpoCw3ZVMNiXVKSwR80OSkyly3GBHGn9HpO/ApSlVp95i9YJgPjA= 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)(346002)(39860400002)(136003)(376002)(396003)(46966005)(83080400001)(81166007)(5660300002)(4326008)(82740400003)(26005)(316002)(1076003)(19627235002)(6666004)(54906003)(7696005)(2616005)(86362001)(478600001)(83380400001)(8936002)(70586007)(47076004)(966005)(70206006)(36756003)(6916009)(426003)(336012)(82310400003)(8676002)(186003)(2906002)(356005)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2086 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 357ab172-6107-44a0-4a44-08d8671820e0 X-Microsoft-Antispam-Message-Info: HJ6ccriBU7CNqNT/IXa5vaVV5VrVSKZZLAS55JQ5lqzppjXZOCZkYPwBXNe15wKLJaBgIrYTLdQHMXcF2j/2Q038J8hTOvhiekw0x6lrOms4ndOZAtS0DB8oZsfQdn875ZgUwmEw3whh2XrLnUrdkP1P/scdv7sOjydzDvYI44YKWL6Xn20OlSjO1VsYq3B+MnaUkw4P8qD771KRrtyODsngcyb3XYpp7kxeezxRQ9r+3jAk4UhMA0m76Yg8eabUtILek0FO4ehoe42mm8ynZiLeeifoYfHkNeJZwm1huSsciGcTf/jSoMhav8L9J/V1/kDLJUBMVS7LcdNh5rjg2Z6ohBwiPDeGUQZZaZxZIjXGIk+Z8AQoRBPaWnpHiXhQehdkdW91+yRNTqCXAl/xO7Gh0Ni/l8SlZ8Nsyc3nuB86EWcy/GmJu0FUHc9NS4KcS5M9IVTnJcpl92LwL4ZmszUYreQNggGtbzwx5J0ko9E= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:27.0807 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9115111f-a18f-4a9c-bbed-08d867182514 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: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1935 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: TEsMaXXN1EOUHYGQ9NmBrDpWx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673274; bh=AdHpr6yfikG+cctL0NNRhwWrLe7XDCCbUlsRG6ZKxjM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=J1QiC/cbXzxoj0ku/b2mnZfXLgi5GYpOIiVXTXovUTSvr+9TRejlsLP2+4sz3KR3zc1 o5lxvgkpwngp0Fo6LRqPJ2SMOC9P2F5d+X0Ha0n1aCo0l98LBpoIk4ewyzG8yw3XxKoNv R/DSYluXaHqDfs4ItkYjUAp5Jz58zUaojEI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The BaseSerialPortLib16550 library does not implement a constructor. This prevents the correct constructor invocation order for dependent libraries. e.g. A PlatformHookLib (for the Serial Port) may have a dependency on retrieving data from a Hob. A Hob library implementation may configure its initial state in the HobLib constructor. Since BaseSerialPortLib16550 does not implement a constructor, the Basetools do not resolve the correct order for constructor invocation. To fix this, add an empty constructor to the serial port library BaseSerialPortLib16550. Signed-off-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Hao A Wu --- Notes: v5: - Fix function documentation to match doxygen style. [Sami] Ref: https://edk2.groups.io/g/devel/message/62148 =20 v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/topic/75081484 MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 1= 7 +++++++++++++++++ MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf | = 3 +++ 2 files changed, 20 insertions(+) diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib1= 6550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .c index 9cb50dd80d5634ab2aa6d68bf5ca7fb891463eef..f10b5894663a979873427cffa84= a37b3064c623e 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -4,6 +4,7 @@ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
Copyright (c) 2018, AMD Incorporated. All rights reserved.
+ Copyright (c) 2020, ARM Limited. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -1102,3 +1103,19 @@ SerialPortSetAttributes ( return RETURN_SUCCESS; } =20 +/** Base Serial Port 16550 Library Constructor + + @retval RETURN_SUCCESS Success. +**/ +EFI_STATUS +EFIAPI +BaseSerialPortLib16550 ( + VOID + ) +{ + // Nothing to do here. This constructor is added to + // enable the chain of constructor invocation for + // dependent libraries. + return RETURN_SUCCESS; +} + diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib1= 6550.inf b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib165= 50.inf index 8b4ae3f1d4ee1e2e9a8b81eab4c900541ce8cfb6..92b7a8b7896a305d2ce22589f8a= 9593618d37bb7 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf @@ -2,6 +2,8 @@ # SerialPortLib instance for 16550 UART. # # Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2020, ARM Limited. All rights reserved. +# # SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -14,6 +16,7 @@ [Defines] MODULE_TYPE =3D BASE VERSION_STRING =3D 1.1 LIBRARY_CLASS =3D SerialPortLib + CONSTRUCTOR =3D BaseSerialPortLib16550 =20 [Packages] MdePkg/MdePkg.dec --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65857): https://edk2.groups.io/g/devel/message/65857 Mute This Topic: https://groups.io/mt/77270945/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65856+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673272878619.5319788245296; Fri, 2 Oct 2020 14:14:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id yTc6YY1788612xIrC0KyMaOU; Fri, 02 Oct 2020 14:14:32 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.64]) by mx.groups.io with SMTP id smtpd.web10.5607.1601673271682339810 for ; Fri, 02 Oct 2020 14:14:32 -0700 X-Received: from MR2P264CA0036.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500::24) by DB8PR08MB4076.eurprd08.prod.outlook.com (2603:10a6:10:b0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Fri, 2 Oct 2020 21:14:29 +0000 X-Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:0:cafe::22) by MR2P264CA0036.outlook.office365.com (2603:10a6:500::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:29 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65856+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:29 +0000 X-Received: ("Tessian outbound 7a6fb63c1e64:v64"); Fri, 02 Oct 2020 21:14:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f9b13160690fa3af X-CR-MTA-TID: 64aa7808 X-Received: from 12ceec2d23ec.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 17A52433-2CC0-490E-9C75-D85FCE126BD8.1; Fri, 02 Oct 2020 21:14:23 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 12ceec2d23ec.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hr3AGDejlM8/F3IgbCwfTlM3BZ/73LbkW5PSSHuM8rel/NIvNNTEfPYx28Ei5pPzFDlQrO/6G0bde2gjQlesHu8cAg6dELalJZs5Fjxo3mPVy5rPFpjPDL04NteDF6bCO9Ex/JzYAFvQbROELTpX5mAiaBfRtsmjHdYqRsC9vHoHSt74U5sJehzKf6GuTiCb0CtrQ9TCWIPwY+7U+CteXzebMJ+5Nek5s+dNY7E8GjyViY029GcpjbVfMoWmhHuZWHOKoPV2ErFFS9CJcmyra1bpqbDnWQ4hNs6jghGY9kw/KCdXWdzrklbaf1aVvhcTPR7i8F+91n4t/zB8Jb19JQ== 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=bCprfsfXwDKyKY45Xh0Rach6bJPEDtMQny/k1T+UYjs=; b=EohGdSRXRTb35qoSgTgf/AwqkummFvatWvxE/RoRINw9lvRu4uJDerbl8N+Yx/nT0RNRsNL7GScI1nNgs7pKo5Cm78IAYYx8iRXj72InWLoYGIbsYMGh9zi4H99HXO9SInMp3QpTS6Tec4ttIz2nNtWkgC3Vrddh+2fu7dkXWe3yQlStuQn/e1QACCIevXKU74yQS5zs2vYXqSVdq9npMRC6BT3HLXVvp5WD/VwVamWQLfLk/Y2ZHiRlr8uecXrX7D40SypsYATT9xeSTVRNBA5ZLv862YIduFlll9r1VlS0ciCi9NJNK5cJrXrUpR92e20RtEGPgiYBzD74VNkNCQ== 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 X-Received: from AM3PR05CA0116.eurprd05.prod.outlook.com (2603:10a6:207:2::18) by VI1PR08MB4318.eurprd08.prod.outlook.com (2603:10a6:803:f8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34; Fri, 2 Oct 2020 21:14:21 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2:cafe::fd) by AM3PR05CA0116.outlook.office365.com (2603:10a6:207:2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:21 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:21 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Fri, 2 Oct 2020 21:14:19 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 2 Oct 2020 21:14:18 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:18 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 08/15] ArmVirtPkg: GUID Hob for 16550 UART base address Date: Fri, 2 Oct 2020 22:14:02 +0100 Message-ID: <20201002211409.43888-9-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c6e98816-fb82-4298-746b-08d86718263d X-MS-TrafficTypeDiagnostic: VI1PR08MB4318:|DB8PR08MB4076: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4941;OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: IQCBxCypOs9BsLTAYHyGrocNpbtm1Pp4OKyYUMYdycEXJ+uQUvcxJN3sNcO//T0mJOZhtAdtWuSP2a3htYHyNlg62BD3wGney9gEdnvrw4hh6psu3nEMAkO+Q40crfsHI7njsD+gNB/N1PlTpvVGUrIAnCHWEDhcboU7n0NT+1oFcDXyHlXcvK/4EerfxOuSAmfwYc/aXYzceZVzCYzpOZA6TY7ATLqazhp0Vl9rRARbdiEv82PV9Q8onoa9QE9pyuLxZ4Ld/TbS0UPn5e3H+MxFJZs40Xt2pHiGtwObsTVTAcAZUqdj0vBnoinXwHNIlf/RFknEL/AUabqO1UyoRh9UR9Hh2kYpPOgQlFnwu3oD99lXeLZGLhhOtydltMyPi3FnFAzQhUIJF3oNAVvUYUp8sveuuhzrc3G/jKy0biWmok85zk7Lnh0o/ih8eJmLZBr804bcf0MErJuhJuf3A0rbQZWVbnggmI1wI3TRGbM= 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)(39860400002)(136003)(346002)(376002)(396003)(46966005)(82740400003)(8936002)(36756003)(47076004)(336012)(82310400003)(19627235002)(81166007)(356005)(83380400001)(70586007)(83080400001)(6666004)(1076003)(70206006)(186003)(26005)(426003)(4326008)(86362001)(44832011)(5660300002)(7696005)(6916009)(2616005)(54906003)(8676002)(316002)(966005)(478600001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4318 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 39eb60c9-5175-44b5-b49e-08d8671821b8 X-Microsoft-Antispam-Message-Info: LwrJC6KRO9s9UnEhF0A8poLvZhx+Ielyog05JclopPJL97oSOSP72NA85wBb3EVBi+pgxM0TngKG8CsB9NnY1sQFUUeZijeh7p2TgOK79UZYsbDRUXNMTMHeFHBAAoun13br5gffdnL+hDDbpR1sJOUk7VZ4hc2rKDq4n2RaSsPft/gOO5v2dcjEODtwMzr2yhv+Ujw3te5mH1BFLi573KZ2MMl8IOgFvJUQPUl3IRJcIuV2idpX9Wj9V4a2vjxjSzuht7kBhShDnjobAnX7uCutHijxMwxriFx6R9CAaLl8vxVUwreYnW72GR6r/hR29zqh/RSGor8Sak723+1fL1/LcMrB73AO19H1qE3wlSqWiO7P8z9arnPQVAzZQG9VnVptbEPcT+veFLTCpcKHSWpx0wQa07VqStmt4lPl65BrOI6oJWj/lqiFJFoFUeTVGVC6yqlncW+eyPGgNi/3xeXR0d0gG98Q128OmskSVrw= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:29.0219 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c6e98816-fb82-4298-746b-08d86718263d 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: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4076 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: BJlSBYGA816LzA8em9wgSdk5x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673272; bh=w5abZaXEE9S9Uk5dkSlOXN7gqJHqHCHmZH/cv6vf3Yw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=AIiWIy0b+s2SQ1LYEJBiuX5MNyGx1O02IZFTk/R/yxOiB5JdWYamuTOZNmnn/melczd C0GVBKSjp2B8rCttrartr2YfmXzqSVGlNlgkY8Qo/gReE6gb3r8j6ANxCmQgZcubfC83u Nsfpsx1GkwlHyJod9odse6L7CIllL2YBie4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Introduce a new GUID Hob gEarly16550UartBaseAddressGuid to cache the base address of the 16550 UART, for when PCD access is not available. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel --- Notes: v5: - No code changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62149 =20 v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61720 ArmVirtPkg/ArmVirtPkg.dec | 2 ++ ArmVirtPkg/Include/Guid/Early16550UartBaseAddress.h | 22 +++++++++++++++++= +++ 2 files changed, 24 insertions(+) diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 08ddd68a863eb82778fa7a92b20ac1bff271f5e5..bf82f7f1f3f2a0ce545d87fa933= 50f56de78328b 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -1,6 +1,7 @@ #/** @file # # Copyright (c) 2014, Linaro Limited. All rights reserved. +# Copyright (c) 2020, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -30,6 +31,7 @@ [LibraryClasses] [Guids.common] gArmVirtTokenSpaceGuid =3D { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0= x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } } gEarlyPL011BaseAddressGuid =3D { 0xB199DEA9, 0xFD5C, 0x4A84, { 0x8= 0, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } } + gEarly16550UartBaseAddressGuid =3D { 0xea67ca3e, 0x1f54, 0x436b, { 0x9= 7, 0x88, 0xd4, 0xeb, 0x29, 0xc3, 0x42, 0x67 } } =20 gArmVirtVariableGuid =3D { 0x50bea1e5, 0xa2c5, 0x46e9, { 0x9b, 0x3a, 0= x59, 0x59, 0x65, 0x16, 0xb0, 0x0a } } =20 diff --git a/ArmVirtPkg/Include/Guid/Early16550UartBaseAddress.h b/ArmVirtP= kg/Include/Guid/Early16550UartBaseAddress.h new file mode 100644 index 0000000000000000000000000000000000000000..6b76f37a27dac03d6749f31a03e= 8026023231056 --- /dev/null +++ b/ArmVirtPkg/Include/Guid/Early16550UartBaseAddress.h @@ -0,0 +1,22 @@ +/** @file + GUID for the HOB that caches the base address of the 16550 serial port, = for + when PCD access is not available. + + Copyright (c) 2020, ARM Limited. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EARLY_16550_UART_BASE_ADDRESS_H__ +#define EARLY_16550_UART_BASE_ADDRESS_H__ + +#define EARLY_16550_UART_BASE_ADDRESS_GUID { \ + 0xea67ca3e, 0x1f54, 0x436b, { \ + 0x97, 0x88, 0xd4, 0xeb, 0x29, 0xc3, 0x42, 0x67 \ + } \ + } + +extern EFI_GUID gEarly16550UartBaseAddressGuid; + +#endif // EARLY_16550_UART_BASE_ADDRESS_H__ --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65856): https://edk2.groups.io/g/devel/message/65856 Mute This Topic: https://groups.io/mt/77270944/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65863+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 16016732805431023.4906793505417; Fri, 2 Oct 2020 14:14:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HpPdYY1788612xhW5evdKaGN; Fri, 02 Oct 2020 14:14:40 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.47]) by mx.groups.io with SMTP id smtpd.web10.5609.1601673278312160596 for ; Fri, 02 Oct 2020 14:14:38 -0700 X-Received: from AM6P193CA0096.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::37) by DB7PR08MB3257.eurprd08.prod.outlook.com (2603:10a6:5:19::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.22; Fri, 2 Oct 2020 21:14:32 +0000 X-Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:88:cafe::2b) by AM6P193CA0096.outlook.office365.com (2603:10a6:209:88::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:32 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65863+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:32 +0000 X-Received: ("Tessian outbound 7a6fb63c1e64:v64"); Fri, 02 Oct 2020 21:14:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: edd61c0462aa69db X-CR-MTA-TID: 64aa7808 X-Received: from ffbcc8e9eb4d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 89197AE4-96A0-4DFF-A825-66ED00B436EF.1; Fri, 02 Oct 2020 21:14:25 +0000 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ffbcc8e9eb4d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mf4cSadqeA91o4hMaL2/MoD4W6Wi+UydlS34ug0qhtv2J50lop4sF9UsJKhvfQqtjSMsOlRP5R+nVvkJLbc3kfNQH+pxEqsBawhOq6lUd28WJ68KcEfPJYtfmnIJDxiB5NH/ia3hTh13Pzvy00pqMomH4gypviGMRdtW75ONwgEw8NvV1KCTgXusbMS6uvTs+p6vi8epGaTUeOQyRsrAtHi53Tw1Vn6y+12xo56G+UF0zpZC4FEB7NrdCuCqeMcgmE8ibyRN6wK+wxveYqsEhetfXi9aQXArjc50lcPg6M1zmblHljIaI5HkTHXZXVG/a7Ql+UnLqmsxW5JizdNH4g== 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=2A67lEqI6GXPHAkgJJxtwpkKZcIVqavkelDDRf3Q5Zg=; b=Lz3AYt69bXx7KkkobwQFtw3+fYCfmGECg/CWoikZGa5DqOIi2VGsLWiCocZiQglCs9RWfT89Lh1hhOW6TU9pKYT7SaGIYbs7koRKC0SUSaliFfMmhAH0D6veAhLch3XL3a39e94Tbw9+nBpgNHUvRHsmTq+YJApKZ5b2rIHH1HojwTI2DsAb95+PjUk2L/M7609d4hqQ8951wTfEJZbO708g2/apCrpnWsD3wLfv7f6lUS1XrsOevZY5ATetE6AqLMJZzTYQ4jniurn2XYna8M49ZsY8PZV8NapV8mOIcsaAlEOigzsrkLPKVz5eZUmq5td8baiEAcZvHT1JA6SPVg== 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 X-Received: from AM3PR05CA0116.eurprd05.prod.outlook.com (2603:10a6:207:2::18) by VI1PR08MB4318.eurprd08.prod.outlook.com (2603:10a6:803:f8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2:cafe::fd) by AM3PR05CA0116.outlook.office365.com (2603:10a6:207:2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:19 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:18 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 09/15] ArmVirtPkg: 16550 UART Platform hook library Date: Fri, 2 Oct 2020 22:14:03 +0100 Message-ID: <20201002211409.43888-10-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3fe6acca-1e54-41c4-9e3d-08d86718280b X-MS-TrafficTypeDiagnostic: VI1PR08MB4318:|DB7PR08MB3257: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:3383;OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: kqprTn3qphJmnKtFo5OwtglydO/UTvX9x52YAqKEKp9gSvEhfj4LLHqqMNFz1HsWO/qQn4EYSkwsUEpNoXGg7x+eri+kVfWSuS3q13l/7E1drsqRH7n3ZImVUHzlVYNw/4wiW3EvjLoi1SC94qJpzubQpi8sMe84uLusNMnaM8dVH0V3OVbn49+TywEbdGH034PXxrxwAEX7wJ3F4RwacBqGs9jMV/HQXc1BwBOvoVS7l63z7ztsZSbXbaDEK14Aeis4JNySVasRgOszQ3CYl0Ul2rRMty2C1c3vMhOVjy0IjKDN3SqSFck290Rq7HKx1NyJ22n3K/ZIwlTF4zNHoc7/k7eSgGeh2HWQM72XEP+riLWykvf6E7Y7BQv5nhq+FPAu+8R6t6OTobM/wQv65uFpHbwUd1tHXOAvKky0NGZTbmZruFSHYlRjYrp5J5FuDGDESBsbybPrwFmicWsPpMVs5zUtKcVZ5kqItx1Z+E8= 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)(39860400002)(136003)(346002)(376002)(396003)(46966005)(82740400003)(8936002)(36756003)(47076004)(336012)(82310400003)(19627235002)(81166007)(356005)(83380400001)(70586007)(83080400001)(6666004)(1076003)(70206006)(186003)(26005)(426003)(4326008)(86362001)(44832011)(5660300002)(7696005)(6916009)(30864003)(2616005)(54906003)(8676002)(316002)(966005)(478600001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4318 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7056d319-baf5-45d5-4b0e-08d8671822de X-Microsoft-Antispam-Message-Info: 8cQvoNdIMUtT33avHFAWHnr1MHSeANaJEu+wmCLMW7twq/K3mJBxp7AqC99y1sV5COnGDcMiHMjlt4UabVExiyppxTxXcQmRIiRpYLE82Mq7J7gaWFG3rUUThkFUwMXCDhznJ6ylG4qdXKzPm0XUN5z/hQr57q8JzjXjrv+Gvth33vveXiQlH7tJeaDHlPOQ9Vxuhn9nwG+PVgNp31G82TZ7G0buKgAz/sbw+kBKcCZ3puw3RNidZpxEm/t+Mi89DpPdopTRwSpPUCqV/TrRfV36h936/z50j+h5F3RBiad+ihOb+nwdWeRqiN+2FQ8i+kp7p2t5z6z4A0m/d/Tzl2Rk7v5wSc9ycLoPWCX2ipuvOLuTnzL957WoXcZ23dPymAKG0Z47Y9JBhhUmGYnOsO/d2121JuSqNGroEpL9kCBOQEU4sAPJ9/zKdQCSrZbIdc6GWNG5gDjsAw6IE8AiqQpto49ybR4Vne3c1Kk46cunU2zJWB0yCIjzBZbKMGZOslO9ZimPYdhmL8Q/tZ9h1w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:32.0491 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3fe6acca-1e54-41c4-9e3d-08d86718280b 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: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3257 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: 1Iru1IhF4XGwnJPkPFgk0CXIx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673280; bh=MWmly8+mx/j01Yck9BUUsHttBTOP3Wkyj1D4l0neCoo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=ZR++yu+jsJepEQqQZPvx162krZKbzFc0Vhn58vDWmoHKaaxiLpl53j2wIlYeJeocLLK foVPkfGDO9nHC4JKw1Vbz4Q5qNjIpJaJgM8Bgl1JTsPPpItNrN1L2oFilym26Q2moR6sE 7XuE7JeRw1SlvdUzTHNyP7KtY4Sp5jlpkcE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The BaseSerialPort16550 library invokes the PlatformHookSerialPortInitialize() implemented as part of the PlatformHook library, to perform platform specific initialization required to enable use of the 16550 device. The BaseSerialPort16550 library uses the PcdSerialRegisterBase to obtain the base address of the UART for MMIO operations. Some VMMs like Kvmtool provide the base address of the console serial port in the platform device tree. This patch introduces two instances of the Platform Hook library: 1. EarlyFdt16550SerialPortHookLib - parses the platform device tree to extract the base address of the 16550 UART and update the PCD PcdSerialRegisterBase. 2. Fdt16550SerialPortHookLib - reads the GUID Hob gEarly16550UartBaseAddressGuid (that caches the base address of the 16550 UART discovered during early stages) and updates the PCD PcdSerialRegisterBase. Note: a. The PCD PcdSerialRegisterBase is configured as PatchableInModule. b. A separate patch introduces a PlatformPeiLib that trampolines the 16550 UART base address from the Pcd PcdSerialRegisterBase to the GUID Hob gEarly16550UartBaseAddressGuid. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel --- Notes: v5: - No code changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62142 =20 v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61721 ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLi= b.c | 138 ++++++++++++++++++++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLi= b.inf | 36 +++++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.c = | 57 ++++++++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf= | 39 ++++++ ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.uni= | 14 ++ 5 files changed, 284 insertions(+) diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550Seri= alPortHookLib.c b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt1655= 0SerialPortHookLib.c new file mode 100644 index 0000000000000000000000000000000000000000..4e97302d01dc5692e046fb90166= 3373828b532ee --- /dev/null +++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortH= ookLib.c @@ -0,0 +1,138 @@ +/** @file + Early Platform Hook Library instance for 16550 Uart. + + Copyright (c) 2020, ARM Ltd. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +/** Get the UART base address of the console serial-port from the DT. + + This function fetches the node referenced in the "stdout-path" + property of the "chosen" node and returns the base address of + the console UART. + + @param [in] Fdt Pointer to a Flattened Device Tree (= Fdt). + @param [out] SerialConsoleAddress If success, contains the base address + of the console serial-port. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_NOT_FOUND Console serial-port info not found in DT. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +STATIC +EFI_STATUS +EFIAPI +GetSerialConsolePortAddress ( + IN CONST VOID *Fdt, + OUT UINT64 *SerialConsoleAddress + ) +{ + CONST CHAR8 *Prop; + INT32 PropSize; + CONST CHAR8 *Path; + INT32 PathLen; + INT32 ChosenNode; + INT32 SerialConsoleNode; + INT32 Len; + CONST CHAR8 *NodeStatus; + CONST UINT64 *RegProperty; + + if ((Fdt =3D=3D NULL) || (fdt_check_header (Fdt) !=3D 0)) { + return EFI_INVALID_PARAMETER; + } + + // The "chosen" node resides at the the root of the DT. Fetch it. + ChosenNode =3D fdt_path_offset (Fdt, "/chosen"); + if (ChosenNode < 0) { + return EFI_NOT_FOUND; + } + + Prop =3D fdt_getprop (Fdt, ChosenNode, "stdout-path", &PropSize); + if (PropSize < 0) { + return EFI_NOT_FOUND; + } + + // Determine the actual path length, as a colon terminates the path. + Path =3D ScanMem8 (Prop, ':', PropSize); + if (Path =3D=3D NULL) { + PathLen =3D AsciiStrLen (Prop); + } else { + PathLen =3D Path - Prop; + } + + // Aliases cannot start with a '/', so it must be the actual path. + if (Prop[0] =3D=3D '/') { + SerialConsoleNode =3D fdt_path_offset_namelen (Fdt, Prop, PathLen); + } else { + // Lookup the alias, as this contains the actual path. + Path =3D fdt_get_alias_namelen (Fdt, Prop, PathLen); + if (Path =3D=3D NULL) { + return EFI_NOT_FOUND; + } + SerialConsoleNode =3D fdt_path_offset (Fdt, Path); + } + + NodeStatus =3D fdt_getprop (Fdt, SerialConsoleNode, "status", &Len); + if ((NodeStatus !=3D NULL) && (AsciiStrCmp (NodeStatus, "okay") !=3D 0))= { + return EFI_NOT_FOUND; + } + + RegProperty =3D fdt_getprop (Fdt, SerialConsoleNode, "reg", &Len); + if (Len !=3D 16) { + return EFI_INVALID_PARAMETER; + } + + *SerialConsoleAddress =3D fdt64_to_cpu (ReadUnaligned64 (RegProperty)); + + return EFI_SUCCESS; +} + +/** Platform hook to retrieve the 16550 UART base address from the platform + Device tree and store it in PcdSerialRegisterBase. + + @retval RETURN_SUCCESS Success. + @retval RETURN_INVALID_PARAMETER A parameter was invalid. + @retval RETURN_NOT_FOUND Serial port information not found. + +**/ +RETURN_STATUS +EFIAPI +PlatformHookSerialPortInitialize ( + VOID + ) +{ + RETURN_STATUS Status; + VOID *DeviceTreeBase; + UINT64 SerialConsoleAddress; + + if (PcdGet64 (PcdSerialRegisterBase) !=3D 0) { + return RETURN_SUCCESS; + } + + DeviceTreeBase =3D (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddr= ess); + if (DeviceTreeBase =3D=3D NULL) { + return RETURN_NOT_FOUND; + } + + Status =3D GetSerialConsolePortAddress (DeviceTreeBase, &SerialConsoleAd= dress); + if (RETURN_ERROR (Status)) { + return Status; + } + + return (EFI_STATUS)PcdSet64S (PcdSerialRegisterBase, SerialConsoleAddres= s); +} + diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550Seri= alPortHookLib.inf b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16= 550SerialPortHookLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..007a45eca2a622118044b527a5b= c6403b706608a --- /dev/null +++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortH= ookLib.inf @@ -0,0 +1,36 @@ +## @file +# Early Platform Hook Library instance for 16550 Uart. +# +# Copyright (c) 2020, ARM Ltd. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D EarlyFdt16550SerialPortHookLib + MODULE_UNI_FILE =3D Fdt16550SerialPortHookLib.uni + FILE_GUID =3D FFB19961-79CC-4684-84A8-C31B0A2BBE82 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PlatformHookLib|SEC PEI_CORE PEIM + +[Sources] + EarlyFdt16550SerialPortHookLib.c + +[LibraryClasses] + BaseLib + PcdLib + FdtLib + HobLib + +[Packages] + ArmVirtPkg/ArmVirtPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[Pcd] + gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPor= tHookLib.c b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPor= tHookLib.c new file mode 100644 index 0000000000000000000000000000000000000000..1100c12aef361e39cf78f0c3e4e= 14cc2feecfcee --- /dev/null +++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLi= b.c @@ -0,0 +1,57 @@ +/** @file + Platform Hook Library instance for 16550 Uart. + + Copyright (c) 2020, ARM Ltd. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +/** Platform hook to retrieve the 16550 UART base address from the GUID Hob + that caches the UART base address from early boot stage and store it in + PcdSerialRegisterBase. + + @retval RETURN_SUCCESS Success. + @retval RETURN_NOT_FOUND Serial Port information not found. + +**/ +RETURN_STATUS +EFIAPI +PlatformHookSerialPortInitialize ( + VOID + ) +{ + VOID *Hob; + UINT64 *UartBase; + + if (PcdGet64 (PcdSerialRegisterBase) !=3D 0) { + return RETURN_SUCCESS; + } + + Hob =3D GetFirstGuidHob (&gEarly16550UartBaseAddressGuid); + if ((Hob =3D=3D NULL) || (GET_GUID_HOB_DATA_SIZE (Hob) !=3D sizeof (*Uar= tBase))) { + return RETURN_NOT_FOUND; + } + + UartBase =3D GET_GUID_HOB_DATA (Hob); + if ((UINTN)*UartBase =3D=3D 0) { + return RETURN_NOT_FOUND; + } + + return (RETURN_STATUS)PcdSet64S (PcdSerialRegisterBase, (UINTN)*UartBase= ); +} + diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPor= tHookLib.inf b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialP= ortHookLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..ba789ca69041b647a4a881b0311= 0ff853df89f65 --- /dev/null +++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLi= b.inf @@ -0,0 +1,39 @@ +## @file +# Platform Hook Library instance for 16550 Uart. +# +# Copyright (c) 2020, ARM Ltd. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D Fdt16550SerialPortHookLib + MODULE_UNI_FILE =3D Fdt16550SerialPortHookLib.uni + FILE_GUID =3D C6DFD3F0-179D-4376-89A5-F641A2E7EFB5 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PlatformHookLib|DXE_CORE DXE_DRIVER U= EFI_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION + CONSTRUCTOR =3D PlatformHookSerialPortInitialize + +[Sources] + Fdt16550SerialPortHookLib.c + +[LibraryClasses] + BaseLib + PcdLib + HobLib + +[Packages] + ArmVirtPkg/ArmVirtPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + +[Guids] + gEarly16550UartBaseAddressGuid + diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPor= tHookLib.uni b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialP= ortHookLib.uni new file mode 100644 index 0000000000000000000000000000000000000000..19a61a4a03244321bda7c88cd26= 128b44bfd46b4 --- /dev/null +++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLi= b.uni @@ -0,0 +1,14 @@ +// /** @file +// Platform Hook Library instance for 16550 Uart. +// +// +// Copyright (c) 2020, ARM Ltd. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_MODULE_ABSTRACT #language en-US "Platform Hook Library ins= tance for 16550 Uart." + +#string STR_MODULE_DESCRIPTION #language en-US "Platform Hook Library ins= tance for 16550 Uart." + --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65863): https://edk2.groups.io/g/devel/message/65863 Mute This Topic: https://groups.io/mt/77270955/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65867+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673282237253.65558222500442; Fri, 2 Oct 2020 14:14:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mkOpYY1788612x5XgFvkwQPe; Fri, 02 Oct 2020 14:14:41 -0700 X-Received: from FRA01-MR2-obe.outbound.protection.outlook.com (FRA01-MR2-obe.outbound.protection.outlook.com [40.107.9.78]) by mx.groups.io with SMTP id smtpd.web10.5612.1601673281022324441 for ; Fri, 02 Oct 2020 14:14:41 -0700 X-Received: from AM6P194CA0082.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::23) by PR2PR08MB4633.eurprd08.prod.outlook.com (2603:10a6:101:1c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35; Fri, 2 Oct 2020 21:14:37 +0000 X-Received: from AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8f:cafe::93) by AM6P194CA0082.outlook.office365.com (2603:10a6:209:8f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:37 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65867+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT059.mail.protection.outlook.com (10.152.17.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:37 +0000 X-Received: ("Tessian outbound e8cdb8c6f386:v64"); Fri, 02 Oct 2020 21:14:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5f664404e4a6fec2 X-CR-MTA-TID: 64aa7808 X-Received: from 60aab818ebad.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AB5C731E-A70E-4A53-8387-76A1F351B839.1; Fri, 02 Oct 2020 21:14:26 +0000 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 60aab818ebad.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S6Vy7QF/vZsYhV0cYj1y7YybZ/pmdS2Y7TMa8Q4y6vopgejMyIUUXJLXI8gakdD5NTuROt4olKM4RhEa6wMCaTH9X4i/B4KudXBdhJR9E2HYPfcjXuaZTZc3GK3eyKJJnLfSolar/pbPmDdgb4gJ2UMvlX6BPJA3iduem2bcbeueVw7FbtYgd+RgleQjydFG4eDdjIhtG1sJXS+9/e+2yTBIy5t5kTRO6QtEAvYe3E4cii0VUlUNdLwbc7FRgt1hEFK/hoQIq/a/QCMd+OkPL9xguiKaa63hCvMTtwUAyAi3hOHNJuS+68Y5GVErx6RdHRsQjM+OrXrcSeTSOoTLtw== 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=QxPag8k9VXug+3tZd9PG02em0fr9GaV3u+Cn10RrpoQ=; b=iPTx5Tf0kAbXZnPEXX83qXsUM3iG6rBQmZaGgcviOmHcMnIwb/KB5ef7bpmbMaLaSwpwH1WRud78i2+IdoI4tuuBLZlrKGBOQV7tPHhEP8lgbCBggiwdJ2HXhZhsnjxHu20FL6mNJiNMDjcXx2bSFN2wvO4y5YW92xojUwZOyzDShTCYBXFq6VwcAnDxpVKkt+f1ka336Vj2sh+49XNZvOX4B22GqwlnXIC/X8baDrFhceeefjXS4VnZrUXwuoUe+rl8ursr/D4B3yy3iU7Rc6fBZranu9rzi2qqpOWKBJWU4yohI1YjclzZM94WUyfBXFdS9b4Aq6HnO9obKlc72g== 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 X-Received: from AM3PR05CA0117.eurprd05.prod.outlook.com (2603:10a6:207:2::19) by AM0PR08MB4467.eurprd08.prod.outlook.com (2603:10a6:208:138::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 21:14:24 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2:cafe::33) by AM3PR05CA0117.outlook.office365.com (2603:10a6:207:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:24 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:24 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:20 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:19 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 10/15] ArmVirtPkg: Add Kvmtool Platform Pei Lib Date: Fri, 2 Oct 2020 22:14:04 +0100 Message-ID: <20201002211409.43888-11-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62cdee3f-a4ab-4d5a-23e4-08d867182b32 X-MS-TrafficTypeDiagnostic: AM0PR08MB4467:|PR2PR08MB4633: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:3383;OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: vz1NSX/WPZFRXN+AfJmVfwhyycyGoQ5TtlDAc9+2izjv6c7Fp+h9kivER2TgoKUxyk04VK9P3k6noi4K8ZtrXl+FugrAtuBOwXD1x0W5fH8/nLed6BWdSiEIFoRso7c6aAkXkiKXFyp7Rfe/4GHz4Y80yuRZjT9MP56pSvwgbUOjxKyYa4co3IQ6ANcn+sHhI5gd6NAygs+bMyOqmvyM7X3eKPn5mPbR1za2Spp8Yk3O07AoujyuKiUmEt6Uuxf6C6MykIbSIKdqIicvbct2HmlQcwz4tIOsV5uMm9Er4tDwHQrvqPL3LPNb05Cdeq9tRsvf6F8RZ7LGaWQgb9SHBrsBi1yyrbeZ9DI1u4k558IjCN6tGYQiT1lUgJSUIcU6HTG2aaEWvBztgX0odTBDlxX1GLHzWV+/p+LSWVURvoNKbKo3R5mk/VTv5VZuw5Yq/ewZbvn+3d8iEpK3H1jdtF8GvJSyyjbyjm0I91u6joU= 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)(376002)(39860400002)(346002)(396003)(136003)(46966005)(8676002)(2906002)(83380400001)(4326008)(44832011)(36756003)(356005)(316002)(8936002)(54906003)(86362001)(81166007)(5660300002)(82310400003)(7696005)(83080400001)(1076003)(19627235002)(6666004)(336012)(26005)(47076004)(82740400003)(186003)(70586007)(70206006)(478600001)(966005)(2616005)(426003)(6916009);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4467 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 079a66b0-6de4-4c10-1e44-08d8671823ab X-Microsoft-Antispam-Message-Info: eEySvr7qL6gqui1FM9TBb2HLF3EqvrIdfFg072qgUIVVdXh+y+g+j69jQTKUG3XUlhuRbrvoBXIDUMc9WngGtkBc/nZBc2+zr5WnrIbYjFXKXSqWEm8jEj4prIxkBjCH1l3z8CJOHPRkpb2qcUFbpGGLcXgsysP/S1epFDAE+mIcT4dmKn4Ms0/RCKHSaQtd0J1iIRSrdK3LSBITk3G8JliyjBxPnFij2MeF0tAbfDzwYE3UInisnjoiBu0ZNnq6aRfcZk6YbEaOHKubwm+jy+jcnbd66yhNUo8sgK3L1XCfKgmWQ3CSKqRNhG7xaIAoiaUMu50A04JsT0lMGTRVYaHgXDhg4XjZm2Kj0OqgCQyE4Uhlsmju92w4urK3FXhhZFSd6hGzeq5A9A+L+EvG5XVpX4kM1ha00qsbp/NTQdQiv5RH6BUwhcMJ0lkdgTkG18VCPfu7a7OinqObxvOKz4woLpjVnRznweFUTqKDqG8= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:37.3917 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62cdee3f-a4ab-4d5a-23e4-08d867182b32 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: AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4633 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: 7MSkvJAMoMGRYeGFlJWCMb9nx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673281; bh=m70q4+86rLK8mxR94n+ipAha/5bwhPB9sRKFaGxKplI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XDA+kBAcqIxdkv3HGfH480AGKodaMWpyohG9MCUiaNXj4A5WzzYQQA/dUV+UsynXSEA rv0hcyiUNVKsAE0Ky5DgbIIOR+gGUiPN3TGFoY8JyPvMAiJrMKxmhu4Psu1O4Ta5493/P WJ1MsisxhO302LjBHc2Z1qRKwjcsDkNiBoI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The PlatformPeim() in the PlatformPeiLib is invoked by the PrePiMain() and provides the platform an opportunity to setup the plaform specific HOBs. This PlatfromPeiLib initialises the Kvmtool platform HOBs like the Fdt, 16550BaseAddress, etc. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel --- Notes: v5: - Fixed minor ECC reported issues in file header. [Sami] Ref: https://edk2.groups.io/g/devel/message/62143 =20 v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61722 ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c | 79 ++= ++++++++++++++++++ ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf | 49 ++= ++++++++++ 2 files changed, 128 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib= .c b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c new file mode 100644 index 0000000000000000000000000000000000000000..255eb0599e4ad73874282eef842= 2e0b0d8eab2ac --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c @@ -0,0 +1,79 @@ +/** @file + Kvmtool platform PEI library. + + Copyright (c) 2020, ARM Limited. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +/** Initialise Platform HOBs + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_OUT_OF_RESOURCES Out of resources. +**/ +EFI_STATUS +EFIAPI +PlatformPeim ( + VOID + ) +{ + VOID *Base; + VOID *NewBase; + UINTN FdtSize; + UINTN FdtPages; + UINT64 *FdtHobData; + UINT64 *UartHobData; + + Base =3D (VOID*)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress); + if ((Base =3D=3D NULL) || (fdt_check_header (Base) !=3D 0)) { + ASSERT (0); + return EFI_INVALID_PARAMETER; + } + + FdtSize =3D fdt_totalsize (Base) + PcdGet32 (PcdDeviceTreeAllocationPadd= ing); + FdtPages =3D EFI_SIZE_TO_PAGES (FdtSize); + NewBase =3D AllocatePages (FdtPages); + if (NewBase =3D=3D NULL) { + ASSERT (0); + return EFI_OUT_OF_RESOURCES; + } + + fdt_open_into (Base, NewBase, EFI_PAGES_TO_SIZE (FdtPages)); + + FdtHobData =3D BuildGuidHob (&gFdtHobGuid, sizeof (*FdtHobData)); + if (FdtHobData =3D=3D NULL) { + ASSERT (0); + return EFI_OUT_OF_RESOURCES; + } + + *FdtHobData =3D (UINTN)NewBase; + + UartHobData =3D BuildGuidHob ( + &gEarly16550UartBaseAddressGuid, + sizeof (*UartHobData) + ); + if (UartHobData =3D=3D NULL) { + ASSERT (0); + return EFI_OUT_OF_RESOURCES; + } + + *UartHobData =3D PcdGet64 (PcdSerialRegisterBase); + + BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize)); + + return EFI_SUCCESS; +} diff --git a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib= .inf b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..f201aee50cdd07f9424c620152e= 240ef50715f88 --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf @@ -0,0 +1,49 @@ +## @file +# Kvmtool platform PEI library. +# +# Copyright (c) 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D PlatformPeiLib + FILE_GUID =3D 21073FB3-BA6F-43EB-83F0-4A840C648165 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D KvmtoolPlatformPeiLib + +[Sources] + KvmtoolPlatformPeiLib.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmVirtPkg/ArmVirtPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + DebugLib + HobLib + FdtLib + PcdLib + PeiServicesLib + +[FixedPcd] + gArmTokenSpaceGuid.PcdFvSize + gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding + +[Pcd] + gArmTokenSpaceGuid.PcdFvBaseAddress + gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + +[Guids] + gFdtHobGuid + gEarly16550UartBaseAddressGuid + +[Depex] + gEfiPeiMemoryDiscoveredPpiGuid --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65867): https://edk2.groups.io/g/devel/message/65867 Mute This Topic: https://groups.io/mt/77270962/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65861+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673279138343.14915464201897; Fri, 2 Oct 2020 14:14:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id cBSWYY1788612xQtYKV0DBMV; Fri, 02 Oct 2020 14:14:38 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.70]) by mx.groups.io with SMTP id smtpd.web12.5586.1601673276538949800 for ; Fri, 02 Oct 2020 14:14:37 -0700 X-Received: from MRXP264CA0027.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:14::15) by AM0PR08MB3715.eurprd08.prod.outlook.com (2603:10a6:208:10b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:33 +0000 X-Received: from VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:14:cafe::15) by MRXP264CA0027.outlook.office365.com (2603:10a6:500:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:33 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65861+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT053.mail.protection.outlook.com (10.152.19.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:32 +0000 X-Received: ("Tessian outbound 195a290eb161:v64"); Fri, 02 Oct 2020 21:14:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2c2b72bfdbdbbd69 X-CR-MTA-TID: 64aa7808 X-Received: from 7150f37c3918.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3662EA66-5BB6-479A-95A0-73924563EC68.1; Fri, 02 Oct 2020 21:14:27 +0000 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7150f37c3918.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I63Pqq7hc2BI/5U6DfEXKVcUWkrH1x20v/T6UoPzUMTmhvx5JVLHK5E7wnqAbL705HAZpUDkEkC+OjkHZVXJ9H76Q4k0kQrF0QuHQw9VKFhzOClT50ThTFTlW6tCggs49yA+Ohsecdqzl25TUEvO3zQ3eA2EdGORL071IhgT6IaLl7ueDmU24kbN1mbMagBGusL3m7qKl/OizDqS98vY9I4T/XB6azB7NNuGbEZQ+HF/XxADzhjZv12rvI0hC9f2txuBSIdGfdnDvpL1xdCOdYoFa9VgHsB0X09oLGpvr7a80J3r70LZWqzuD5AUzQ1X20fiZhvPpa7giSXUvHgXbQ== 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=9sRW8DFHOXsoXbEMaFA4IILEqmiGwjJlmbCb2cafFSU=; b=gSKf4QCYZDHExNervBbvqu9Q4O5HJx4eWB5R/nZvT7FwZTMDP5Z61F9iaQHGFcNZU4WSfT13OnsdGpWtRoxEt1FcxI4jSQW4PgVcWfxn+ynO2XXchKGXgk8JDgeE0e9UFkYOLbvH2HSzE1qXmNp4bmwFAxzjovtF32eXbfCOWY+4LyMuRnY7w31iLBZJuk8Z8D7thb5ScBm0EcLrrfE8sgUM3OzuHuE/PrMXop7ZbgZLyJtqdbP7TElkoxneOQH754P+r+1AWJyWWlHXwNJQbLKh6ScSXapHtiPK1C8eHIB/CpSy7BYhlVfPc7239eY2I3Bh5UYtb5IXBOzcTFQmaw== 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 X-Received: from AM3PR05CA0117.eurprd05.prod.outlook.com (2603:10a6:207:2::19) by AM0PR08MB4467.eurprd08.prod.outlook.com (2603:10a6:208:138::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 21:14:25 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2:cafe::33) by AM3PR05CA0117.outlook.office365.com (2603:10a6:207:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:25 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:25 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Fri, 2 Oct 2020 21:14:22 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 2 Oct 2020 21:14:21 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:20 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v5 11/15] ArmVirtPkg: Support for kvmtool virtual platform Date: Fri, 2 Oct 2020 22:14:05 +0100 Message-ID: <20201002211409.43888-12-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73dea00a-b8bd-455b-2608-08d867182895 X-MS-TrafficTypeDiagnostic: AM0PR08MB4467:|AM0PR08MB3715: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:390;OLM:390; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fqOuXeIP6+44wI0EfD8+JqxZqSXkGLo11gIEdx5bt/WZEvhWHqOdFO5Rg5DmG+5a8QCBwznusTvFknEwE5OQ91ZEKXzhj2LqD8pAvNonqt3yMRC7CVe47ovWnzy3jgRpWwRcUfSEvInBNyJSBjwiHsDsldk8dRr1ktRH4d+yGT/Ck0sP3ryvxepmgdr8T9Hb1edqO8Cf9XfWyk8lKT3rY6Wc0YJYGi2vd7FDELBU00k0rho0/H5wWMCsGcnfhr3zygRpDsceAVvGDhMIA/GuPXqsBCRdRr/vSVE3UZwAmN0Obg6nkd0tCaeXABBaYkSvqpS1Px3N2FEIqvLQv0TQCTtA4tZqncnEgN7bRkeOXW+bB/XxWMLOAnhN7C2x7yCRIp/tmmtWV2o2Kyc+oJPqd0pGAPLnw/oE9+0IiNJBdd26jfbRyo+whbyJ2mp4kiSZ38BdP6KlQ+eyfekxAoEHOcvxmFZNGF78l/NRcZ03c+c= 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)(376002)(39860400002)(346002)(396003)(136003)(46966005)(8676002)(2906002)(30864003)(83380400001)(4326008)(44832011)(36756003)(356005)(316002)(8936002)(54906003)(86362001)(81166007)(5660300002)(82310400003)(7696005)(83080400001)(1076003)(19627235002)(6666004)(336012)(26005)(47076004)(82740400003)(186003)(70586007)(70206006)(478600001)(966005)(2616005)(426003)(6916009);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4467 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: eeeb54d5-adf0-424f-8292-08d867182451 X-Microsoft-Antispam-Message-Info: NBOarZUuItc8ZGTHzIadQ5l8JFTSkWpXM3m5dNmaacm7JdkQ1MFhR/LaDxfhKWV+ViNhWYsoc3Hd9X8PxsGDShb3BL0U8JIS3tl8wi7cT0SN/+IWpF9MKIWYuic7rwEAyNKDOrA/1HnJgz7Qb+cECoAKvOB2fta/kBhuzff6XSYPHmNJq/Ywb644uvQgBWDatIPmuqv1ozK9/9NvIUFp1jSJMS7rNojVDdDAg7GpIwb/Cll5oFP/h9Qv7bh4CJjkhlYMHdMST6DcRNmucvO1d+TqVZSHC9+IlBk+j4jijWKb9siuCk4eW8y636ImqS4mHUSv0JLnUo/8kwbR5G9OGfZtZ7lde23umCIJyCZ+gy2Vos3PJoGkvWbljcFsDjZMZ8C5t5MIZ0IssgBOTDnJ8COa2cuM19AvdQXDa+YdvhzfGmfDruphzx1Ipql747ldo0nCw0T0lzCLgG7mHEprVrBQAIpHlcKX7uz1aTPUN3o= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:32.9206 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73dea00a-b8bd-455b-2608-08d867182895 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: VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3715 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: XThtral30pjhjmj9bPHsla4Kx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673278; bh=Xpsza8WvnOYVaI8Y+0cfUrvq1yqaOSXYKMt8EC0xkug=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=j/ItHdXrKGpVf9NqupoZ0bcGxE2XxDPkzwn6kkEXpi8LgRfTq6HMJvIXBmWNVtlq/A0 UehCaSKDipStD+HOpwQpaXYeU6mFES0hiBYHuz6v9gQgvLrzkxSZd4QPVWSK0kgC+6FgR UHbaczObPkDGfj1LAaLYTfQ7o8+oL7nxcOo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool is a virtual machine manager that enables hosting KVM guests. Kvmtool emulates certain devices like serial port, RTC, etc. essentially providing a virtual platform. This patch adds support for kvmtool virtual platform. Following is a brief description of the firmware implementation choices: - Serial Port: 16550 UART On some platforms the 16550 UART is interfaced using PCI. Therefore, the 16550 Serial port library is dependent on the PCI library. The 16550 UART driver checks the Device ID represented using the PCD gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo to determine if the UART is behind PCI. If the Device ID is 0xFF then the serial 16550 UART is not behind PCI. On Kvmtool the Serial 16550 UART is not behind PCI, and therefore a combination of BasePciLibPciExpress and BasePciExpressLib is used to satisfy the PCI library dependency. The PcdSerialPciDeviceInfo is also set to 0xFF to indicate that the Serial 16550 UART is not behind PCI. The PCD PcdSerialUseMmio is also set to TRUE to indicate MMIO accesses are required for the UART registers. Additionally two instances of PlatformHookLibs are provided EarlyFdt16550SerialPortHookLib and Fdt16550SerialPortHookLib to patch the PcdSerialRegisterBase so that BaseSerialPortLib16550 and retrieve the base address of the 16550 UART. - Dependency order for Flash FaultTolerantWriteDxe makes use of PCDs (e.g. PcdFlashNvStorageFtwSpareBase64 etc.), which in case of kvmtool will be evaluated based on the CFI flash base address read from the DT. These variables are populated in the NorFlashPlatformLib loaded by ArmVeNorFlashDxe. This results in a dependency issue with FaultTolerantWriteDxe. To resolve this make the NorFlashPlatformLib as a library dependency for FaultTolerantWriteDxe. - RTC Controller A separate patch updates the MC146818 RTC controller driver to support MMIO accesses. A KvmtoolRtcFdtClientLib has been introduced to extract the base addresses of the RTC controller from the platform device tree and map the RTC register space as Runtime Memory. Signed-off-by: Sami Mujawar Acked-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: v5: - No code changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62161 =20 v4: - Updated to use XIPFLAGS to set no-jump-tables. Removed [Sami] Networking and EBC support in this patch series. These features will be added later as separate patches. - Use XIPFLAGS to set no-jump-tables and use .inc files [Ard] for NetworkPkg modules. Ref: https://edk2.groups.io/g/devel/topic/75081494 =20 v3: - Use correct terminology. kvmtool is *not* an emulator. [Ard] - Updated patch series to reflect correct terminology. [Sami] - Don't define bits and pieces you cannot make use of. [Ard] - Updated workspace to remove unsupported features. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200917#59552 =20 v2: - Updates to reflect review comments and support [Sami] for latest features emulated by kvmtool e.g. CFI. =20 v1: - Add support for Kvmtool emulated platform [Sami] - Add more justification for platform and [Laszlo] document platform maintainer. Ref: https://edk2.groups.io/g/devel/topic/30915279#30693 ArmVirtPkg/ArmVirtKvmTool.dsc | 321 ++++++++++++++++++++ ArmVirtPkg/ArmVirtKvmTool.fdf | 234 ++++++++++++++ 2 files changed, 555 insertions(+) diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc new file mode 100644 index 0000000000000000000000000000000000000000..bf008be50fcb96bbe4f559f0b16= 5a7a555b4cc1f --- /dev/null +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -0,0 +1,321 @@ +# @file +# Workspace file for KVMTool virtual platform. +# +# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +##########################################################################= ###### +# +# Defines Section - statements that will be processed to create a Makefile. +# +##########################################################################= ###### +[Defines] + PLATFORM_NAME =3D ArmVirtKvmTool + PLATFORM_GUID =3D 4CB2C61E-FA32-4130-8E37-54ABC71A1A43 + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B +!ifdef $(EDK2_OUT_DIR) + OUTPUT_DIRECTORY =3D $(EDK2_OUT_DIR) +!else + OUTPUT_DIRECTORY =3D Build/ArmVirtKvmTool-$(ARCH) +!endif + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + BUILD_TARGETS =3D DEBUG|RELEASE + SKUID_IDENTIFIER =3D DEFAULT + FLASH_DEFINITION =3D ArmVirtPkg/ArmVirtKvmTool.fdf + +!include ArmVirtPkg/ArmVirt.dsc.inc + +[LibraryClasses.common] + ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf + ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf + + # Virtio Support + VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf + VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice= Lib.inf + + ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibN= ull.inf + ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMe= mInfoLib.inf + + TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf + NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoo= lLib.inf + + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf + + # BDS Libraries + UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf + PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBoo= tManagerLib.inf + BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf + + CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf + FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltL= ib.inf + + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf + + PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProdu= cerLib.inf + PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf + PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridge= Lib.inf + + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf + + PlatformPeiLib|ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformP= eiLib.inf + + PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf + PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550Ser= ialPortHookLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf + +[LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses= .common.PEIM] + PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf + PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt165= 50SerialPortHookLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf + +[LibraryClasses.common.UEFI_DRIVER] + UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf + +[BuildOptions] + *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES + # + # We need to avoid jump tables in SEC and BASE modules, so that the PE/C= OFF + # self-relocation code itself is guaranteed to be position independent. + # + GCC:*_*_*_CC_XIPFLAGS =3D -fno-jump-tables + +##########################################################################= ###### +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +##########################################################################= ###### + +[PcdsFeatureFlag.common] + ## If TRUE, Graphics Output Protocol will be installed on virtual handle= created by ConsplitterDxe. + # It could be set FALSE to save size. + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE + + # Use MMIO for accessing RTC controller registers. + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE + +[PcdsFixedAtBuild.common] + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F + + gArmPlatformTokenSpaceGuid.PcdCoreCount|1 + +!if $(ARCH) =3D=3D AARCH64 + gArmTokenSpaceGuid.PcdVFPEnabled|1 +!endif + + gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 + + # Size of the region used by UEFI in permanent memory (Reserved 64MB) + gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 + + # + # TTY Terminal Type + # 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM + gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4 + + # + # ARM Virtual Architectural Timer -- fetch frequency from KVM + # + gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0 + + # Use MMIO for accessing Serial port registers. + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo|{0xFF} + + gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FAL= SE + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } + + # + # The maximum physical I/O addressability of the processor, set with + # BuildCpuHob(). + # + gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16 + +[PcdsPatchableInModule.common] + # + # This will be overridden in the code + # + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0 + gArmTokenSpaceGuid.PcdSystemMemorySize|0x0 + + # + # The device tree base address is handed off by kvmtool. + # We are booting from RAM using the Linux kernel boot protocol, + # x0 will point to the DTB image in memory. + # + gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0 + + gArmTokenSpaceGuid.PcdFdBaseAddress|0x0 + gArmTokenSpaceGuid.PcdFvBaseAddress|0x0 + + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0 + +[PcdsDynamicDefault.common] + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 + + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0 + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0 + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0 + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0 + + # + # ARM General Interrupt Controller + # + gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0 + gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 + + # + # Set video resolution for boot options and for text setup. + # PlatformDxe can set the former at runtime. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640 + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480 + + ## Force DTB + gArmVirtTokenSpaceGuid.PcdForceNoAcpi|TRUE + + # Setup Flash storage variables + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000 + + ## RTC Register address in MMIO space. + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0 + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0 + +##########################################################################= ###### +# +# Components Section - list of all EDK II Modules needed by this Platform +# +##########################################################################= ###### +[Components.common] + # + # PEI Phase modules + # + ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf { + + ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectio= nLib/PrePiExtractGuidedSectionLib.inf + LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaC= ustomDecompressLib.inf + PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf + HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf + PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib= /PrePiHobListPointerLib.inf + MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/Pre= PiMemoryAllocationLib.inf + } + + # + # DXE + # + MdeModulePkg/Core/Dxe/DxeMain.inf { + + NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32Gu= idedSectionExtractLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + } + MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { + + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } + + # + # Architectural Protocols + # + ArmPkg/Drivers/CpuDxe/CpuDxe.inf + MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { + + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedL= ib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + } + + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf + MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf { + + NULL|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf + } + + MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntim= eDxe.inf + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf + MdeModulePkg/Universal/Metronome/Metronome.inf + PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.i= nf { + + NULL|ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLi= b.inf + } + + MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf + MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + + ArmPkg/Drivers/ArmGic/ArmGicDxe.inf + ArmPkg/Drivers/TimerDxe/TimerDxe.inf { + + NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClie= ntLib.inf + } + + ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf + + # + # Platform Driver + # + ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf + ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf + ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf + ArmVirtPkg/HighMemDxe/HighMemDxe.inf + OvmfPkg/VirtioBlkDxe/VirtioBlk.inf + OvmfPkg/VirtioScsiDxe/VirtioScsi.inf + OvmfPkg/VirtioNetDxe/VirtioNet.inf + OvmfPkg/VirtioRngDxe/VirtioRng.inf + + # + # FAT filesystem + GPT/MBR partitioning + UDF filesystem + # + MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf + MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf + MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf + FatPkg/EnhancedFatDxe/Fat.inf + MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf + + # + # Bds + # + MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf { + + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf + MdeModulePkg/Logo/LogoDxe.inf + MdeModulePkg/Application/UiApp/UiApp.inf { + + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf + } + + # + # SCSI Bus and Disk Driver + # + MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf + MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf new file mode 100644 index 0000000000000000000000000000000000000000..ebc82c5bd53cf98bc829c57dc09= 46b7a5854ca6c --- /dev/null +++ b/ArmVirtPkg/ArmVirtKvmTool.fdf @@ -0,0 +1,234 @@ +# +# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +##########################################################################= ###### +# +# FD Section +# The [FD] Section is made up of the definition statements and a +# description of what goes into the Flash Device Image. Each FD section +# defines one flash "device" image. A flash device image may be one of +# the following: Removable media bootable image (like a boot floppy +# image,) an Option ROM image (that would be "flashed" into an add-in +# card,) a System "Flash" image (that would be burned into a system's +# flash) or an Update ("Capsule") image that will be used to update and +# existing system flash. +# +##########################################################################= ###### + +[FD.KVMTOOL_EFI] +BaseAddress =3D 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress +# The size in bytes of the FLASH Device +Size =3D 0x00200000|gArmTokenSpaceGuid.PcdFdSize +ErasePolarity =3D 1 + +# This one is tricky, it must be: BlockSize * NumBlocks =3D Size +BlockSize =3D 0x00001000 +NumBlocks =3D 0x200 + +##########################################################################= ###### +# +# Following are lists of FD Region layout which correspond to the location= s of different +# images within the flash device. +# +# Regions must be defined in ascending order and may not overlap. +# +# A Layout Region start with a eight digit hex offset (leading "0x" requir= ed) followed by +# the pipe "|" character, followed by the size of the region, also in hex = with the leading +# "0x" characters. Like: +# Offset|Size +# PcdOffsetCName|PcdSizeCName +# RegionType +# +##########################################################################= ###### + +# +# Implement the Linux kernel header layout so that the loader will identify +# it as something bootable, and execute it with a FDT pointer in x0 or r2. +# This area will be reused to store a copy of the FDT so round it up to 32= KB. +# +0x00000000|0x00008000 +DATA =3D { +!if $(ARCH) =3D=3D AARCH64 + 0x01, 0x00, 0x00, 0x10, # code0: adr x1, . + 0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000 + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4 + 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64" + 0x00, 0x00, 0x00, 0x00 # res5 +!else + 0x08, 0x10, 0x4f, 0xe2, # adr r1, . + 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB) + 0x00, 0x00, 0xa0, 0xe1, # nop + 0x00, 0x00, 0xa0, 0xe1, # nop + 0x00, 0x00, 0xa0, 0xe1, # nop + 0x00, 0x00, 0xa0, 0xe1, # nop + 0x00, 0x00, 0xa0, 0xe1, # nop + 0x00, 0x00, 0xa0, 0xe1, # nop + + 0xf6, 0x1f, 0x00, 0xea, # b 0x8000 + 0x18, 0x28, 0x6f, 0x01, # magic + 0x00, 0x00, 0x00, 0x00, # start + 0x00, 0x00, 0x20, 0x00, # image size: 2 MB + 0x01, 0x02, 0x03, 0x04 # endiannness flag +!endif +} + +0x00008000|0x001f8000 +gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize +FV =3D FVMAIN_COMPACT + +##########################################################################= ###### +# +# FV Section +# +# [FV] section is used to define what components or modules are placed wit= hin a flash +# device file. This section also defines order the components and modules= are positioned +# within the image. The [FV] section consists of define statements, set s= tatements and +# module statements. +# +##########################################################################= ###### + +[FV.FvMain] +FvNameGuid =3D 8A91C08E-7D9D-4933-84D6-901D26D0766E +BlockSize =3D 0x40 +NumBlocks =3D 0 # This FV gets compressed so make it just= big enough +FvAlignment =3D 16 # FV alignment and FV attributes setting. +ERASE_POLARITY =3D 1 +MEMORY_MAPPED =3D TRUE +STICKY_WRITE =3D TRUE +LOCK_CAP =3D TRUE +LOCK_STATUS =3D TRUE +WRITE_DISABLED_CAP =3D TRUE +WRITE_ENABLED_CAP =3D TRUE +WRITE_STATUS =3D TRUE +WRITE_LOCK_CAP =3D TRUE +WRITE_LOCK_STATUS =3D TRUE +READ_DISABLED_CAP =3D TRUE +READ_ENABLED_CAP =3D TRUE +READ_STATUS =3D TRUE +READ_LOCK_CAP =3D TRUE +READ_LOCK_STATUS =3D TRUE + + INF MdeModulePkg/Core/Dxe/DxeMain.inf + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf + INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf + INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf + INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf + INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf + + # + # PI DXE Drivers producing Architectural Protocols (EFI Services) + # + INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf + INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf + INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf + INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.i= nf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf + + INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRu= ntimeDxe.inf + INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.i= nf + + INF MdeModulePkg/Universal/Metronome/Metronome.inf + INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntime= Dxe.inf + + INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + + # + # Multiple Console IO support + # + INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf + INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe= .inf + INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf + INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + + INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf + INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf + INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf + INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + + # + # FAT filesystem + GPT/MBR partitioning + UDF filesystem + # + INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf + INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf + INF FatPkg/EnhancedFatDxe/Fat.inf + INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.i= nf + INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf + + # + # Platform Driver + # + INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf + INF OvmfPkg/VirtioNetDxe/VirtioNet.inf + INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf + INF OvmfPkg/VirtioRngDxe/VirtioRng.inf + + # + # UEFI application (Shell Embedded Boot Loader) + # + INF ShellPkg/Application/Shell/Shell.inf + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf + + # + # Bds + # + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf + INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf + INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe= .inf + INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf + INF MdeModulePkg/Application/UiApp/UiApp.inf + + # + # SCSI Bus and Disk Driver + # + INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf + INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + + # + # TianoCore logo (splash screen) + # + INF MdeModulePkg/Logo/LogoDxe.inf + + # + # Ramdisk support + # + INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf + +[FV.FVMAIN_COMPACT] +FvAlignment =3D 16 +ERASE_POLARITY =3D 1 +MEMORY_MAPPED =3D TRUE +STICKY_WRITE =3D TRUE +LOCK_CAP =3D TRUE +LOCK_STATUS =3D TRUE +WRITE_DISABLED_CAP =3D TRUE +WRITE_ENABLED_CAP =3D TRUE +WRITE_STATUS =3D TRUE +WRITE_LOCK_CAP =3D TRUE +WRITE_LOCK_STATUS =3D TRUE +READ_DISABLED_CAP =3D TRUE +READ_ENABLED_CAP =3D TRUE +READ_STATUS =3D TRUE +READ_LOCK_CAP =3D TRUE +READ_LOCK_STATUS =3D TRUE + + INF RuleOverride =3D SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelo= catable.inf + + FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { + SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRE= D =3D TRUE { + SECTION FV_IMAGE =3D FVMAIN + } + } + +!include ArmVirtRules.fdf.inc --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65861): https://edk2.groups.io/g/devel/message/65861 Mute This Topic: https://groups.io/mt/77270953/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65864+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673280535286.72555055655596; Fri, 2 Oct 2020 14:14:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0qfoYY1788612xNHQ4HtWMZb; Fri, 02 Oct 2020 14:14:40 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.50]) by mx.groups.io with SMTP id smtpd.web11.5746.1601673278835257876 for ; Fri, 02 Oct 2020 14:14:39 -0700 X-Received: from DB6PR07CA0050.eurprd07.prod.outlook.com (2603:10a6:6:2a::12) by VI1PR08MB4142.eurprd08.prod.outlook.com (2603:10a6:803:e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:33 +0000 X-Received: from DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2a:cafe::91) by DB6PR07CA0050.outlook.office365.com (2603:10a6:6:2a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.18 via Frontend Transport; Fri, 2 Oct 2020 21:14:33 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65864+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT003.mail.protection.outlook.com (10.152.20.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:33 +0000 X-Received: ("Tessian outbound 7a6fb63c1e64:v64"); Fri, 02 Oct 2020 21:14:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e43040ed4ceacc7f X-CR-MTA-TID: 64aa7808 X-Received: from 80748d2aae27.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2D59A27A-7458-4DD0-BAC7-F554C1D2C614.1; Fri, 02 Oct 2020 21:14:28 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 80748d2aae27.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FIH77XyAs6bzUv1Lp0PO83MMR8twylNcda6w3LJfDhe5NGD7yxeuUx2cRjiYE0RCiL6U56KHWaaDk8f043IF+OTnJ09TxUHFJT2O7W2NxWC9QURe0svpJEWjT5kyKsN3W3NZrqNy1AD/+d/QGM0ELl0Ho28zLRE4xzq+cyNkDqmj7u5pJABxYXcvubYB9h6R74grP+VBif7Se1WfOQhDOOhWNSSVSIBcoRVfdwbBT2/BRtm9eG/Z6QrJi1VgvKl0yA28rN82F2J+w9Gl1M6FU1YHGnTXInZBZDJqgZaZj74cqfARe1E/rimMr2AYH32+qlzTSAkebhUWpsBU9pr/mw== 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=XJV75UJiH2A9Pvbpr5XxmQ0b1RzLG89Hm2Iv3f0bLF8=; b=DIWNvpnWHLCdwBdAo8aXxgF1P+ocKMXd5ShQD2+bO1OJPUktKz7b5OsZ//DM5nuiEsEN9FYeYaVRj9Rzy3KkRP0QzU4DXKQhIivwg8GqUP3hklvOKv+ubV1mLyagUaCe/4fF+RzCJG0sUME8btDhRWg05hkJGcndWeHrYTUHLtp3LUHu6cPBvDGBjWjqGIzECFqyGZzmxQ3MzJUAiaCNM9OVG00WOZC/zqq982OFLV3RX/h9TO66QEtdgDdksRcceLRredtHKoNVYCi4uP7VHHOou6goDx0Pft1NMK4TPxzsOVN34WUUFvvXpK25idXR8TBT2Q7qO0QleDXxBkatLw== 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 X-Received: from AM3PR05CA0126.eurprd05.prod.outlook.com (2603:10a6:207:2::28) by PR3PR08MB5772.eurprd08.prod.outlook.com (2603:10a6:102:8f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:26 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2::4) by AM3PR05CA0126.outlook.office365.com (2603:10a6:207:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:26 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:26 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:22 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v5 12/15] ArmVirtPkg: Package dependency for MC146818 RTC Date: Fri, 2 Oct 2020 22:14:06 +0100 Message-ID: <20201002211409.43888-13-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0892ec93-5b00-4f41-20d1-08d8671828fc X-MS-TrafficTypeDiagnostic: PR3PR08MB5772:|VI1PR08MB4142: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6M2+VgE6OkF5X+se8xyxgkNeE+3gCkShtN/V1lY4FvWstA49MzDZIaSMcZ5WNkKRdQ9ljMx1NcPaptGB6rBB/LYrA84x1JPaTi0D2qVs4QDeyBZwsg4O+e2tUqauu/yAuX0WvOaQcyhDGHwNMRluQ12wPkCQgtG5POJ3HqrdhrrF3IVV7s6qrtinspsXeBpV7L2KQyJ4DtEK3rq7IwjNG54W6JmPH7INk0XDtHckz4pkSgt9OjO9dcKaRoH7q4cRboFB01fAJLpmshvjoqVG3JFsA/K0Hu3WUsagzguDsRE3WOhGTCnTU7EamwwCbDCAwgKwtSLWQUnqliK7vDD2+TFLO3wxy4ihWfex2MjEcSgA49NL+ClxEuJqwgQ8aVP5ZWS3JFy8gstVYCKJXobdfl2s7oAQ67Qp2pJBXLk/PB7qX+qbDddQgQKwvJktxbvYE63im1zYnyOW3aKmm+e4iEgDsXElY36DBirkgdprS6k= 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)(39860400002)(346002)(396003)(376002)(136003)(46966005)(26005)(86362001)(1076003)(82310400003)(478600001)(6916009)(45080400002)(7696005)(426003)(8676002)(54906003)(83380400001)(70586007)(44832011)(83080400001)(6666004)(2616005)(70206006)(186003)(4326008)(316002)(47076004)(966005)(356005)(36756003)(8936002)(336012)(82740400003)(5660300002)(81166007)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5772 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: e00c7ec1-7447-4d09-3d50-08d8671824a5 X-Microsoft-Antispam-Message-Info: 0jkYsGCdKCCfGDd5VtD9Yc8G8YUj9qSVOEt7o3S0VV/CUHOUBaUTzN+kDMdaAnTvVpOOjfvNfZKHMOxvek5iA9zA8rVh15UhNiHJ8SAhCsrGmU0OfPzEBHpWBdB81UesqnVZBOYz2tuuy65RUUKtCUJDO1nRT5D0voRy6CKb1Y9cpJfZ2hKjK5p10eV0xXoUjx8glI+N1sB0dab9mLKlP40dWJW8fhB68Zq6qTXu6/3CYaDU/29yd26KCM4sjpXR6ACrntR4ayPKHpkeoGi4cEpS9DKtCHbFlp5VX9Ja5MC3fD7Wh6H2oaFJfn2rKUe6wSO0nXuFY/j7NB8AanNkKsX1TGa606zLbG8cZ7q6/qyT2VUcFPAOT1PS4N6yOJjRPJDKtTMrtICzbsykeHZGICpR7JayUzgbdRPq1+BX3TNFOVscBibvyt0mKRaQN5n+ZjQ+kgVy5hTHNOuDFcDqsngeaB6lIr/6eKZjnI20T0I= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:33.7343 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0892ec93-5b00-4f41-20d1-08d8671828fc 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: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4142 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: eEvFKa08h7AVOrgMOWYgSgnmx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673280; bh=AU9oYpDE0SUlSozEt2wmMtENl3AGSvoGzFS5SGV/ics=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vw8VgAVZMj7EjQH3uuB+6l6lxZgo32/yfnJjPvmLrbSjou8FmPCCFaktKFmzj8ksUKp aHXhXZZclFz0ffXi/RIhSEzUKXhoLV7glYqn5gLT6X8B97T9ba2bLvEXkVhWOD2XSEeN2 dpTqnsaDMroM+oMITiz31shD0GNXTk5Y+sM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool emulates a MC146818 RTC controller in the MMIO space. To support this the MC146818 RTC driver PcatRealTimeClockRuntimeDxe has been updated to support MMIO accesses. PCDs for RTC Index and Target register base addresses in the MMIO space have been introduced. The KvmtoolRtcFdtClientLib reads the MC146818 RTC MMIO base address region from the Kvmtool device tree and updates the Index and Target register PCDs. As these PCDs are defined in PcAtChipsetPkg.dec, this patch updates the CI script to add this dependency. Signed-off-by: Sami Mujawar Acked-by: Ard Biesheuvel --- Notes: v5: - Resolved conflict in ArmVirtPkg/ArmVirtPkg.ci.yaml [Sami] file header message after re-basing with master. Ref: https://edk2.groups.io/g/devel/message/62151 =20 v4: - No code changes, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61724 ArmVirtPkg/ArmVirtPkg.ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArmVirtPkg/ArmVirtPkg.ci.yaml b/ArmVirtPkg/ArmVirtPkg.ci.yaml index 8b2c0305c1756d9048ab4df316c3eba79a0ad2a4..bc44e95952e105876680247b979= 82a7c6d36b1a5 100644 --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml @@ -6,6 +6,8 @@ # # Copyright (c) Microsoft Corporation # Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020, ARM Limited. All rights reserved. +# # SPDX-License-Identifier: BSD-2-Clause-Patent ## { @@ -50,6 +52,7 @@ "OvmfPkg/OvmfPkg.dec", "EmbeddedPkg/EmbeddedPkg.dec", "ArmPlatformPkg/ArmPlatformPkg.dec", + "PcAtChipsetPkg/PcAtChipsetPkg.dec", "SecurityPkg/SecurityPkg.dec", "ShellPkg/ShellPkg.dec" #Is this ok? ], --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65864): https://edk2.groups.io/g/devel/message/65864 Mute This Topic: https://groups.io/mt/77270956/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65862+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673279491698.1987579948743; Fri, 2 Oct 2020 14:14:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id tGOGYY1788612x1BKQOVIN78; Fri, 02 Oct 2020 14:14:39 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.51]) by mx.groups.io with SMTP id smtpd.web11.5744.1601673277328932743 for ; Fri, 02 Oct 2020 14:14:37 -0700 X-Received: from AM5PR1001CA0006.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::19) by DB7PR08MB3706.eurprd08.prod.outlook.com (2603:10a6:10:7f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:34 +0000 X-Received: from AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:2:cafe::9b) by AM5PR1001CA0006.outlook.office365.com (2603:10a6:206:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:34 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65862+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT015.mail.protection.outlook.com (10.152.16.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:34 +0000 X-Received: ("Tessian outbound 34b830c8a0ef:v64"); Fri, 02 Oct 2020 21:14:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6a56cb48d925c729 X-CR-MTA-TID: 64aa7808 X-Received: from 80748d2aae27.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A8F87FD8-D5C6-4816-A2EE-E10D07F70526.1; Fri, 02 Oct 2020 21:14:28 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 80748d2aae27.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZDCHlr5gSo7fA8y1dfIllnLfCB4UnDTn1Na1OTx/aOfm7yqEGl5GAAXjg+8nqTB38bThIEbxO8sOlZlxwv9E8oY0k36ubjEkrH0lVnGykbxqMje7Hlj+/+4dTjniovfBbh72egkE3MCvHDlHPkNAkzmnep7YeV18UVix0lYx5XtDmBp8h/wDLqvMrCF8Vuadn4CrT1rvd12i5BC7T7plD5W1fzVvyMILq59YkK7fRp+uHI4WjNasjA1HuCSEzQq9MOUse0vFnwbopkXThdrRwDgMnri6Ib5XkpgOTc3V63tqnCkAIwCkxQ7xl4dRbeVtcAoi8atzYOABCE1t/TauMw== 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=SpQt68svwuLxLaeC+QseaLPGmuv2hpTAW5GUC6Py1wc=; b=E8eNDYzpuADCm5/85jC/wGqntKUnNVd/A91QoBXL0gcvimUfuIFrdQGEhCpvMLNUHx85u/4c0m2kH9eAxH3vHOx/A4uwBlSrllFtr9ul8HaJWqNc7yROaFyB3OG23iTa/A42+cIU0pUJDgi0O2/bBgJGgFN4FgFjgB/SUQOTp3bgFzrQC9zd6pggOZ/Oe7u6A1lNITrbY1korcFoDQXJXiLDSCJssp/6Sv8526vXMDz9zhz3Nj5CUJZY9WbyNqeJTcdrbe1KI95aofHEXKQ4xUowso8Y55Xrj/ESDPzJvwVkgsEU6IcZrKz4DwH2Hs1wT8Sm8lC+fP1UxY+sac+cGQ== 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 X-Received: from AM3PR05CA0126.eurprd05.prod.outlook.com (2603:10a6:207:2::28) by PR3PR08MB5772.eurprd08.prod.outlook.com (2603:10a6:102:8f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:27 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2::4) by AM3PR05CA0126.outlook.office365.com (2603:10a6:207:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:27 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:27 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:22 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v5 13/15] ArmVirtPkg: Add kvmtool to package dictionary Date: Fri, 2 Oct 2020 22:14:07 +0100 Message-ID: <20201002211409.43888-14-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7d952ebe-8b4e-48b2-6739-08d867182940 X-MS-TrafficTypeDiagnostic: PR3PR08MB5772:|DB7PR08MB3706: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: xs4DjNcTpDcTIihlB1G85oNWljMs2I7TB9SJNsNk9JCA06k+p2O0x39miDBRecpfILXBFN8eSNTjEAFyyGT7htxHO6ILTZnQ/LDV+DjE0ZAe1Z5LDq6Bed4EPZdmW9EbHqwzKv8qQgFMrTbeEpSuiGzfKamSSfwJw4EixdHknJtn1f9AkW4GcNBODOqgf81IIag/pYZi++IGKk9jKwkliWBmwq97EM6R0IyxG6WZ3Q/mG1nXkDNy531NPjW+l4A1g5swZ7Ql0R6eYXrl8BxDWVKO2doOXNejN2VuFAb+MAujfK8O9hN09R/iK5hNTMF1tY3zW6/wxho/KSyZTDPLO16rCLK9nFsE+5K54J7P/tsONgLNoQ9rNHskoR/+In5Ed1qgHHGhZnDFX0RG6Il7lS1sIq16urD0cYsFMmFh06/atA3Vqt5kPL9Mq+jkafXzAjBCjmqarqN44LAb5eN9Y1sGM6M9+uUJ/bgjRa5/5h4= 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)(39860400002)(346002)(396003)(376002)(136003)(46966005)(26005)(86362001)(1076003)(82310400003)(478600001)(6916009)(7696005)(426003)(8676002)(54906003)(83380400001)(70586007)(44832011)(83080400001)(6666004)(2616005)(70206006)(186003)(4326008)(316002)(47076004)(966005)(356005)(36756003)(8936002)(336012)(82740400003)(5660300002)(81166007)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5772 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2dcd5211-f138-4ae6-d262-08d867182535 X-Microsoft-Antispam-Message-Info: vJ7R+AKYglurubgAgL59PIUjrvGDHvyGiDxnHPkS/zj1xkwByr+DL+H2JZua4hd1waf8j1eqFjiyFzuUS9IRJAWN7YqwWLIKFO6XZGQSahhqUY7SRcfdxJDAeLgkc8pob2vv/WO8Qxk/a1MEGXkfN7CXitRUlVCfVACnLKgpfpMrSWYtin1TT8R8LYkns0ciJl5N5enfKj/tvxBoRci7NrxS7Fsw7xSrP64liSF/vduSsYqpLUgBFMjv8npoNSXkf9bQeTlV1zdUagOfuOrbiMKCJ+ZCSfgG2zCe7OBx0VJga63FSn2RzGXV2A+DW0KNWmSPBc9Qgc4sc+26gBftgJQj4VroBVtfoIGt7RS8hjBhF4BJCsgi8pTEroLjPA6WutG9iW4pveUzYFrPtZo2uQJw3/LHuFBPNPakRKgWF5eFcwFY0XvGtsP6uUlxU+CbuUKXLhpVgL85E8NgTRhfDtj//GoxQlRtWKYjnkoiY18= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:34.1258 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d952ebe-8b4e-48b2-6739-08d867182940 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: AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3706 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: C7Nl8xVWOb8iJz1dBiu9LT4dx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673279; bh=yKA8EL6RIgvz8nrWCWFsY19b71+YTD4m57sNxu3cJzs=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Vh8KjC8jEuvfRbcJ7u1GSni5gapBg/Flsy/+o+cnHvn3zJxOdKVVv91HwHOQz9pUH84 11Wb7pR1+D0G57Jf1v6VWvJzKhlbe2MD9Imu++/jj4KyCMOI1+YshtxMcKWi1yZNAcwdx JDfq/3iyE/DN0+6jKveHnjQj4EHMWntWzCU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool is a virtual machine manager that can be used to launch guest VMs. Support for Kvmtool virtual platform has been added to ArmVirtPkg. Add kvmtool to the ArmVirtPkg dictionary to prevent the CI Spell check plugin from failing. Signed-off-by: Sami Mujawar Acked-by: Ard Biesheuvel --- Notes: v5: - No code changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62150 =20 v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61725 ArmVirtPkg/ArmVirtPkg.ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/ArmVirtPkg.ci.yaml b/ArmVirtPkg/ArmVirtPkg.ci.yaml index bc44e95952e105876680247b97982a7c6d36b1a5..5f427e57233e316af653de911c6= 2b5ffa9c5e9ea 100644 --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml @@ -114,7 +114,8 @@ "unbootable", "virt's", "werror", - "xenio" + "xenio", + "kvmtool" ], # words to extend to the dictionary for this package "IgnoreStandardPaths": [], # Standard Plugin defined paths that = should be ignore "AdditionalIncludePaths": [] # Additional paths to spell check (wi= ldcards supported) --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65862): https://edk2.groups.io/g/devel/message/65862 Mute This Topic: https://groups.io/mt/77270954/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65859+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673276539208.7241166824009; Fri, 2 Oct 2020 14:14:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id xfxKYY1788612xjTofcFdsqa; Fri, 02 Oct 2020 14:14:36 -0700 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.85]) by mx.groups.io with SMTP id smtpd.web12.5585.1601673274637979916 for ; Fri, 02 Oct 2020 14:14:34 -0700 X-Received: from AM6PR02CA0031.eurprd02.prod.outlook.com (2603:10a6:20b:6e::44) by DB7PR08MB3835.eurprd08.prod.outlook.com (2603:10a6:10:75::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 21:14:32 +0000 X-Received: from VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:6e:cafe::2) by AM6PR02CA0031.outlook.office365.com (2603:10a6:20b:6e::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:32 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65859+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT051.mail.protection.outlook.com (10.152.19.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:31 +0000 X-Received: ("Tessian outbound 34b830c8a0ef:v64"); Fri, 02 Oct 2020 21:14:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2f8306426ef390e2 X-CR-MTA-TID: 64aa7808 X-Received: from 9c228df237dd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7BA96502-40AA-4B1F-9201-50BBBF4F126F.1; Fri, 02 Oct 2020 21:14:26 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9c228df237dd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFz5hCvzswGk+CVE3flnu+HdPXT3cqZr8E8p0GnjR53LuE9okZxAIXvwq2IXoKpnGtvt9d0ac5gkNm1x0OUmu9c/bBNPrHFL4PpK+/iukPpCflCxSbLtKrT/mXOuKXZoXw9hUiGRrYhhyS7c6s4aaivlblzB+vgs2kLOuxDnxzWyC1ibFmFxLEis2BzvOpvmRQmGSymroQRuZqSOSrFmK003VC4JO4L/5A5eTZUwZLD8+2FmjXZOt69Nw4GJKZtnSxoF9QIL+09vF7+qz/kDY4v5bavCxd+f47evuPIk+VhOFGgS/r/k2NbvYu0a/VH7Zu8bK4otv6rCaxsoLGgqEg== 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=kxFu55Q7hj/snaNwIba6tMmi9SS1Mg6tYdHhhr2y+DE=; b=hU/PbQqLdDVyvWq5S16CME1ljiEXDedcLe7qG3T0ZGS1153VOBYQL6dZw2NYuLbAqrTUZU/41Ojcd+X100t6ouXUqiL+Ne+B0pGzEQ7OFcIf400uyzrvRf4QSFXjTQ+wYxCaqYlAQdguSeFrVYnyslFZ1AwDAfE7KTiwrZkqFie9rqncFAZT/Os08tgpqgBv9SFV3ju+Qq0S2ZEM1r7R/ZLLMtbD+xibEn+94LrnogA3aLpTyUQU1+1MSXd0jg72DIxdWpkJVH0k3hUn6QzTPHIahN0UXcM4nRA0dkI4Vn04f7hrFcplYhizyP1HmNgQQJYUR26vqTLnr8PUc9LF5Q== 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 X-Received: from AM6PR01CA0043.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::20) by AM6PR08MB5207.eurprd08.prod.outlook.com (2603:10a6:20b:ea::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:25 +0000 X-Received: from AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::e3) by AM6PR01CA0043.outlook.office365.com (2603:10a6:20b:e0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Fri, 2 Oct 2020 21:14:25 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT050.mail.protection.outlook.com (10.152.17.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:25 +0000 X-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.2044.4; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 'XIPFLAGS' to "words" section Date: Fri, 2 Oct 2020 22:14:08 +0100 Message-ID: <20201002211409.43888-15-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: adcd3ed7-0233-4cbc-3be6-08d8671827e1 X-MS-TrafficTypeDiagnostic: AM6PR08MB5207:|DB7PR08MB3835: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:3383;OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ve286sUgeFpSRhiL85ZSyqRizBz20TA7sYlwlx+I5B2wroSPaZOlfK9G3cYKry8z8BYuNIEW5Kf6MCqYQM5lWotAoh3hvizqMW9deQ65q3pBV9lO3QXwnz2hiKDDgPAZ8fovnEsh7v8i0jW77QXrsRTQGzygYsOtgz+P/PdWrJtldv7AQlNEmXJ5hAamplYgkXjPo3xwl/OXF9fFHcjl20epAIW+kAAQ8MU5T4XOFmH9q3Xz6EtrqnXBsh5kZ8RyfoSRVchG6Exq0uK9L/b6yKHZkzA0gxhxpVjK05YDK9LbUlo9dkSFcG0sEcSRSUjoMampITDSLdM0UfByV9ofeCYBNhlYkFbTSQm6cwL2rJ5f7EX4ALvVc7oRgSyIJyMMudEvF/A5ceJUkoHG/v+fHEMt1Rfx0+rPI1IqZ4ZMUzYn/UB6xkRwBrsu4hgk5zHaXKRbpL6HEtpjSboaSoSq7TP1yW32tRQcPLJgjFb2kWM= 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)(396003)(346002)(376002)(136003)(39860400002)(46966005)(1076003)(82740400003)(47076004)(83380400001)(82310400003)(83080400001)(81166007)(356005)(6916009)(70206006)(4326008)(8676002)(5660300002)(70586007)(4744005)(36756003)(86362001)(966005)(44832011)(316002)(2616005)(26005)(426003)(186003)(478600001)(6666004)(336012)(7696005)(54906003)(8936002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5207 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 18dd30e4-7c9a-4b22-1571-08d8671823d9 X-Microsoft-Antispam-Message-Info: wKngqJTRwoUjWvhi9VLKtSuDKcKBuhWAag91DjBw7DFUOIaiuS2IIf5xTSZbJ77bIKbUZ9Ldzaan6/V8DIpM5OJzq+THtUZJMcJyQuIBmERdGPB5CjFtH2sGG31McO8EbDvDEKaD7dQhkNUgF3f44aWLJldsjxeeTjkJ3TgIWbGaRJxvUftvfNY9FP0xpQeKgrlq0MhCLqP2MCn4uPSBStArA79NpNZlPomVO5OJimjhmIYUSY+IUqoFEkidU8AAr6MN1RaCdGzps14wcYSJ3VV7c5UT1cUamAPpG3nTESril+TuLPaRFwO/cx4zy7v2sBHXiV2s0793q7OrGWIpXHqkXQVwvjKdgiB/jUdeDAhoWvvSjvWWU401de33uz9B4lHdB3RjwYlm70gjs8LNJPctd2XkIqbB9ZF97L3Z/jxzl6U4xGgKTLOx23GCyNMk43HuCAI4A/nmpsf/5TOh2ERBRvcjdJiKGH/V+J86Z+I= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:31.7770 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: adcd3ed7-0233-4cbc-3be6-08d8671827e1 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: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3835 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: 02kk9rrUQZG36eHZRxKSv13Ax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673276; bh=rY65ncfoQkEb2TmJdRdSueK8JXbrUPGI5L6Dtu7P8c0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XM9dSb6cOnb3Jz+v5TajZKWYo+vD6OGlYKD/jrv/ZjHU5PB89+nzBUQ1CYA4e/l5Gxf 3D11gTbS+uuIj6EaSkhPNOCuZNzMUaOsVPn0TblSZb2KiAdOqaf54cP0EYmXGojFqs92Z G9zhDlHdEprEUEQ5XuInt2CVdb7t+7F7io8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The EDKII Core CI reports spelling error for XIPFLAGS. The XIPFLAGS are typically used to specify XIP options to the compiler. e.g. GCC:*_*_*_CC_XIPFLAGS =3D -fno-jump-tables Add 'XIPFLAGS' to "words" section in cspell.base.yaml file to avoid spelling check error. Signed-off-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Ard Biesheuvel > Reviewed-by: Bret Barkelew > Reviewed-by: Bret Barkelew --- Notes: v5: - No code changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62162 .pytool/Plugin/SpellCheck/cspell.base.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pytool/Plugin/SpellCheck/cspell.base.yaml b/.pytool/Plugin/Sp= ellCheck/cspell.base.yaml index 1ce5f6991104b83e41e769299b23cb3fa74c46e9..ad6f7ac06ad18efcd4ab9c23463= 56dfd6885d827 100644 --- a/.pytool/Plugin/SpellCheck/cspell.base.yaml +++ b/.pytool/Plugin/SpellCheck/cspell.base.yaml @@ -178,5 +178,6 @@ "vcruntimed", "ucrtd", "msvcrtd", + "XIPFLAGS" ] } --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65859): https://edk2.groups.io/g/devel/message/65859 Mute This Topic: https://groups.io/mt/77270947/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 12:50:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65866+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673281592493.6406203446239; Fri, 2 Oct 2020 14:14:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LygjYY1788612xos2nF1Z1YS; Fri, 02 Oct 2020 14:14:41 -0700 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.82]) by mx.groups.io with SMTP id smtpd.web10.5611.1601673279264707384 for ; Fri, 02 Oct 2020 14:14:39 -0700 X-Received: from AM5PR0602CA0020.eurprd06.prod.outlook.com (2603:10a6:203:a3::30) by DBBPR08MB4757.eurprd08.prod.outlook.com (2603:10a6:10:f0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.23; Fri, 2 Oct 2020 21:14:36 +0000 X-Received: from VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:a3:cafe::2b) by AM5PR0602CA0020.outlook.office365.com (2603:10a6:203:a3::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.35 via Frontend Transport; Fri, 2 Oct 2020 21:14:36 +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=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65866+1787277+3901457@groups.io; helo=web01.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT010.mail.protection.outlook.com (10.152.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:36 +0000 X-Received: ("Tessian outbound 7fc8f57bdedc:v64"); Fri, 02 Oct 2020 21:14:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 836cb67a5b1d6aa9 X-CR-MTA-TID: 64aa7808 X-Received: from 086aac4b1b55.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9D98FF76-F4AD-4082-BAFC-23EFC8D99CF8.1; Fri, 02 Oct 2020 21:14:30 +0000 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 086aac4b1b55.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yy88BRzONy39oUtrYMknOfqVdYZsR8IXrp91OXODI1YG3VbLD1FrPZE6BkcjPWgQEEISAvHI84FAyCUtp185pABdo5bnbdEqHSHUa/JnxtpYbOoHxW2JRczcop4b1g0Xt2FMsS8691ywcm6a1FnW7rYztufkb+cfCx2mAkBCjRTkpYPQKqLqk5ho+E308xu7cVaQ6ZbzmIZaq0UeS0IU9hM9QjtpjsYfJX3fAbukGbswyfoDK6yyiaQnhUIFcMB1NBpELiqogz4m8yuNbfGPrL74xHt7GkQwKemDbpKsdN2AO9GrAGORrts1ZCAc/howCv7cu2+BbbR5KK+nYSzMqA== 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=bUBVcytghtTQHDJtwq8NN0wn2KfqPxyWgz8APSHdsQY=; b=G1AmpjrFl4c1eFkP9L9K9vrI1QT7CyIYRvCK8/Ju9kX8Z2VXgGnazoYwPg8EA98h2w5lfRLziAT8iFCplW+ZrUsBH8olkuH5F04Uo3iN5EwXOIPBUS3FxF42G8rEgJ+bIuCHtACP+A8MZev5wf5O+lakYQARdfVkM6UXbglOLmNgoAp8JhC/x/evIyBqky3gRrBzlj9LXBXQ3fuaiFS+I3gA+fZ1VtjJs9ishL5pz74C5yTxw/0H0oPydT9m8fGRVubDY6O9jSfZzhdF7hTGE7fEbYqIVTPD2/3P/DIpHlA6fJonJmpxBuUxWZIf/egRtelOj6+rbJh9G04p0WXNww== 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 X-Received: from AM5PR0701CA0017.eurprd07.prod.outlook.com (2603:10a6:203:51::27) by DB8PR08MB4044.eurprd08.prod.outlook.com (2603:10a6:10:a9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Fri, 2 Oct 2020 21:14:29 +0000 X-Received: from AM5EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::cb) by AM5PR0701CA0017.outlook.office365.com (2603:10a6:203:51::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.13 via Frontend Transport; Fri, 2 Oct 2020 21:14:29 +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=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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT057.mail.protection.outlook.com (10.152.17.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:29 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:23 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:23 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v5 15/15] Maintainer.txt: Add Kvmtool platform reviewer Date: Fri, 2 Oct 2020 22:14:09 +0100 Message-ID: <20201002211409.43888-16-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff631d2d-7b1b-4119-4411-08d867182a6f X-MS-TrafficTypeDiagnostic: DB8PR08MB4044:|DBBPR08MB4757: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: TRPFLcNxgO6PrWtuD5hncvY43rD/P8a1IPdbFKgNFr8IR+qOTYN9pLkMKARfiGlMIbBzHc194Lq9fIWGdKUjxxDC/ePjdBXl8pHqzk39RWNt9E3oBJ/4SI/xvtivqsnLYtjHhpe7s8LKr4Fl6LVbFIW36WwTCeaz7lAwnVScH/eohT2POnUkph4fv3q9jgflThC44Xk6ZNYW53a+aZH2HdUDhiz5S1+OhEtZROB1A9ZD+hgzTiDT1I9OBf2CvYpm+htZWVtJfHDZrMhOgYMeNzhyTmI4N9+nDzwCIhhPKGfzxjS9TUWfkPsFWkYg2/isnZgOcT7EIA1yRczU+IjOXejqkHf014+RI2SZN/uQRInm94UQUjJogLN0neup0v0XtTQcHimAKqa561X+R+p+ykm4TBLq1i1TBW3FM8p3Zb7s3O5Rx4qO9ftPeQt5R7qd1D8fGrWOuw4/WHh3VF1UohjKTlgC26Xq2M+ksETTQsY= 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)(39860400002)(346002)(136003)(376002)(396003)(46966005)(7696005)(8936002)(83380400001)(83080400001)(47076004)(356005)(81166007)(82310400003)(8676002)(4326008)(70206006)(19627235002)(70586007)(5660300002)(26005)(86362001)(966005)(82740400003)(316002)(44832011)(186003)(1076003)(54906003)(2906002)(6916009)(6666004)(336012)(426003)(36756003)(2616005)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4044 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: abe011a2-12b2-418c-236a-08d867182631 X-Microsoft-Antispam-Message-Info: Kk9HlrsMLOaFh6ezuPIPNfnBa+vqM+CvJL29IMRJWp4L44fP66NFq22awlmDi35ctLB/0/myQa8sslg2orHvuy8cxMS3VfMhJ42ewaEsXp6RCEQWMJV6pPMjLp2zs56dvpHp1QE3JFeS7IP156XEJsYlXkOlRt8VZydCRLOBsU1q005XwgJDAXX/Ax047Mnx9z4DGhcMK3ZCSf9VFN/fpstCejQTwSIhB51k57FvyT5+DMVcJtD4vZrgT8wbAlfSHEdxc0U/QXcEHKMQOpJdMmhNQeyDQshz3AASecS6E1EjMl0wJPKXSF5ZYt3rK/1TaEe80vo5ddU5b3IhEDxq2fnxdBM/v/WiUj2ZKOKsxTU+Q8udS2zMI4qE07t2nO7THvje6oH4zIeIURnIZl3uRRafD2gAHOB1/lYPyPE8omj0kZH9CbbXEeuVMOWAP9r7EQJ7nrn/Y3sBagasSMAiLb4n1ttq+XX6SVZ2VSlDxbr95buJGNBl/0N+HSjcCcynouSIHF3HUX8Jr8MI/SOz2A== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:36.0646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff631d2d-7b1b-4119-4411-08d867182a6f 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: VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4757 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: giSHCmnVkJ9fODiqAq0M8t5Mx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673281; bh=/NX6TGDdzTWZfbg5P+zzDmHUyieVgabv2zA1nXyJ29g=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=q2C235Rx+2W7tPcA//R1bRzXvJsy1DV2ajXGg6s08RZh31/XEsXb2vMyt9RLG+1fnWd nH/jl9CEzYLelAyqvyiFZj0/6Vu02BdJzgYRytZtTrx19brvOL95eXX4zwGIBJvkCdo5O dpMJgcgr9noJnmg483pDDmR/H48KCqC8lKg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kvmtool is a virtual machine manager that can be used to launch guest partitions. It additionally emulates some hardware components e.g. RTC, CFI etc. essentially providing a virtual platform for a guest operating system (OS) to run. A standards-based OS would need UEFI firmware support for the Kvmtool virtual platform, for which additional modules are added to ArmVirtPkg. Adding myself as reviewer for these modules as advised on mailing list discussion at - https://edk2.groups.io/g/devel/topic/30915279#30693 - https://edk2.groups.io/g/devel/topic/74200911#59650 Signed-off-by: Sami Mujawar Reviewed-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: v5: - No changes, resending patch with v5 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/62152 =20 v4: - No change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61726 =20 v3: - Updated Maintainers.txt to add reviewer for Kvmtool platform. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200911#59650 Maintainers.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Maintainers.txt b/Maintainers.txt index 6a22a14796358ab79a0e0c913b2dcfc7c3132ee9..34cff64def958fdb199b3ccf3d2= bc55acdd15604 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -157,6 +157,16 @@ F: ArmVirtPkg/XenPlatformHasAcpiDtDxe/ F: ArmVirtPkg/XenioFdtDxe/ R: Julien Grall =20 +ArmVirtPkg: Kvmtool emulated platform support +F: ArmVirtPkg/ArmVirtKvmTool.* +F: ArmVirtPkg/KvmtoolPlatformDxe/ +F: ArmVirtPkg/Library/Fdt16550SerialPortHookLib/ +F: ArmVirtPkg/Library/KvmtoolPlatformPeiLib/ +F: ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/ +F: ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/ +F: ArmVirtPkg/Library/NorFlashKvmtoolLib/ +R: Sami Mujawar + BaseTools F: BaseTools/ W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65866): https://edk2.groups.io/g/devel/message/65866 Mute This Topic: https://groups.io/mt/77270958/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-