From nobody Tue Apr 30 12:40:20 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+62139+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126108520123.95177397839609; Tue, 7 Jul 2020 05:48:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wiHfYY1788612xr7wxpYp5Rm; Tue, 07 Jul 2020 05:48:28 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.62]) by mx.groups.io with SMTP id smtpd.web11.15374.1594126107352017984 for ; Tue, 07 Jul 2020 05:48:27 -0700 X-Received: from DB8PR09CA0034.eurprd09.prod.outlook.com (2603:10a6:10:a0::47) by DB7PR08MB3435.eurprd08.prod.outlook.com (2603:10a6:10:4b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: from DB5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::31) by DB8PR09CA0034.outlook.office365.com (2603:10a6:10:a0::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass 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+62139+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 DB5EUR03FT045.mail.protection.outlook.com (10.152.21.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: ("Tessian outbound f7489b7e84a7:v62"); Tue, 07 Jul 2020 12:48:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a56cffc49d2fe60b X-CR-MTA-TID: 64aa7808 X-Received: from 8e46f20ab187.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EEE82068-648B-43E8-B489-E175F72AE60C.1; Tue, 07 Jul 2020 12:48:19 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8e46f20ab187.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TUfwNVUgkHEKPVxCLHxkZ+xogbZZyTdP6ZyE949UwDfLGHTMfEzOdIEdJUK5ZQNkltRpWK3Vj+2ZBIbvf7VkNXYh9bBn4xLo9uJwzRWjbsww7+S/PKW7meKfy56gBl7aLeJupwQFy9kfX3Oo1v/fE9tWaimdOglSOS68eKbpfPO/cjB9RetFBacg64YWjhCDtSYSLI6cIAu0ns0VQ6SzA43nahqb28D4VDU+lQn9AWAnlNcXJ0qNYCuyjub/fyWjgELwIUmiMdIunlyowT5ZQ/nSfVbrad1bHBBQ7jevggib1HfPqbi7zq+fyRKd0QdTSuvZ22ApIoiIDVfF7+6bmQ== 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=KyagVxLbtpphqVzF3FidDsWgLuwrows2+eiCVFsQtmQ=; b=iIVvWCUGzi/2ZW1j8BPrl46ImTTbb66SZP8Z+4FVXXmcOzGE/1YrZ4nZoG0B9vHTILOQSJcqtMr6Ly3srbrJVGHd4JJ6h7qHYl2kWIraC6vW8hL5WHDeFOuQLGg+/2pUqSXTN3ZMjL9+nS/7lLWmG/KtPHCdghVBLV8Us7Iqj5iJZcPd2zWAlPEbNnzKRxfzZboAsC8O1yqL69/1scEnxnvzAoeg87sq8GF/lKVvNRi1HKQ8nv+S8vN/ii8Rb9YC1rA8kLldHIYnK9F4zhE8UyCzDF7g0URlq4F09MTlz8xV5MGPyf5Ic9ZMP/r+fDiGbxtBbesnQcNcPauJwSHx+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB3PR08CA0015.eurprd08.prod.outlook.com (2603:10a6:8::28) by DB8PR08MB3961.eurprd08.prod.outlook.com (2603:10a6:10:ad::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Tue, 7 Jul 2020 12:48:17 +0000 X-Received: from DB5EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:0:cafe::bf) by DB3PR08CA0015.outlook.office365.com (2603:10a6:8::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT062.mail.protection.outlook.com (10.152.20.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:17 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:12 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:11 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 01/15] PcAtChipsetPkg: Add MMIO Support to RTC driver Date: Tue, 7 Jul 2020 13:47:55 +0100 Message-ID: <20200707124810.50668-2-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(6029001)(4636009)(396003)(346002)(376002)(39860400002)(136003)(46966005)(5660300002)(54906003)(186003)(2906002)(336012)(82740400003)(316002)(70586007)(70206006)(81166007)(86362001)(6666004)(1076003)(19627235002)(426003)(2616005)(8936002)(44832011)(82310400002)(4326008)(356005)(6916009)(47076004)(83380400001)(30864003)(7696005)(8676002)(26005)(966005)(36756003)(478600001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3cc9d445-df84-44bb-d6e4-08d822740996 X-MS-TrafficTypeDiagnostic: DB8PR08MB3961:|DB7PR08MB3435: 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: yPjSCZCuRntue35ivDGc2/JhsIEws2Isgl/fFx5x0REaLoS8seTh88WaxNeOYK7rYEqLjYW/nlto0t2dDSUYhWe6me0y3nWIs2KOHbrRe/e4aFXeYZNyrMsRpmoQQS7t3VBUvcA/obabsWWHftoKXBSNmg5nsWR8o1x1ZSJyzeTpQzdLTljTfuMR0XjS1QiQGouI+giKeRNYgSbTbpa0i5X8/vFkqHLUJw467tHpDdtUeYAXv8sSvmx4/FXJDHxiZPD6mPVxI5LbLSuytFgjDMxODIMfwvtqB0lXUy9b3Yv8AUuI4I37+GAVJeJ6KjjZh3xwt7nLRXkwSX+7W2DfaY3ntGZ/F89z5s1JPSEaFeVs5mE9WkBU8a9QPZ0pkp1i1eFfvpHjVmNsZ9rIYcDdEGCHuwyDzbp/i8Z0X94RQS0uMDXws2dd0ZOJDdsC76gGthipi0KuQG/zhZexXmhXroKmGHdpuwkw/YH75sU8HwY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB3961 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: af0059db-bf2f-4d62-17a9-08d82274051d X-Microsoft-Antispam-Message-Info: byrlM6VovEGM/jS/doD3YuSFMG6/vY0wrg2FA7twMmKAL3BZHAhCyK4n+lWN2TVYgREjU8WC/dyQVNpE8d+kGn7WPuNLvK81Krwf2VKOi5jKTCA35eSXDiPDfFOPodbW3djec+jlrVZ+9QqEzgg6LKs7Qzrqu2ZaBGtbZJgKgHCj7Lc7+p3f0U6whqnvQiRL9VgXRSXUDTv6g0EmR9S8KznIYxQ91cMxvoQY486fsxrzEYkquTm2s0pH/tJ1bfB0WBZ4FUx7hvJhrCz5+irCU1Hw1X2jnoHEagxdgkaPqVXB1BKvMm8wglNmOA4ziTttQzVUKQjBTdjhFv6pkwB8kqVvVQ5+p4lEZp+VzIVmpq4xVxfF1UPInMJkzi+8iPle6ctUukNTN2+6jdPZzIIay/aRznlPZj0hdsFYr6CiCp17u66dvX8RgXVUakjtItWGy2siMmHKNdueya34L3b0LAFfDZDfm7J44jF//ioXjxE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:24.5286 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3cc9d445-df84-44bb-d6e4-08d822740996 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: DB5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3435 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: cLAgbPqh7dWKBBQDz8ZFM54mx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126108; bh=dDIM4UcRko8x5MHPZdH2OxBtJaqx+HE5cMxhNo1d8BU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=L5XBKW1dJE7PvmdgXnIeDwMrzE1kCqFHJsBvbjj6d9qjIohs3SQWQZC773h+Xw3hW7p XLKig2sQ/oZnyyui6RTXkW7JfQpjNrrVvvWpKEtUxOojL3CWiTzzjbHJmxeRIm3mAXaNe 1xk57Ja3fky3zuYsD9nbcjSkGXBzx1Y+Y0k= 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 --- Notes: 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/PcRtc.h = | 2 + PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c = | 58 +++++++++- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf= | 8 ++ 5 files changed, 190 insertions(+), 14 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/PcRtc.h b/PcAtChips= etPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h index 47293ce44c5a1f4792892892f7da40d7f0a5a001..c1cb9466b74587233de4e78c0c0= d537ca6b66cf3 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h @@ -3,6 +3,7 @@ =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Inc. All rights reserved.
+Copyright (c) 2019 - 2020, ARM Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -371,4 +372,5 @@ PcRtcAcpiTableChangeCallback ( IN EFI_EVENT Event, IN VOID *Context ); + #endif diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAt= ChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c index ccda6331373bfe4069b0a59495b5e5cc731c8fc8..9c5f1ff169c80d1a9580d90336f= 162968b63bfa2 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 @@ -125,12 +156,17 @@ InitializePcRtc ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - EFI_EVENT Event; + EFI_STATUS Status; + EFI_EVENT Event; =20 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 (#62139): https://edk2.groups.io/g/devel/message/62139 Mute This Topic: https://groups.io/mt/75354083/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 Tue Apr 30 12:40:20 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+62141+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126114318334.8404828552442; Tue, 7 Jul 2020 05:48:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ypscYY1788612xwNM4Gluqkh; Tue, 07 Jul 2020 05:48:33 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.41]) by mx.groups.io with SMTP id smtpd.web11.15379.1594126112739085089 for ; Tue, 07 Jul 2020 05:48:33 -0700 X-Received: from AM6PR04CA0070.eurprd04.prod.outlook.com (2603:10a6:20b:f0::47) by AM6PR08MB3608.eurprd08.prod.outlook.com (2603:10a6:20b:51::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:29 +0000 X-Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::fc) by AM6PR04CA0070.outlook.office365.com (2603:10a6:20b:f0::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass 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+62141+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 AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:29 +0000 X-Received: ("Tessian outbound 8239f48e56bd:v62"); Tue, 07 Jul 2020 12:48:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: fed2551576e27658 X-CR-MTA-TID: 64aa7808 X-Received: from 115c847bc483.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5D6D0BCC-CA43-4391-B703-31FA4ED232C9.1; Tue, 07 Jul 2020 12:48:23 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 115c847bc483.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WERFsPfZukuabTht4d9WxwOCd8ClBxm7AlifqQA6qTrzLsa6lHfvAInca9HaCpFLsEBycNez25ll8mB+BkzIj9kw1wUni/RkBYj42rPzlvz9JPn5pWcCQFJJhFkIbvvKDn0FgCYg0s4yBHxzS2OLTHjbJ0kOPpRS5mCqTXrk8FYkYv23BBgD6q97AMdQwGAKey2VxEEuPWg8mqB5qYhPzXm7ZOIELzGBMpncJxTy1Tm5rWnO09LAyFPsyKxl1GrBHmNW0bQXbcDT8A4O5fyhlQyqHXFdPMKNjueAR7M9wDVNsGIHH7/ZJCwjhRlPZXzcHERitKXGr9VballkXycVdg== 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=3F+aLkSO/yDWtYzEHd9MiGwFrsc70tSNjdj8jRjBIVI=; b=CDNHVRlF3+/e2z5LEgVASqfeRVcdUDs0GNKCabH20KSJbtiJYIdg7ZnsD7IJ9y2V9cRqS0sY9me5bB4+Jv1mxeYYeumVRAjp6yWiw7/9B0/LJLEFc3WoQkQulWa2wtqYzgDtYthjcjXR7WGvqSQPMGmMeuqbKwPGZjjD7Y0xgusXnxhvKDcmp1cxVmOD3Lh9SVJXTMbYqbF1QEKxebrV/jkUomtlkdiZaQNwjH5OW3crTgKoShcMx7DhC4LrwvR81eq+MchIqU6aIEVQJYI7MrtLcGMCdE/Rbr1mxEPBylLoQevyLGLOmXMyGNYBVYgxsTQB5Cp7oqTjjYm5KmkiIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR0501CA0008.eurprd05.prod.outlook.com (2603:10a6:4:8f::18) by DB8PR08MB5260.eurprd08.prod.outlook.com (2603:10a6:10:e6::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Tue, 7 Jul 2020 12:48:21 +0000 X-Received: from DB5EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::90) by DB6PR0501CA0008.outlook.office365.com (2603:10a6:4:8f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT047.mail.protection.outlook.com (10.152.21.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:21 +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.1415.2; Tue, 7 Jul 2020 12:48:15 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 7 Jul 2020 12:48:14 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:13 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 02/15] ArmVirtPkg: Add Kvmtool RTC Fdt Client Library Date: Tue, 7 Jul 2020 13:47:56 +0100 Message-ID: <20200707124810.50668-3-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(346002)(39860400002)(136003)(46966005)(82310400002)(5660300002)(54906003)(186003)(81166007)(2906002)(336012)(316002)(82740400003)(70206006)(70586007)(86362001)(6666004)(1076003)(2616005)(426003)(8936002)(44832011)(356005)(4326008)(6916009)(47076004)(83380400001)(7696005)(966005)(478600001)(8676002)(26005)(36756003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19de731e-c910-444f-1c55-08d822740cac X-MS-TrafficTypeDiagnostic: DB8PR08MB5260:|AM6PR08MB3608: 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: XNIP76BgGvMuRPrb1oi8GzihJzNINf35eGuW4B+x8YwW9vaE8fRx0BGoSRGHbZuwDwDsQM9MH+Ry/DW86z4Bgy0DaepgC1U24d6OoHyAYdisDY1+7tEpcMOsBKYnpDN/uhRZeofkw6W1Wv9NgIX9SztMffLKk0bhgDB7CXDe26/0LTNm4rlEd9bQtXdJBn9EfaHooXTKMIP04ivFuj8IxMiSeDOYHE13iIkpEu1ShrwXRmcn3NUwgFlHdPsrtRTJY5E8jJC4e0fNqMHF5pNtytXsdqW1Stlf4LN997Vx2YeqD6s+JI7RjKVvUlpwclFIVH47NEdQlqjhN4hsalmnK1h6BwQZHa4LljbpRlhhH1rHatNTeCbhuzs9QzfL4DPvaPGrEkpEIhd59hIo5Ku7U10h9gkxqKyc5lk7uN3XSJ0bmRiIFgFKJ6Tqr/deiYNhUU2cxID7nBeYgmdLF53nUf+qn8a2Bjs9RJ7KL5omjv8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5260 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ebc755a9-b32e-4ba4-e260-08d8227407b6 X-Microsoft-Antispam-Message-Info: xVfVC7NkvWK7KTyhqaDjnO322U/p2JhiGhuWl4hKIOSSEL5KkUpZlLQtDglnbBZ69Ksz0mbrd8RBmJkA2EmveqSIMadyx8tlTDel+XiTBWOxT+81h06xfeLh1f4/F+8/ntCG40MtEKAW+Ga54F7DAgt8YL+gV0IOpxqTsESovr7vZvM2xhvy2qlCYqtErff5hLfsTE70snhIgRMcARTRdlycDY8gWM7iyKlYWGO9NUlNfxLtLT2agt8W3w4jeRtnbustLlPeQEpqYYathvGlWpDQAXMkMVpvowJPrFgdrpr3GhqFjljk5W67+lpEbvhAV9Z7liLBKI7jhXm8OiZ1o6CXysVRxNhz6+YS+4Z7QmEz0X6WqFY9YdoLkCX1ungruLVUSNUyeIrutkHZls6ikGBdgbqY6TT8Njh9ffrcBO04FnGhQEyOI+MK96XRCXjUPVZBbfNAUm0AKNDEqn/Bn5nF7/Ewgq21FFM59yWecrU= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:29.6283 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19de731e-c910-444f-1c55-08d822740cac 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: AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3608 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: 3438yJKfdHwYd4N5zKDaGSk0x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126113; bh=YhsTp6vDKR7Em9DlDSur+/k9D+0m4q23xtnX1R/5fj0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=qBNY0sPWqQIMWSU47NV57hFa+LFckkHdH65nigVR9PyV2bSpZJs/q4V2EkTYIXPFERZ Og5hA/4ClUU6XqaHiHN9v0kgznV1H3IJb6pynOVJG9h+JAZTfWGckNe418ASHpEKvQNBN miuvqeDN9VTiRDocFWgwCkkAuScNe5tvkj0= 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: 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..0d1b27997ed00d7c1be3578cab4= d1d2eba663a90 --- /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 (#62141): https://edk2.groups.io/g/devel/message/62141 Mute This Topic: https://groups.io/mt/75354087/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 Tue Apr 30 12:40:20 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+62140+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126110812335.3816982002925; Tue, 7 Jul 2020 05:48:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IPVfYY1788612xJJyiohdI9J; Tue, 07 Jul 2020 05:48:30 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.57]) by mx.groups.io with SMTP id smtpd.web11.15375.1594126108438702636 for ; Tue, 07 Jul 2020 05:48:29 -0700 X-Received: from DB6PR0301CA0005.eurprd03.prod.outlook.com (2603:10a6:4:3e::15) by AM6PR08MB3302.eurprd08.prod.outlook.com (2603:10a6:209:41::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:25 +0000 X-Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3e:cafe::b9) by DB6PR0301CA0005.outlook.office365.com (2603:10a6:4:3e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Tue, 7 Jul 2020 12:48:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62140+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 DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: ("Tessian outbound a4b10e5b482d:v62"); Tue, 07 Jul 2020 12:48:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ef8239474847b150 X-CR-MTA-TID: 64aa7808 X-Received: from fd2f740d0a17.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C124450A-AF35-48AD-B64F-BE279AD97C50.1; Tue, 07 Jul 2020 12:48:18 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fd2f740d0a17.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gVtzclnDXj/B/yvpJI4W8Lf8Clv9117umhw6CSW5hlgD/9yGWBqAKTGpcUFUvPtUJBR82W9zgrOBRoTeVOHDZlgPDolwLXLcVUdpHpjTazA0UlOBQhVpwq3lnbmH0mvujweDCb/ROG1x1C4nsfAcB/NH2nNNmrokop94ECHvx9eNceFERJInyObctHcV+M3IpnGDCUmhvsrQTOg9bcDlxedBcLitnIBusncwSPABsRSSPY4JkcBC8MCzooE+QIYb8jUnelnmMsLHpwXDxcwU0Ut0DGeUwrQldmxspNRvkoqeM/J/RIoCOG6EihnG+IysmMuC0dWvBs3Oo9EuJU5rMg== 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=5JZzRL5Y2nrgz7TJj+Sp4KlqiRcX+FJnhkrBs1YDxwA=; b=afozqbQTdbE9862jjpiPY12bz8cjJ3qBPgcenC8BemacXfyOhA947O5RrP8oe53coLXB7pz3JDIy4mp5t3eIvl+FfyA3WnYc1A8lFeSl4WYdAV57Y4qEEHe50osLmr07KTwrh7o3s64lerYA6aLS7JO3yUViVYhxDkOGkW+cooKnBNL9xT0ERp+7vYs6juBcVEbOQwG/wgjFOuxs1tsRiKfcWuuMbZwu77aOd+liDrHLprpo+dJc8rmHVhgCsOiWbINeCxUhf23w95DsMv+RStZsolVIdJWXE7Su2K/ZxLitzbl3UcoVdzyJubCnJfBOStB6AZ1v4Yw7mweP9ti8zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR0501CA0006.eurprd05.prod.outlook.com (2603:10a6:4:8f::16) by VI1PR08MB4192.eurprd08.prod.outlook.com (2603:10a6:803:e3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:17 +0000 X-Received: from DB5EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::f5) by DB6PR0501CA0006.outlook.office365.com (2603:10a6:4:8f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT013.mail.protection.outlook.com (10.152.20.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:17 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:15 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:14 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v4 03/15] ArmPlatformPkg: Dynamic flash variable base Date: Tue, 7 Jul 2020 13:47:57 +0100 Message-ID: <20200707124810.50668-4-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(136003)(396003)(376002)(346002)(39860400002)(46966005)(316002)(8676002)(2616005)(44832011)(6916009)(8936002)(70586007)(478600001)(81166007)(5660300002)(82310400002)(47076004)(82740400003)(70206006)(356005)(186003)(26005)(4326008)(83380400001)(966005)(36756003)(426003)(6666004)(2906002)(86362001)(54906003)(1076003)(7696005)(336012);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5ad738f-44c4-4936-5c04-08d8227409ca X-MS-TrafficTypeDiagnostic: VI1PR08MB4192:|AM6PR08MB3302: 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: mlTdjUzNvpbzSCrRDw4cnPmFzdL2MTfqZ1E6QYMCZMb8iXrgR+BwNPCpg0ExqKm/6Mn/B7Pwzk3Ruqs+OqwUhogmlIsmHoz07qIJSrnlcp2WADr+O3ZHikIMYv5MqOgvThtGLjYywMIeiAqeFmODAfp00keRCLMjKZyG34wfEQtBAYdXqAvTbzNoHBWVIKyRXtNMXbzHemh5Nk4vgKIFXMDoWPE/VBIiYd5lM9Tbrw6oXjkZWy/BaxjAUyR22OcQwQLHlNjQzxWd4k2XXUD1wTJQrb4MLNeaBe5A6VOXylwHQvDVM4jDAsscAPQeN0trI4/0WWqW8UWk/fQhKblhdvvl3fIilVpnOxUmSYMCE4n30PA6KnFA0Spq1Nh015KH/oKToKtDVzdKiRGCoX2p3PE3uLLFajunV7+5ske70k8ro1NByVC1tWgkzgLLgKPGRib3CeU3pQJTTGH/T/8Y96JJuhB/rPMUAy7fVnfaRjQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4192 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 60f4b974-5aa1-41f3-f6eb-08d822740540 X-Microsoft-Antispam-Message-Info: DQzETFChtIlTbM5GlrFCToy3FPiL1VuzhqD/CcglejaMqHckpznb4RF+zyKTIDhtz4t56WsATdUpPgbc2gym5hVGzvpHItA3LM3TagKEFACTul/I7vsXE2fC4SnucpN/u8HKgsVMX+lFkAABWCzIrGW+s87IvHPAU9+lh+siIxu+qiKcPkQbsg+JVRC7McKHgwdhlECW86PDhyK4Yh7A2vEUNgvo9rmz07pV2zORi14AUYLk1GXIEbBrcU8pKTwY0MS5yZFlm/TXy5Lp8gD91+YNpkOZfC4LeqD30Uog5l0wEKZGjrWRQQlWfzIhOKv5MrXwBcjVgMdfm4p9uv5Czw1uVVAHNVzT5o5+IhUagH4eMG69LYFwqvr96CkkasjK810dtF1zmqD+JDHsGpDYjZZn2QqXm033DOHiltwsoc0bfGeJNFDbo7RJW8mIeP7ghW0hEgDgGMHAVK7u510jdoHRv8pOSN681wUiECq5aoY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:24.8672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5ad738f-44c4-4936-5c04-08d8227409ca 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: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3302 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: ormOPjMX1lZsFjg2hMFhZigax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126110; bh=LFVPMLWHdlES6u1qJ1f2rlBBOg0ja2e7Nhq4iX5DU+c=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=VRwwOcM8ofZ9umnbyKY48KrAmYxDw/l6fB02C8u7wIpPjShBVEjgbcJr8eZFC26n3HZ +gThSOk/8lT7Ed2DPuMxYaB4xDqqOVQmi0eMlDjZDZjp6TeHtc7MQ3UjjodtUKoysHKW3 buJWRUc3HFCbuYjlayuPs4/067VgVxTQAeg= 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: 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 (#62140): https://edk2.groups.io/g/devel/message/62140 Mute This Topic: https://groups.io/mt/75354084/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 Tue Apr 30 12:40:20 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+62144+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126120958804.7526085428193; Tue, 7 Jul 2020 05:48:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dYiQYY1788612xAI22twaxRi; Tue, 07 Jul 2020 05:48:40 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.63]) by mx.groups.io with SMTP id smtpd.web10.15414.1594126118916490589 for ; Tue, 07 Jul 2020 05:48:39 -0700 X-Received: from AM0PR04CA0034.eurprd04.prod.outlook.com (2603:10a6:208:122::47) by VI1PR08MB2991.eurprd08.prod.outlook.com (2603:10a6:803:40::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:35 +0000 X-Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:122:cafe::d9) by AM0PR04CA0034.outlook.office365.com (2603:10a6:208:122::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62144+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 AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:34 +0000 X-Received: ("Tessian outbound 4e683f4039d5:v62"); Tue, 07 Jul 2020 12:48:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 83bf28f6431ebb03 X-CR-MTA-TID: 64aa7808 X-Received: from f9979dba50a7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D001F31F-FB6A-457A-9C02-936D68BDB469.1; Tue, 07 Jul 2020 12:48:29 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f9979dba50a7.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hMAhHa4ueeqXnNAlxWX9zTExZFxg8cV9pJkTERFeoiFbSTHf+CYcD0iYExO26HLqqKCStYh8NNoyG4h1AIuZa/vA4vsjFpWFcgZDwKIvS4vOOPX+KjWcvKEdEPKUKhZO9DKc9DC90XqU7XUU6muadcIaLHzFpad0pNy+4JVpgW6WnuPrDPjnTZluQ85fpwh6M2ztEm//nfChqNjcXl98IDTSw0eklDYhKmWethJw6DEe+lNKaprj0qJ4H6qcHOgG79AsQZ0iMyyTWGNFK51PtQg3sBQ8C/oS+729v/g655jZSc6xvxqu7xNCOmxQW9W5D2JC/EaG/XksFwawUeBjNg== 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=P8Otagvp3ypQZKfc/MiDAtEPo4TYAfv2FMfF0yduPU8=; b=gi7PZyD7AQK63Cl4yZJI85vj/9M3TxXbyk2ZnXrrjkAkGUt+pA95Ct8hw6Dxzglrr/9cTxUdV7FvfNQBuzoE5UQPEkT0Pbz2f35vZPJ6tig5umDGmzfZ2gOTDj695FR3w5r2eXYW6czfBBBx75V2WdtNH8/PmmHJFwk1eH7RZcIqgMeTnDAeEmH99ST5EdoDAvkKpUED4DdYwRSkALHHOV+vfV3ywgLdnHbFLrudUSkRJb0Kt9u43jSzDkUe/soQ9FC9n0IYzNywbkiIOXOC0XrXxBrW1Bs1uTSzO9wky/1xcOVSGGgx3hpp+8qbA1onbqJS3EH2Kk/oLUX3ah0tvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AM6P194CA0094.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::35) by AM0PR08MB3330.eurprd08.prod.outlook.com (2603:10a6:208:5c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Tue, 7 Jul 2020 12:48:27 +0000 X-Received: from VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8f:cafe::a0) by AM6P194CA0094.outlook.office365.com (2603:10a6:209:8f::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT053.mail.protection.outlook.com (10.152.19.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:27 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:16 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:15 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 04/15] ArmVirtPkg: Add kvmtool platform driver Date: Tue, 7 Jul 2020 13:47:58 +0100 Message-ID: <20200707124810.50668-5-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(136003)(39860400002)(376002)(346002)(396003)(46966005)(6666004)(70586007)(83380400001)(26005)(36756003)(8936002)(2906002)(1076003)(8676002)(6916009)(186003)(81166007)(356005)(7696005)(54906003)(316002)(2616005)(86362001)(82740400003)(426003)(5660300002)(4326008)(44832011)(70206006)(336012)(82310400002)(966005)(47076004)(478600001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 879cbe3c-5974-4e22-712e-08d822740fce X-MS-TrafficTypeDiagnostic: AM0PR08MB3330:|VI1PR08MB2991: 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: PAF9lnUI33TiEen03sOe1ftwEo69Zi9IXLUjz3plIKsGjTTNqhG3SA89TXSx8vgHpqRUMFDhdjABGiCPXkPS/eHRTirq7TE/eaVdXLY7KsXv/xwuT8hnpUTGNFWaBgbuUdE2Kwg58AF+azfvjzS+14Fa0QUcXKVWnlaakj/j+6LvyDoeXjAkhdRi5V3eDJuuUaRndXguWhE4Dt69weL9p9gzLvMSjjW2Ec5E3VIKyJSTBEe6wJ3BY/fnoCLbwC/U3apgB4rj13tJUTFeR3W/8nvu3vQxWQumq+IbxckwdHyoJ1O6IAbGmVEAMqbe/i4Bh5To4CO/KIEpaSFD9+s8Lxj4FZRiCA8FNYBMSCuSdE2Qt284qHsu6iYvuEWuscb2vhTGUITvd6cyh4HZ7xIw006q+vYive73ry8CKOpKAxavzThyW05MEylDLFZrxLjndp8/GSqySoYZHJunJhB/3DDp5s12ogMHyeQMtHRWZWI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3330 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1febec2c-edd4-4814-d531-08d822740b41 X-Microsoft-Antispam-Message-Info: 7S5vYag8ZIpHM2pHOuTsBaRjZjlQ08eTqYnKCD6TRaAB3JH+ZrD0KoUykvfPtN53326o4B4ZWduw0YE68bD68NMnHg36YEpZX4qT2rQpPnG7TLpb4MGTCdruDdZQB1AkjkoZIhzuhtLqDTk8cMsjI4NTj4P5vX1IZzIEml6kKcN6WkHpiP0dNLylXnaDjaBEEWdWYwiLcuQtzeMUp5vnH45N7RbHN/vgRQbomyTWakZXI7Nvh+Dp0IeV49+MzpzFk44KnXspEP9H1BWbBLDAwnUdmn8LsMQFBy4RJYZs+weUw1WwidvYU8oAEVWeSu+mtbrak2IpJCw1ADU20k/0Fm2WtGClNPT8Xfd0oyn1cgL3dLdfoFxIPdjtQGzrq6+7yS6Y5d9JFFhd/81UMBIwM1kNK7zXEDzn2KLhqDrE20ig3BePt3PhLOg4YXA697U8yCbWstYf68W2ahRV5LF92+W7GHxd01UUlTyr6EzC3Ak= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:34.9024 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 879cbe3c-5974-4e22-712e-08d822740fce 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: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2991 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: WBX65CLM194RwyJbwAmuDJWTx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126120; bh=L6WKCFLZqCRwyNpzcNxKjD+wwdW+yemh+RSez8InVcg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=v3AxXMCGkItDMyTROITEAAeNanZCnM5Gwe+3B9iSfjVNGpgoFU602KuOJLIUx31Rtuh ODhOKQcBAi32t/akbMP69m3SuL//i1BVbpQYVsHt85oWZUlkPPx7DMhLCd+KEzV6Yc4/K h8PoK2iQJTUArXgRMiaVrL3A8zr66AtxbIU= 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: 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 | 44 +++++++++++ 2 files changed, 126 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..05087178cc0fa3f7b414336861b= 39cedec48b68a --- /dev/null +++ b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf @@ -0,0 +1,44 @@ +#/** @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 (#62144): https://edk2.groups.io/g/devel/message/62144 Mute This Topic: https://groups.io/mt/75354091/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 Tue Apr 30 12:40:20 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+62145+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126122120517.653536122938; Tue, 7 Jul 2020 05:48:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id vzqNYY1788612xL7Y60J5ZEE; Tue, 07 Jul 2020 05:48:41 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.85]) by mx.groups.io with SMTP id smtpd.web11.15382.1594126120807950686 for ; Tue, 07 Jul 2020 05:48:41 -0700 X-Received: from FR2P281CA0009.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::19) by VI1PR0801MB2077.eurprd08.prod.outlook.com (2603:10a6:800:8b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.29; Tue, 7 Jul 2020 12:48:36 +0000 X-Received: from VE1EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:a:cafe::34) by FR2P281CA0009.outlook.office365.com (2603:10a6:d10:a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.8 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass 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+62145+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 VE1EUR03FT007.mail.protection.outlook.com (10.152.18.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:36 +0000 X-Received: ("Tessian outbound 2dd9eeca983c:v62"); Tue, 07 Jul 2020 12:48:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 13fa135319de1c00 X-CR-MTA-TID: 64aa7808 X-Received: from 5d1836d1b25c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AC1AD02E-0C6E-436D-82FB-E2C603F20E7C.1; Tue, 07 Jul 2020 12:48:30 +0000 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5d1836d1b25c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JWLE0XMu2K+DwSEfcn/3aPz2QXKVkcNapdlNk1m4sBVUjLT28HdpZI4mAQlCZW84bsEplAvZYKmA8znXVFFs9XqcAYKm2YJ8Uns6o06kVGWb2RUS9IzlW/HGsHF9UtJ72+sIfL/ns+rTmGaXRmzVTg9c9tKMGP8dKUctaNXSL4Bn7xF9A++LUlCa9HNpP8kvCp7gl37HfedBzWUQfu5ytlDejApeu0oDWHdmz/SaiR9k2IFtbaVoRQjmzkLxEklHyHmqBG9ccHv0MtSvf50MsfxHkEgCVHTiymm1miKvKp+3NBf1dUNvN7TwqQtC3E2QVgk521BsD1b+61WMJm1xiQ== 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=ISuUmMsefX5IsgSOtlJ4XTZT/QuX/hhcTvmCvZEEtgQ=; b=diErLUFMmSZcgHMtEQVFicu/9lU/Y0TeRwzaTKmoRgykJQ2oN2CFaluD8xPkUfPKvDEi7dE5IHZ7AgUAEO933VFDo5QyK95NBVGkh5BHOFap4FsqAc3U2h6ex1vgHLChPliroSx74qMas0Ar81xJhFJGg126at6YBB4HyfcG26DnOj0UMpr10Qis4IEfD5vXniBJeXsz3VQZJLBRF5Qf1Ri1PNB+6DeMpANwW6nVvNN1igZu0wf/gZeVmzgGWnjSucJv4Nc3Eky78OKIWhpm5Ber3qaiWDEIiW4abEuqWF2giArsG7+3GGiiWlCEOns0n+KbZtVRDPYTBgf0FIIR8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AM6P194CA0096.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::37) by AM0PR08MB3377.eurprd08.prod.outlook.com (2603:10a6:208:d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Tue, 7 Jul 2020 12:48:29 +0000 X-Received: from VE1EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8f:cafe::9f) by AM6P194CA0096.outlook.office365.com (2603:10a6:209:8f::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT053.mail.protection.outlook.com (10.152.19.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:29 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:17 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:16 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 05/15] ArmVirtPkg: kvmtool platform memory map Date: Tue, 7 Jul 2020 13:47:59 +0100 Message-ID: <20200707124810.50668-6-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(396003)(39860400002)(376002)(346002)(136003)(46966005)(6916009)(336012)(7696005)(82740400003)(47076004)(186003)(6666004)(316002)(356005)(86362001)(26005)(4326008)(8936002)(54906003)(81166007)(82310400002)(8676002)(966005)(478600001)(70206006)(70586007)(44832011)(426003)(1076003)(2616005)(2906002)(5660300002)(36756003)(83380400001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 397902f2-75c2-4fc0-84e6-08d82274108c X-MS-TrafficTypeDiagnostic: AM0PR08MB3377:|VI1PR0801MB2077: 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: bu/nhoW3dWvskjrybU9lh7OFosl8dr/abb/X3mecC+KgEWYsP3IS62CtUOHbq+q6lLwoVMf1JFnwoQdGELBu6w3YbBqRXyzIJ1s3kyRPBHjJ3c3KpmZqezTZcXT341wFCllnHvCiDwMRr5mgZIvP9134s/WyYkDrw2xhmDm4h9IjRbFK7q0vHlOvjOd3DK/V8se19k3ijFFrAjMvMGVbaWPRupfjlireGQKNgyebDk0PF14cKP9q2u1nIgYrVZ34Vtm7l2sx7VqUlNnkpuzARNJdo0FudLwaaAIk9LZ+h5gFkh8bEYcngy3eBzjEFycF5FrBSPt1T8XbHUxE+IDZkw0bVTnSJBgihhHPS+WVrY7BuqxEo+5QJzDcS+wjRB6mS5xl1lzqaPFmbfdQPT3WuCLOiutVoMuq9ZM+SrnuqLjES/V0LBrA9WVw7tV03ZxAA0hMwpRlSyzBz6F3qpHEsSOKDD1BBneoeQdS5DFUUek= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3377 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: bd3326b1-fce4-4138-b5b6-08d822740c59 X-Microsoft-Antispam-Message-Info: p9k3X6XmnqWViirLyBQxl2d6WEu76B+d7AdkT0XomBA209JZdFjfy2XRtPb4bL1LJLPCwcZQbzfy9y3QPqwQjZshUPFY0Q2iiXLSxtSSQChf34g5LQqxcOCCIkFHhJZX58tj8XFg9bVBOGY+w/v9lckS+DVnWAURo0ImLtY/mnxVMhWEyU+7iL7QPvU69bnWFfTFqb0qTrw9LvIGZYRMia28S3umjP9WIv50ZZbVEsgOnS3mw8FNE2qkI8McTNFLZWXkcIEN2jO4BzajorixqsDnNtnDdCZmHNzg2YGB/EAuTiuJuZZTTZNr1yfRmKQJGXpMtKR7p9tGaujlMIP5Y4MQcfOw9SXgmt/ZUazvIaPGIlxb/hdapPLb7+bDKefK5jKXfTbVPDLXVnm/vrcsFCxUpB/TTGxdgyitHh0Hf9+KWppQ9eeKUKt20mTJiCmRMj8JogZszipgvwCag5JjXkZGRWCN07EEwMU1WF8e/qg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:36.0980 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 397902f2-75c2-4fc0-84e6-08d82274108c 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: VE1EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2077 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: PluTgY9b0SLMZ6XJVJWuNQFfx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126121; bh=QnyCjSzBzDV2rd8UtLWHAKieoFWveDtr8+zJpXq27Z8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=eJR8ab1VjoHJTmTulfxu6JrbJ/pVCuBH41Fd0rL8uEYjkBeVwG8bI8Dd3dSRiE2YU/y f8OarRJ0OJdxcUjC8Cpoj76FYlpSnNyVoLxymCZejJro6dgMYvgXZImP86YVqaaYl88I2 vHqrlYGmYrljEcyCOIKOR/SJFu42pkAY9ts= 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: 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 | 96 ++= ++++++++++++++++++ ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf | 42 ++= +++++++ 2 files changed, 138 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib= .c b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c new file mode 100644 index 0000000000000000000000000000000000000000..50e805b252d7564ac4770162eb6= 8eddfc1153d4b --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c @@ -0,0 +1,96 @@ +/** @file + + 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 =3D 0; + 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; + } + + // 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..dbf4ceabe3ae0db5e743e1d9a57= 5542dca32ed0a --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf @@ -0,0 +1,42 @@ +#/* @file +# +# 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 (#62145): https://edk2.groups.io/g/devel/message/62145 Mute This Topic: https://groups.io/mt/75354092/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 Tue Apr 30 12:40:20 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+62147+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126123231134.67362265909685; Tue, 7 Jul 2020 05:48:43 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id WT9uYY1788612xSE8ZrSLA3l; Tue, 07 Jul 2020 05:48:42 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.73]) by mx.groups.io with SMTP id smtpd.web10.15416.1594126121557192991 for ; Tue, 07 Jul 2020 05:48:42 -0700 X-Received: from AM5PR04CA0006.eurprd04.prod.outlook.com (2603:10a6:206:1::19) by VI1PR08MB4237.eurprd08.prod.outlook.com (2603:10a6:803:fc::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Tue, 7 Jul 2020 12:48:38 +0000 X-Received: from AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:1:cafe::bd) by AM5PR04CA0006.outlook.office365.com (2603:10a6:206:1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62147+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 AM5EUR03FT035.mail.protection.outlook.com (10.152.16.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:38 +0000 X-Received: ("Tessian outbound e44de778b77e:v62"); Tue, 07 Jul 2020 12:48:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 54fb96f0847508ec X-CR-MTA-TID: 64aa7808 X-Received: from 0b5204447590.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F90E2705-16FD-40C8-9A76-B835211FB795.1; Tue, 07 Jul 2020 12:48:32 +0000 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0b5204447590.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U0u9Dh5gEQpI9dpaNTYMk0IuPr+QUbM+YU3hW9f92xoowUIXmYwb+R9OtzJvUBq1yt5wfU/mQdwswEYo13tLAP94e9Pxgsp7uMNrkpuR7QKChHF60/rghmnzJht2bymeh99s4LlsO/4L2nxY1DjzmyE9uFrrS/QVQwfplCAbkjKJfRs17uOA6Q7WQAk6+IJm6ISggh2jxd/+ya4j9AQ3CbXzBOvur458kcNKFWN83c7XmEU+iuXSUlfIzXVU3svk54tZrY8tGEUJjBe+vNEzvHF/W+PwUeTKQNh+0Nl4NvFtaOYmzhIwVeUyTgJgzTc7+un/jI19nzpEJx4K3RWDKg== 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=EVJV/7l+wqJ1xghSTUML5FZiEBpEEV84akp7GCOHhBY=; b=lqTlnB/bZfSk8EHR0WDa/XHino/Okg2jg73gkKm0j2S+fbycbxWFfVijGPwFi3dPvN5ahaT37ZikXzWM9zQfWZLwbdPaKMHp1usAVZoQUv8qukRDePLciexJRQMPZJ7fKMD1Ri8y8oU4daJqtqeXJgRUQgQQTlav8itS0JROK5xGgKBttCyrkBoS3JLAE5om8LA487B3p6xZyd/j+vs9b5J4zNMs8lmgLM7DxMi4DRZ2NnwDbaGQqJ9WPut3AXa1yIJbASmWa/2lzjVjueX/uLUwEtgSetZGNqa3FqUWDssXvoYZ+5BAFFd5WkGMcahm+G/kEhIcawSLpzRHMh2NKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB8PR09CA0012.eurprd09.prod.outlook.com (2603:10a6:10:a0::25) by VI1PR08MB3181.eurprd08.prod.outlook.com (2603:10a6:803:3f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Tue, 7 Jul 2020 12:48:30 +0000 X-Received: from DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::4d) by DB8PR09CA0012.outlook.office365.com (2603:10a6:10:a0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Tue, 7 Jul 2020 12:48:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT024.mail.protection.outlook.com (10.152.20.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:30 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:18 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:17 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [edk2-devel] [PATCH v4 06/15] ArmVirtPkg: Add Kvmtool NOR flash lib Date: Tue, 7 Jul 2020 13:48:00 +0100 Message-ID: <20200707124810.50668-7-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(46966005)(8676002)(47076004)(86362001)(4326008)(1076003)(6666004)(5660300002)(83380400001)(81166007)(82310400002)(30864003)(356005)(7696005)(426003)(186003)(2906002)(26005)(2616005)(44832011)(498600001)(8936002)(966005)(54906003)(6916009)(336012)(36756003)(70586007)(70206006);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af7c57fa-5436-4d89-59fb-08d8227411b8 X-MS-TrafficTypeDiagnostic: VI1PR08MB3181:|VI1PR08MB4237: 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: rs4+MQRCEclu52JEBF10e/2uCb2oNEdFX4fBtOXrazEjTkNZkQ5QDoQW9ChWpNBCSgrsVQEbzmoQOzsZayyLUyd9JsWU/0LBvb6BYub6XcRps01XP3V22ATuV3yPXfYd0OjGYVW7bzgK8NCuMfaGqTlVRRzTOr4agTCUMRW2fguCyCrKLGJ2tkXp8V6mlWHKySxiKMoZ6V+TcVLBbA83CEvEAE1y5Vg8Wce3JOCFnuPwvuLjeC86PcNfL1g54ZsLYzUpbEwCTVgNcrpdvH5Es5iP38jJwanhnN+PtNqKkiOtO2fzUHEw5YrJykP/h7Blul3U5ZRWJ8kXlgOZVnejSop44o7WdXJePLmaYkCyWh6HbEdQF6J5GdOn9h/Dcjt2nUAjgDDgQig/13ji8KQq/ybG1MysahNn+BxJebJaWBJaLnaW5Ktwo6nE5gurhJ0r5lGrD/fdoxOlgK1JyQnImDA0mCNdyMxbSNH98qetQu8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3181 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: d59bc337-675b-4eb7-896b-08d822740cee X-Microsoft-Antispam-Message-Info: oReW+M+T+HW3mbKIcamfjuBrpByWF4yJtLHTLD8lhpMNDK+6j1VdiyCCxx4NjBFLOp8dBPbj0jzzRp2wxHbgbztmxrxf9Zlb7sTPr4rXqZDeQcaFsfi97bMF7nn3VlQI8tzXq8WGIYKYMFXoWhNdL+PozmNu2AbGCmH4EEIvSXTAGGCRKPdvXe+XMhMQU0R/a5nGm42Gx4VQGzi4RGQWjSCX6aYojhkJ6h12itAtpJQI/RXBSCxDzuQQKtDWTKSDWTi2Jn6tlnSPbP13a4LL7rm7QC2DyNyyN2uHJ+OL4r2QWkDFTGhIPp3xZSxXXuKUG9SYTvyV7t09yqRUdpsgqhO+e7IR5t4zislcgOdzm6a3DeIZHOBHTQ8CtZAlrylEQfak/1VHFZWh60VrKhft0v7E44SkyJbALFqdqUfwRnf/oDlbfRqWAgki/q5p3SBNOFTQXuC/7CuPljbZF76+UUIB9HpB0PMArjAUy4Qa9v0= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:38.1020 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af7c57fa-5436-4d89-59fb-08d8227411b8 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: AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4237 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: 69V0gFSAOkUY19esBSRbQgnUx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126122; bh=AiY60VIVeAen3v/CKVhZUAr3G0gEmQftbqx3ec8RuJ4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=doHPVVj4MZSMjZqTBMz9b7HtIS3u6auQWv/4Y4umsAQz9ElLfr2DN4yH1iwVV4yyN44 GDyake7O5tDtETFwVjaZa88xue8d1fKHPYfcD/wl4/4XrhKDNbpAnjycmct0mvOyvDrrS QEBF293ik4hQBo8HDHnYOM1eg3tzhyCABoA= 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: 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 | 49 +++ 2 files changed, 385 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..a3230e4b2be668904322103825b= 93e867503984e --- /dev/null +++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf @@ -0,0 +1,49 @@ +#/** @file +# +# 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 (#62147): https://edk2.groups.io/g/devel/message/62147 Mute This Topic: https://groups.io/mt/75354094/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 Tue Apr 30 12:40:20 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+62148+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126125072440.82054809246347; Tue, 7 Jul 2020 05:48:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lDuuYY1788612xIP2Jqk7qPE; Tue, 07 Jul 2020 05:48:43 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.62]) by mx.groups.io with SMTP id smtpd.web12.15346.1594126122952800307 for ; Tue, 07 Jul 2020 05:48:43 -0700 X-Received: from DB6P192CA0021.EURP192.PROD.OUTLOOK.COM (2603:10a6:4:b8::31) by AM0PR08MB3940.eurprd08.prod.outlook.com (2603:10a6:208:124::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Tue, 7 Jul 2020 12:48:39 +0000 X-Received: from DB5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:b8:cafe::e2) by DB6P192CA0021.outlook.office365.com (2603:10a6:4:b8::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62148+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 DB5EUR03FT049.mail.protection.outlook.com (10.152.20.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:39 +0000 X-Received: ("Tessian outbound 4e683f4039d5:v62"); Tue, 07 Jul 2020 12:48:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d9c3cfa280727288 X-CR-MTA-TID: 64aa7808 X-Received: from d164a20aeea5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C66CE10B-6F36-4A5D-B247-E87AFC5BACC3.1; Tue, 07 Jul 2020 12:48:33 +0000 X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d164a20aeea5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rmpo4GRKlh9TnfkaICMjzPdAo2PhY4zfuviREpvMOd9ndU9T3xHegmZfVbayBtH76KNkzckUsX31tqY02C2nBA1Z4wsrovhOVoaU5jppZMStpK7pu6HCalb0Sj5gbsETHeC4DOFNmoqWVqhpO7PvIFhG1K4EIJIjtv4ZyZT4DRZff5ShS06PRax3Ukdf+QK9SE2/vSt/TZipOq+3DlEv6hJ97ODZhnxK+DfncRnmTcEb9PdKKHcvAtgbMYX5Trraxxak3Zxy7f7JKrozqwvprb11vceOttiuEFaIlHTqCRCT/3WsKrbqhhSEmj6nFHWlCen7VDAHDMioIb45yHszIw== 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=vawgJfhdgFJDkSUub6XW4LhZmEihAwHmgjV5SKupwVs=; b=b2meNl7rZjsfX0hdxvr2RiwrB4Jk5VzPQV/ZXyXh1C0m4vos5CAByMhf1dH0DPIvKdGvmoDeuahHwSZERHd6/ssmxtzR/ewxMao1nBOdcX5G4CsFQMonIkSeay+k6XUqUo6kMRx6ZDC9rNWG62kn8qbA91PgT1F0mIBXQwNLT+0XDdoaJZpQngcHEw04s9U0fBrwE2DMPE9NdUPnFjO7pLFkz1j0Wjwku4/Fl2NWT1hpVVaRsnimA3Ey0n6rjHl9owFhDCCQW0YCuF0t0GI5MdcuYtfCBnTcrW6BWYzBD+5mbSuQG4OpK6OVABcqmTlvYb/hENYdYrUAreTUzyyS1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB8PR09CA0022.eurprd09.prod.outlook.com (2603:10a6:10:a0::35) by DB8PR08MB5066.eurprd08.prod.outlook.com (2603:10a6:10:e4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: from DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::20) by DB8PR09CA0022.outlook.office365.com (2603:10a6:10:a0::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT024.mail.protection.outlook.com (10.152.20.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +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.1415.2; Tue, 7 Jul 2020 12:48:20 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 7 Jul 2020 12:48:19 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:19 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v4 07/15] MdeModulePkg: Fix constructor invocation ordering Date: Tue, 7 Jul 2020 13:48:01 +0100 Message-ID: <20200707124810.50668-8-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(39860400002)(396003)(136003)(46966005)(5660300002)(316002)(8676002)(478600001)(70206006)(19627235002)(70586007)(4326008)(54906003)(8936002)(6916009)(81166007)(2906002)(44832011)(356005)(26005)(186003)(47076004)(82740400003)(1076003)(966005)(83380400001)(6666004)(36756003)(86362001)(336012)(82310400002)(7696005)(2616005)(426003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29cec142-4f5a-45de-ae2a-08d82274129a X-MS-TrafficTypeDiagnostic: DB8PR08MB5066:|AM0PR08MB3940: 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: HYGnxPsai51Z4nScVwbIhafF5CGIfQvOYmKo7oxWpnOv3EbmDmvUUiVon26VtFEutBFozt4QANxG+69BAyPx4SeN/VLrAvNhCPEkVIeNzoW0PAAsqfIT2NALaz4ys5Pn9c6sI6bPoo9iDTx8UgGdaH3ZCdYt0DZik8CUUeS2tKjomCbROeA7/lFqOdlWMe6lKjLeOO4SX6/h7PUHh6G6OjWFV17xl7AzgLecRuObks6ccz1RFgxKHIHdpTdZ5xobr798lmrssw1r4PloCFMWjxPspyONf4myGunIhVkejY3PEVk3XtMnSWCCuLayi+V4WGuFGnhFYrnHe9h/yQdYUekS19NnzewOGdWBTPuns9Cezu7l4nQYRfiUGwcyzMqvao9JAbwIwQUizd3cm/ui2Zm1qzGsTKbOHkdfYATPzoB5oHV2skfv9Z7RpEuJiNLPkKW7IakbiSEktSz4D54HGYzcKy4egOgGY7F+Kicv7pw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5066 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f5e892e0-069a-4781-9512-08d822740e5a X-Microsoft-Antispam-Message-Info: NojlHobJsX4STd2I1fVeS6oqx2ZcO0JaxA8OsjQFBEF8zplWzM33PfFAT7IIihkI2U2mNZfWDwpS8Jum1Z1bLtq2MPIVF9A4vmYC4yIWQqjzcS/sTf1TYhm1eMApWHMxIppntX/GZtorEPqfOQe36ViZyJ/cjdAjLQxdhJ1OZ0mGdkK2oE62fD5MJGUt7so2xH/UdHxQszgj62+Uv01OkYscsmO+BOPKJ1rylA266Dq8JBT6hI13+Oq10WGE/ZGXN8wwG7E68gH1BmsZw0oiGs+cuuGVkxVHuHx6IrZpJJ6mGEZWg974Aq8dEHqfyjaql/+uGAmGmpZQb2WZOnHFEGyOtXI980GBEaQETCmxj8IMFbzKmqkWMtKdDYdZdslfg4nx5e3o7r+Jc+IRt7JSr4rMlvxYEdD/+xWIGHG2OWF14dp4Qwbky/3iCgsxyy8PQm+ZYwlLEY6rIk2OYFGv9FGU/DXdhhwhDxg7u5qsqok= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:39.6542 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 29cec142-4f5a-45de-ae2a-08d82274129a 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: DB5EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3940 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: CFgfI2xp9VOlcqSwE6ogmaazx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126123; bh=VDNdNXxdTC0uOuRU+In9U2AbL42CtRWYdIfo68KSvI8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=sO/lnygynYAzfUld+S2QccmDP0a/a+usnnXTrWWh0lfDB/Ix+rK1U1awcG+zr6DSnR7 AAFbO4rXsB7srTbeHifKKcBT2XgMbT0hvDlmX9ZBaDdKpsE0j4ZjeO2QUX7Ak8IYFd7An 76VvUaoYmHYHk23WC0TC8tRmYFDE7LgayII= 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 --- Notes: 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..0fd1382ee83c9de09d8250830bd= 9569056fcee2f 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 (#62148): https://edk2.groups.io/g/devel/message/62148 Mute This Topic: https://groups.io/mt/75354095/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 Tue Apr 30 12:40:20 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+62149+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126127649253.434661319812; Tue, 7 Jul 2020 05:48:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id FX4aYY1788612xW5FzlVGazi; Tue, 07 Jul 2020 05:48:47 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.76]) by mx.groups.io with SMTP id smtpd.web12.15348.1594126123458243300 for ; Tue, 07 Jul 2020 05:48:43 -0700 X-Received: from AM6P193CA0039.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::16) by HE1PR0801MB1804.eurprd08.prod.outlook.com (2603:10a6:3:89::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Tue, 7 Jul 2020 12:48:40 +0000 X-Received: from VE1EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::af) by AM6P193CA0039.outlook.office365.com (2603:10a6:209:8e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Tue, 7 Jul 2020 12:48:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62149+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 VE1EUR03FT032.mail.protection.outlook.com (10.152.18.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:39 +0000 X-Received: ("Tessian outbound e44de778b77e:v62"); Tue, 07 Jul 2020 12:48:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8e6eb3a58892bd2f X-CR-MTA-TID: 64aa7808 X-Received: from a47009b28f6d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B7C06A81-08FC-4376-83ED-489E62D8E210.1; Tue, 07 Jul 2020 12:48:34 +0000 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a47009b28f6d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N9WemzTqYqcfiDxUq/TolbeMhcmoWSFKGDAyq1QdKvpX+zHVc1ojiQtgA5F9/WTqc0JwkWxmFmbTZs6FglVkfel8zlUfYyMyMfuNB0QJ4plAs74v1wHuSqZ0KInzsqq5OqRmVjpvq34DD1LGeEcHpyrxUu6GRnNU+yfzkfaTk5ooC6XY7ftiifCs0mC3tRUY26X/t+GRgiDlbL+gMXm89PgXSlkZerqjXZqNggwgG6JJaS90YyEBettuimo0gBJ3doKeSUI5vJO0e3G4q8Mw6CfIVLjW9mHkB6QKZ7lVSK/AboRpsaGD/oZ/rwzjp1PjbN0QGdEbjuHbiEnKvxCRXQ== 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=5U3gX/vcO052zwcAtISM7goiVI3872AQj1/bVHfLT+U=; b=LARHNF7QclXz+7/x3QiNntKnQDaWgHzfAW3uKAZGa3CZUL7Vgz1KLshzKecBz9YV85a9y/lDRd059GpzNHxol3ZmZaiNrY0NAEyMcKO1PRWVJTg6DxQkt22/JndLr4VoFfg6v17Jt8J32cu30QkWSlSBfgQE+/7NMHxKLWJDH16i7ioX5YEsd1YvB6I0609TBT8xcIi2zYdP9JTSb3c+gqQ5LguAUvapnjs+Z2lh8eei4t8pqk7OqVRuSPxeY1JAHKRyrCzeFeL+j0tDvBetVZa2qgmBQ10Xmb69lCRs+YZpXHRZjDbcWJWTP1IGgbW6X+IYiMD6BP0V76omwOE+HA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB8PR09CA0036.eurprd09.prod.outlook.com (2603:10a6:10:a0::49) by DB7PR08MB3129.eurprd08.prod.outlook.com (2603:10a6:5:1d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: from DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::1a) by DB8PR09CA0036.outlook.office365.com (2603:10a6:10:a0::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT024.mail.protection.outlook.com (10.152.20.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:20 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:19 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 08/15] ArmVirtPkg: GUID Hob for 16550 UART base address Date: Tue, 7 Jul 2020 13:48:02 +0100 Message-ID: <20200707124810.50668-9-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(46966005)(81166007)(36756003)(1076003)(4326008)(966005)(70206006)(336012)(2906002)(6666004)(6916009)(356005)(26005)(7696005)(5660300002)(70586007)(186003)(82310400002)(83380400001)(8936002)(498600001)(44832011)(47076004)(19627235002)(54906003)(426003)(2616005)(86362001)(8676002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 80f554d8-524b-45c5-b5f0-08d8227412dc X-MS-TrafficTypeDiagnostic: DB7PR08MB3129:|HE1PR0801MB1804: 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: CB9B9wCA1wb6cFg9I0WLChV6QyTdUmuBMwdGpAleEBfClLGhd2LL77u5FBwblTqnefoK6jppune+BeC5Pi9zkWAUx6pI0hT/3USsT55+bb6UWzGKbbYc0Vd3sDnFxr0EqusgkVBUNPkTaqka7vRG+RH5yJNAtD3zJBSxsme0oDJS8hqkyOJDmW6rBk1eUgOzMJ4MUTfXOMEGE8jLyEf1dJPAyz5ZtOXbEPotHTxi9J/dhG7JWZ1tdlZ3yAyhB2V/+5sGFvinWciBnhdfcd1Dm1BEBaF0GkdkFzZICVzm9P5Pr7WkSZ3Pq+hHaLv7gAQAYg1FCwq4kwCSvvRbzPepYGlQ4qKFKcp81K7kJPV4hmBDC3fIxy83Bqo63ow9BMV1HU8Q7AX5hxrRFE3RARzVmc9ERrA4w31vEdO7w1w3DFdnCPVMIEhm/mlc9L47Al84a7lGYQ+t4OFAftm2VOyzJRKika6uu48LE87Z4eHhMN4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3129 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4f555fd4-3ce9-4c33-9f62-08d822740e3b X-Microsoft-Antispam-Message-Info: 0HYENE3MITUtSFuW+OXid5hALMNJU3d01nUSH+WIJ+mYYAyY8zL5uo3lnZyzYyvpkTj3OtUYPe9tmiJU84KTxv0BR/3qOBdsj1mMAMc1ecJOMj9P4aoEtXmoPKDuOb1fn6EgBUGnLUF8vV41oDGrEH5t2wIdUGKeJtoDZ7eRKP+IPG4YejFdpfDZdTCGhv2icqqf86za5Hg+soNpy6m8r7U6G9/DIIqQByAzRqF07TGDHPG/SBY1u/EfZaiSmZid8TCUTWLru7P86ruM5VRcKkndHp0byvk3FWpjIg0+xXRE0n5hrUCb4kAP9XCB6hgD+UwlHYUh5xu0fGqxl0cxeDUHIWuR10NecM47v/tFoPz5UV32RfIfDSsBt2M02s18ksp0euVUlB+PqLoS5J9lOY2W4SVrHmvx265pxrh3Em1V9ODO1WQjybytD+bNMpVE1GdOmeh9iP9mmOCXZXHSSlUjXoYveS337Fp7KUacfzU= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:39.9780 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80f554d8-524b-45c5-b5f0-08d8227412dc 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: VE1EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1804 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: 9ZARE28GuVkRdwfcOz7HBURLx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126127; bh=7SeTDN34QhoscCBOvpPgwRMf8HB2TykXkfsoW+jxs2Y=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=lrWtKIPLJwL3oGWg1oSHhv+WDzHWq2Q3R/6qA/0bVWQW7P1u7FWNCNsil7HBhqvuNZE 7JZ4QWYyQp6hUWYdeBbuu9B+sTk9+U0+giJG0Gxi75no21nuusrU/RJoClfTP4uYUZsAw bTly0QStLOXbql4HlvO9jDs+l/hBcqpgYWI= 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: 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 (#62149): https://edk2.groups.io/g/devel/message/62149 Mute This Topic: https://groups.io/mt/75354096/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 Tue Apr 30 12:40:20 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+62142+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126118105445.77137335293094; Tue, 7 Jul 2020 05:48:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ktHwYY1788612xFXYN1uBRWX; Tue, 07 Jul 2020 05:48:37 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.74]) by mx.groups.io with SMTP id smtpd.web11.15380.1594126116222124828 for ; Tue, 07 Jul 2020 05:48:36 -0700 X-Received: from AM7PR02CA0014.eurprd02.prod.outlook.com (2603:10a6:20b:100::24) by VI1PR0802MB2461.eurprd08.prod.outlook.com (2603:10a6:800:af::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Tue, 7 Jul 2020 12:48:33 +0000 X-Received: from AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::88) by AM7PR02CA0014.outlook.office365.com (2603:10a6:20b:100::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass 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+62142+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 AM5EUR03FT051.mail.protection.outlook.com (10.152.16.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: ("Tessian outbound b8ad5ab47c8c:v62"); Tue, 07 Jul 2020 12:48:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7c3627a381a0659d X-CR-MTA-TID: 64aa7808 X-Received: from 394df2eea3aa.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 46D37539-723F-4841-A338-D240D90CD345.1; Tue, 07 Jul 2020 12:48:26 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 394df2eea3aa.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=laD1IEW7jZnO3MGrd2q3bKiC6ferQaWviPhYUSiJfuwxZJXuu28pp9imgLOx96zPxdUhdYuLaDzJgJYSev+bQxd45qM6KZmsGv19ZZTrvhoV5h/8LUfhQOw0fp6+Iiy6lIjpCLOWpiMdSbhkq49COpGXf5YoIeMbSZtgCk9mT1iZkczNZx9FBTUZTHbPGdDmXE7ld2G9L+gyn0uMVwoJKnqAtZGOftKNbp2Jfd9xIa5lv1YOBv13HOkbYT1ctSPjYo7ZeifnYEokI3aM2bZJTo88z0JPRln4m0i0mIJf+4uDjwiyPagCZEzJ4opQfScvr6mAANOnL7l9SzQ4Dm73Iw== 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=4JDg1Bhx+fACFK7TKQ5zrJ5BqIaPEDRmdCPGpEDcRhU=; b=IKgEkNM6H+ZIm6MT8cqG91cx48bZ4CM8Nc6QTGa+uQAT4DH+BBUKOVgN2RMn6S4I6biyTVY/L8L8yIjLMf2WfplN1KKmloVGVwQO8XuK46iX+/lNzVL4FtKBTKfDrycNa8Aa6JG2HiuhnoJ9/ifkHxB4x/t8XRIpjP+MOxWI3mEW8C4/vniOCubS7j/hmXIenvz7Lv3ZLwDh/9VlCorHUTY53ymgI4xARqHIvTf+0BVSJX3N9U7N5zZhiynB009ukNr5NGaJp/nuPnUIGJZOkjMPTAtjaaYSIndDeVIIA+MzhxqjfW3c1t9HJA65AtgBMwWQVLjjj3hhPB0UgTGJCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR0501CA0007.eurprd05.prod.outlook.com (2603:10a6:4:8f::17) by HE1PR0801MB1627.eurprd08.prod.outlook.com (2603:10a6:3:80::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: from DB5EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::24) by DB6PR0501CA0007.outlook.office365.com (2603:10a6:4:8f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT047.mail.protection.outlook.com (10.152.21.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48: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.1415.2; Tue, 7 Jul 2020 12:48:22 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 7 Jul 2020 12:48:20 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:20 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 09/15] ArmVirtPkg: 16550 UART Platform hook library Date: Tue, 7 Jul 2020 13:48:03 +0100 Message-ID: <20200707124810.50668-10-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(396003)(136003)(39860400002)(346002)(376002)(46966005)(81166007)(356005)(5660300002)(6916009)(6666004)(8676002)(186003)(82310400002)(7696005)(44832011)(26005)(36756003)(19627235002)(4326008)(316002)(336012)(70206006)(86362001)(54906003)(2616005)(8936002)(83380400001)(2906002)(70586007)(30864003)(82740400003)(426003)(47076004)(478600001)(1076003)(966005);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55903162-51e0-429d-5a6d-08d822740e81 X-MS-TrafficTypeDiagnostic: HE1PR0801MB1627:|VI1PR0802MB2461: 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: D9CfW8QSChZHPOb1dmn44IP+/L86GVG5VF4qGC+XhMMgiU/7mia+Cd4PC6CZtPYHeLo5UYw4UBpd36qbEgzYNNmmsKkeJVO0zu/eSqi9vvFkVYITy59CxbjBp5gOVhy9lytY2UNy7GZ9e48io8E68DrXEnNJEM9rfyyFnZXLN5cm9npWPiJLTbiP5sNeJ+CR2qk90ExMowHFJiL5p3qFuX5xlHQAeV2TGztLlvsPlonG1W9XqgKz5vUNln1bX4IP+/MQ4z7YH12saR6HHg6WWCKtLTrrCZ5uRhdoPsdOhqtbOcHQE/WC3bqAh39gkOiBAsP46rngQfghaAMaLI37ZWuigKQGJh1oMzYcDQHnBCoM+e6HeCPRdNH8jQxEfp6jQBekWQdX8Tyu/ybzBi1tGpJ7PFDlNWD3gdcjLGa1VE3JnZZBHEYIUT5hDQhUp5BPz3UPEuHo+DF9TB1wjuIGZYMHzeMsM8KDzHwJm+q8ZVI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1627 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 0d57673b-be39-4af2-8403-08d822740942 X-Microsoft-Antispam-Message-Info: xvhxusaKnT++VV4FQpUI57CNY7NIpLTRfuuQWALj4N4mJ+5h8Hdi5h4YEFlXeiYYyQFOgFGTclJxYO3Y04aowODJ0MP+jxyBZd3tYm3nHUilNhLA0hkbD8Ae8iskPIcIjSi7T/GsrBK/neurTT6yPbEPdzNGp8GTDPU7xBd7lDQDW61yiDEZDc6X9P+CJ7tSABsHe2YGJmsNDejvlL9yBO+2u6UusHinoW6mRGJBmjyXJhrFMMWBeaNKvWxDTGZlLhYldj1R3V5FI31juo76R3IUBF+/RvVFC/SeS+tXCqtpCBjY7y6g9UptOmpz7pk+sPfZX/dYD4DqVL0uu2mIw7nsIrDh9yuDgxkpNf3EtdTFUK8GEk4IuOgbmbv1acroXdymLzAg4oA7y2XoCF/rfVKk0HlHnqngW0MCGrzHcEJkX+PKs6ZFrMPq0mJCHX3ZW9RUFLZopm7rzTshgSMgPIxQxp06KyOW1GugdbdUmZ4= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:32.7085 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55903162-51e0-429d-5a6d-08d822740e81 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: AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2461 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: 6jElUEYURBV4R8X1BLCYLdvFx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126117; bh=4tzydaI11j1Qybwqzqmpu80SHNhcR0+bywRDKIA9yOY=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=l7D/87LQQcETrPVYCKQgni8/M4PVMKSHdfKO2p7CiPk34kLi0NXrd0vPVqiBBizqVVK pUAEjSvjnWFnpXxehNd4LWuHI4ohL1HfxaAuqESonjUK/bDwqx7L4mbnIdfHxUkMLtlA0 U1jv8L1itiKga4nLQ4uTqEqT5M6MTRds+ss= 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: 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 (#62142): https://edk2.groups.io/g/devel/message/62142 Mute This Topic: https://groups.io/mt/75354089/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 Tue Apr 30 12:40:20 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+62143+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126120116424.89037526561583; Tue, 7 Jul 2020 05:48:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0VxZYY1788612x0PBms7i4YO; Tue, 07 Jul 2020 05:48:38 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.79]) by mx.groups.io with SMTP id smtpd.web10.15413.1594126116460352320 for ; Tue, 07 Jul 2020 05:48:36 -0700 X-Received: from AM5PR1001CA0027.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::40) by HE1PR0801MB2059.eurprd08.prod.outlook.com (2603:10a6:3:53::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: from VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:2:cafe::8e) by AM5PR1001CA0027.outlook.office365.com (2603:10a6:206:2::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass 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+62143+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 VE1EUR03FT048.mail.protection.outlook.com (10.152.19.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: ("Tessian outbound 2dd9eeca983c:v62"); Tue, 07 Jul 2020 12:48:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6fa4c1e4cde77ab7 X-CR-MTA-TID: 64aa7808 X-Received: from 14480e58cb7a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E9E7B11C-E7AF-4C04-B782-AA2F0A59DFBE.1; Tue, 07 Jul 2020 12:48:26 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 14480e58cb7a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SZ+47i8RXobaV02mTh+s+fy3QC9kiH2sbuJuodgyuK5h/2GGcZJl1SC1Py8LF3PjDJCcUu9nWuZVF6gAFR3ofeYAU8vMK9WhDg2UJKI3ouT2Ra4pPN24lXcxG7UpykNxYDgmfD4d6q/lUe5Ak9+JxAomjw8PJizJEsTste0eqwrXOU6BOPh5DbkXO6Gp/bYxHY4bArm/kOUmdOslpnfMWyo3qAUVyCUNGUDl6giL3AV8kewcbkt0JpVZzTGeIVp4FrzZhKFQ4yM4wV5igsk2NJc/RQMVtSiMBURG8SzSQgWrhp8AGWyrTco/QAV2z1dM4jwQ+m9vdHapP4coLXk5+A== 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=SnCASzadBtCfGkblN5f57Eko0VQ2mJmmvYu1THWpOp8=; b=n0DyXRJhwMmocBcXyN+C9OaFJjPHRSUmcuI46WEhuh+yQg2rfYc6vgY2k3psREEjT4cFUUuSa7/eqJATNi2qqRictRx3euTp6FVCcNZnRO2lPikwIfD34gtVqH9LgSRvyhperhmR/WVN6SNadKPBqkJQaYALVJwxdLKxGurqzepQuHRvGbTwE0G6ZPYLBgOeAyBhL2+yz3+T9s+k8vl35sNoN+2wCmUY81+HZtCMoIqulOPgu3mWU2hEj6aSKipak0lu3sCMMLUgAfM0OV0cvoMV29W37fBQ+ehqmnS0rTY3mAoYCRNJRwZKzxaITjYpUIoICwtwQLnpg7FeLX2qGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR0501CA0011.eurprd05.prod.outlook.com (2603:10a6:4:8f::21) by AM6PR08MB3173.eurprd08.prod.outlook.com (2603:10a6:209:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: from DB5EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::b8) by DB6PR0501CA0011.outlook.office365.com (2603:10a6:4:8f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT047.mail.protection.outlook.com (10.152.21.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:24 +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.1415.2; Tue, 7 Jul 2020 12:48:23 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 7 Jul 2020 12:48:22 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 10/15] ArmVirtPkg: Add Kvmtool Platform Pei Lib Date: Tue, 7 Jul 2020 13:48:04 +0100 Message-ID: <20200707124810.50668-11-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(346002)(136003)(376002)(396003)(39860400002)(46966005)(83380400001)(1076003)(8936002)(4326008)(8676002)(2906002)(86362001)(19627235002)(70586007)(6916009)(5660300002)(70206006)(47076004)(82310400002)(44832011)(6666004)(7696005)(2616005)(966005)(82740400003)(426003)(316002)(336012)(81166007)(478600001)(26005)(356005)(36756003)(54906003)(186003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b7abea69-3444-4a1d-0680-08d822740e3e X-MS-TrafficTypeDiagnostic: AM6PR08MB3173:|HE1PR0801MB2059: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:2958;OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +dyGU6t5Of/HfsWNLlb/jnmf/+9jHrWe9pMnpfMCzY++uZk25n9heWlqMQxrpYEWGYJqohmidAz1jJ+SyLLQey8Vd3m87oIrCugeVYeGeqEgJhk4R3AHs2Sw/rmZeBovjr8YIXK2s17L2f3xsnMD85UkJz8xKB3qsGLmTN8XrnMOFGjFsSzTsJF87qtyDtDFJaG6WMo00zpJum16SMPw1psR8z7hLpPIc2TUXK+0vVuKWiUKuXCt7cYUQlyJ1gK90575pw0Iu4VWWTRDi/lBXbGjgpMssHfQ7IA/S5M0dPw2ajuQ0R/3LUMZ23WCjBTpTis9QHBJY/PY7e4eV4pvK7saPqY81Cbn2RyXZ53hmLN3HAoa1SMyClbkqxZIrMWHf4UD+SivFD5LVZihsNx96cFWWH66JyhUY1hZisNMfNB78Q6Hufin6UqBR8RnU0VLoPRdVNo8868ILOZPJ8MIRrmSfsj1g//QneHOmwgoK5c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3173 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: c158ed24-5c3d-419b-3936-08d8227409c5 X-Microsoft-Antispam-Message-Info: aEH2JJOcOmP8z+OAtrEh+3F7c2MZ2DIQF2cMn7XGbPkWauEOfOOmslXkqdZzybUh+kMK6vdgCz3i8E2GIDtzeXG/eDIlFMKzxuwtsJTs8Q15/O4Rk49Y/wgLRB6G66tjVMWQDp0JUBZMDQ7MVoFnEGEcK2xdfVsYs1iWwjnvq/qLqTbqRRu9MeaTVwJU5AQvgT5yx3MjDdxDYjaM4OvgafawN+pYJngXLqWzxJYPOZtF4WGc5nhDLIp4lEIdSMxyTPxTqg76ekcGgtRwKqqdVmuYTgeSGXkqfU3j+BBcTp7ir4LNjHBnGtB2SY2RHEgyUCX9HEVgnXbB23vTWMT4rqP5CE3Vt2JJVH6Bv/Syyt+lZHJwOk1MG8JxEJWumvpVUQ3EKxZKWYqbwzDP2m8vYTPkhLcymdNpxtY447Z5Kr/2+35qN8HBGja5oCNSFSLwFbFQ+fhvEJgFLTemBa+OhhwSF2ZIgYQwWpbKb4/S5CE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:32.2312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7abea69-3444-4a1d-0680-08d822740e3e 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: VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB2059 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: GqhEWqlidREUOW3mHLzb4QZxx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126118; bh=62jo0xYv2NbNh2IzUriyzoc2VtsHUEemyCFDIyV3xtg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=fKNzOVZn3j/BoU1NrFRfDK8HikIJlUXdbcvmKzO8/h9C9VdbD1eIjuxRk3BHyKyXDop J5vYwvY921Cmb8P6iggo13E3yoDvIVYmyDv3YBYpoSdD1UXuoGgSju328/G+izMKI0hiJ OjKB6pkJtdyiQAJDeSkWaPkwucezS1jXpQc= 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: v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61722 ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c | 78 ++= ++++++++++++++++++ ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf | 48 ++= ++++++++++ 2 files changed, 126 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib= .c b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c new file mode 100644 index 0000000000000000000000000000000000000000..a97b31537fbc8071eed030f912a= de60de3945356 --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.c @@ -0,0 +1,78 @@ +/** @file +* +* 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..9f44b8885d3c131de1d41ac6947= bd9218cfdf3e7 --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf @@ -0,0 +1,48 @@ +#/** @file +# +# 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 (#62143): https://edk2.groups.io/g/devel/message/62143 Mute This Topic: https://groups.io/mt/75354090/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 Tue Apr 30 12:40:20 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+62146+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126122727617.7912584641053; Tue, 7 Jul 2020 05:48:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id igYeYY1788612x58UFj8tbmN; Tue, 07 Jul 2020 05:48:42 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.54]) by mx.groups.io with SMTP id smtpd.web10.15415.1594126121355160582 for ; Tue, 07 Jul 2020 05:48:41 -0700 X-Received: from AM6P191CA0066.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::43) by AM6PR08MB4753.eurprd08.prod.outlook.com (2603:10a6:20b:cb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:38 +0000 X-Received: from AM5EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::75) by AM6P191CA0066.outlook.office365.com (2603:10a6:209:7f::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62146+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 AM5EUR03FT028.mail.protection.outlook.com (10.152.16.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:38 +0000 X-Received: ("Tessian outbound f7489b7e84a7:v62"); Tue, 07 Jul 2020 12:48:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2b0cad51cc24cf58 X-CR-MTA-TID: 64aa7808 X-Received: from e51b124a3e33.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E9FA68F4-1343-4EB6-B9F2-D05F96961E8C.1; Tue, 07 Jul 2020 12:48:30 +0000 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e51b124a3e33.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YIAak5XKzA1wO/Y8UyCtApY75mynpgDyB/JHrTtWqKllu3LLZuqvSgrPXMY3eVDj389RbcbV5GakdhsEUyVcmfU7dg4MUwvKI0DRl3TK11wuRrdI2Esku6qNBW2UOqJEEDz/E057iNY+Vq5N38fDPxGCkCpyDOCh5K0JN4kjdhbLdm/H1SUivAkN4AQxc1K+tbg0Kw7KNfVwO6DOod9YScwQo2GNkbVvImqfSb9rIdgmYUlGer1T8JHzWr8hZ2M7hKv1pY0TWtlxp7WxQG4XypP7vf2STPjc0ra3kPbAycez+fHWN5CLaRWEpHJ3owgSBVl39Ud6jO0le0wIKK97NQ== 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=iGJIs4SvFGKfClFRqZUcC2w3eKGkVZL85RXLryAoFvk=; b=GGwhhEGuQU4KeoetMXPmRwjHgwp+isTQwPF+fOlhRYJJq0S05GcUjGsYEaO0kB1lPZ/iMb93AMjsR7QAFXfOvrg+X70TcSQgKXtYYZBxUuRKQ19dzv9c6KEKVqDTBtJn3HOHD9+V7qNCT8qjZVAv5GobUhAGijK4HdDbcEBjLrPs5maS5x11Q2jATvdBhyMlSy5TY7fEv+dHEdO4R037I3z7ASlrOSuY10zegexAl1JZCH/fZxjwy/jSAz85ed4b4o8SfjIyhRvFgSd+1JFiJqg002+8Mk6GYwsMT8wRpkAnSJ1TVBSG+8h6+jzDG1bXkFYX2kr4tQoZ6Xc08C+ypw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR07CA0164.eurprd07.prod.outlook.com (2603:10a6:6:43::18) by AM6PR08MB3000.eurprd08.prod.outlook.com (2603:10a6:209:43::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Tue, 7 Jul 2020 12:48:28 +0000 X-Received: from DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:43:cafe::46) by DB6PR07CA0164.outlook.office365.com (2603:10a6:6:43::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.15 via Frontend Transport; Tue, 7 Jul 2020 12:48:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT064.mail.protection.outlook.com (10.152.21.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:28 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.1415.2; Tue, 7 Jul 2020 12:48:23 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v4 11/15] ArmVirtPkg: Support for kvmtool virtual platform Date: Tue, 7 Jul 2020 13:48:05 +0100 Message-ID: <20200707124810.50668-12-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(396003)(376002)(346002)(136003)(46966005)(81166007)(1076003)(82310400002)(6666004)(83380400001)(356005)(36756003)(316002)(54906003)(426003)(336012)(70206006)(70586007)(82740400003)(47076004)(478600001)(966005)(4326008)(6916009)(8676002)(7696005)(44832011)(2616005)(5660300002)(30864003)(2906002)(8936002)(186003)(26005)(19627235002)(86362001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1686651-d2cb-4e26-d7b1-08d82274120d X-MS-TrafficTypeDiagnostic: AM6PR08MB3000:|AM6PR08MB4753: 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: B6yGusHkjMy6TDiff40G6CIUoVz/TXM0UT3u+YDX/kOZxKi40DCX9UskIEiVyh6joQFIYsyAhdQnJbGf3NyqWORaQUqI8lZCLh39AHa/3JVe63Mn+Xm94RfIz17qiHz6hwIsr9wNSUMH+hCo13qcO4dgbwWixv8aVguDFM5HL6c8sncKDPMtC5TZNM0bTMNIEk9dmjRR47NoLjXF0IOEMCNJVs74D6IyLEchMEvpNOgmUP7s5R1xGnAGc36oCiaOPnND5kmxjQGXrIeV/kvn58GHmd8gU8uHBOj+P2UylFGgE2saEGRNQGbzsWAYILA/zctbhYyJpZC6/1K+GKXRv5ibU2cjKLUFoqETxGegyDV3zf7BsB/RmmqqZXpymDuGbjyXUtZ4ExwPyiXGTzAhrZSgJj2NB42gvJXnpCxhlTqoNzc9FQND0hN8KM7n9ygU0A9Jo+8ENmTkkIRfTgjUnC29xBItpT7RTuyQPXd2OdU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3000 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9d71d6e8-6e9a-416a-8bfa-08d822740bf3 X-Microsoft-Antispam-Message-Info: y5RIuCgYNlU/biVovZZZfJ6CP6CPhwrU4FWhObs5VwljOyHm3BNnY2n0EGLOcEMI+HmJBYQvKq2nF6I4O+dskUIVqoPf7m0Le5dm+BjBOzvc/n0EVdqtirxCwFPaTx7A1ClhDCAxB7i7C9dvTtKxclvuWY8C9FNb35fT3Rhkp18oehi4mSgBtg1bmcnBbaajy6voitI0qNtuG51dhLPBHOxd9ClwymEibIv3Ox1qiRqWJLwYIfro7/LuRfw52KkSwPBS3wAZ/0gbfz5szOUGteZxTYnVgCpJLakX5XXokcA6Wt31bHSaWK3k+LKyqWwUaWk4VxRtLba2YQd7OsP2hICXc78slGekCuwqaSiPxG7sqhPqDsvjBOuT4E8b4Ry+lOSelUNoZd2iEXPOtV9wrI5L4rnY+MT4LZcn22eypJ5le7jcMrg50L7s9CvsfNtNnF0k7qcXayowTkfoEKq73Icn5G9JGWBBhGU0+7kjpRw= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:38.6403 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1686651-d2cb-4e26-d7b1-08d82274120d 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: AM5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4753 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: NqO8nigPnhU838tysQw3J3Frx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126122; bh=Kyxuxb5Zbb1UfK4ZOfsNs5rmUhvJqT/UAhLCfEmWZfI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=VqQO4R6piyLrcQo4+RhKvjxhgwftMvpjCL0kKajojRFzWvAn1C8Qft+v0Im/itrrqyQ 1ezPU1sMbTfMm4KCd11g6UYdQx6GkmAHNcQgDPtF0+bIofPg6ciLw3UjvrZZX1OlaKD2Q 7r1eoTBxICq0l4tNIYCH4H8GsxCnD95p+bw= 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: 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 (#62146): https://edk2.groups.io/g/devel/message/62146 Mute This Topic: https://groups.io/mt/75354093/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 Tue Apr 30 12:40:20 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+62151+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126127149776.901489076865; Tue, 7 Jul 2020 05:48:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5mmwYY1788612xD21FgKDDQW; Tue, 07 Jul 2020 05:48:46 -0700 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.40]) by mx.groups.io with SMTP id smtpd.web12.15350.1594126123582443683 for ; Tue, 07 Jul 2020 05:48:44 -0700 X-Received: from AM6P195CA0074.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::15) by DBBPR08MB4869.eurprd08.prod.outlook.com (2603:10a6:10:de::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24; Tue, 7 Jul 2020 12:48:37 +0000 X-Received: from AM5EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:86:cafe::ae) by AM6P195CA0074.outlook.office365.com (2603:10a6:209:86::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass 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+62151+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 AM5EUR03FT062.mail.protection.outlook.com (10.152.17.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:37 +0000 X-Received: ("Tessian outbound 114f46c34313:v62"); Tue, 07 Jul 2020 12:48:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1c7684b9bb9ef016 X-CR-MTA-TID: 64aa7808 X-Received: from 4dd31b43327c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 82241E89-3B45-4AA6-90E1-0F6F114ABF8C.1; Tue, 07 Jul 2020 12:48:32 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4dd31b43327c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7Shi/IX7JplkyCaBvjdVtglImyT4pAKOHyZFcMHREI9ey+bizH3hbjxjd/emUrF8FygAkjMmvF+XD0Qp8bsQsjADoIjGTrU30WLQqa+tuD/+p4npaUUYu3H7FTLAAMwW1rZ14cFPXSG/MBoHxgAZP8/RSggOq74Te8pEg3Ew/ZRgVPEjAryK+JW0MYcsoA6qUrmFJK13Y5fjiEO0z/83sWImcn1nmvpMVlDelgk0E7ryzXaF4yvSZmTf6CwYI0bWmLI68WykFBvzBindiUAvJJ5EaVFqnZv1KDE4V6UmWpmQ9oei6v5iqlgExfLyJ/SnUAVpWJjlig5NnUbk87StQ== 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=caXxRoahbo1cIIvJADbnflTA+XdzbG1oLtdh0v1oOKk=; b=Jip1ILo6cdFvve17wMmqwt+mNguM2w2ScV04P8/AghRhxXC2WqTd1Ucnd9M6owwyQijY6/Rv3OALftVX1y+/dP1h7b6msWZOVYo0Yve/LEUE6AsL6s/R+p/CEskvSpivYnC0DyST6xiG3EvIVGlQ3bLSnDLc152xyuIgVK0FgxmsPjIyu8lSWDSD8N+shkc2CGcpLhkMTrvrcfUJ0Z5KzRZDNzLMmE8pjdJGK7jyCiVWUdipzvDLeigbrUSIuDskQ0wMN11N8ksv+WhuI8ivYPKXzMVJDPZ66M1dwMi+02PW6MKoJI9cYjAuCW5WIIfVt3kgXrjesBEYzYyuFyKztw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR07CA0157.eurprd07.prod.outlook.com (2603:10a6:6:43::11) by DB8PR08MB4971.eurprd08.prod.outlook.com (2603:10a6:10:ed::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Tue, 7 Jul 2020 12:48:29 +0000 X-Received: from DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:43:cafe::80) by DB6PR07CA0157.outlook.office365.com (2603:10a6:6:43::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.9 via Frontend Transport; Tue, 7 Jul 2020 12:48: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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT064.mail.protection.outlook.com (10.152.21.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:29 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.1415.2; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:24 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v4 12/15] ArmVirtPkg: Package dependency for MC146818 RTC Date: Tue, 7 Jul 2020 13:48:06 +0100 Message-ID: <20200707124810.50668-13-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(46966005)(6916009)(336012)(44832011)(47076004)(86362001)(70206006)(70586007)(5660300002)(1076003)(7696005)(2616005)(426003)(54906003)(6666004)(83380400001)(498600001)(36756003)(966005)(2906002)(186003)(356005)(81166007)(26005)(82310400002)(8676002)(8936002)(45080400002)(4326008);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 959d317d-f04e-4b7d-81cf-08d822741172 X-MS-TrafficTypeDiagnostic: DB8PR08MB4971:|DBBPR08MB4869: 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: 4f53IhGD/PBZ37zTA6hQq3G9oZEDeOBrVquixZFth+OL5UJTVFm16VElfA5SN36qWNsSv/HrHMX8s3fSuIlpwmO4a9RblglUzf8pAHFcFReLCqshbTHscKSYU1rCUhhygNAFK62DXQ84f6p8wNeXYwxX+SBtIXi4++fytCLq5jSxFbEP1pKpkKKD7fXYWbkGJ6rP47Ivlhf6UPVlK9wiEkm1hw+mxGvERg55DhjhcTF5d3v0A85JnxG/NUtI0dK1dM0pKE7DXoH9tYI404Fnqk0rxzBzaDSsxrlsihtM8Msv5w38uEoXHm9xRFHYbuGL5R7JvzKPwY8jyCdmWL0adAlW4A7ivE28vTtwpTTeSdmDLovfLwyyIqNV7IadBTkI/untc3hL2Q9MG14UkDQU9Mpo1+hKownrxmIiDL4N9P3FzvUkjXPWDLaerxRFWgpnhaUZgn6PnGxYiDaG7IydCq/Fvru9G071jemMgO29EIM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4971 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: aef03323-4445-4c84-bca5-08d822740c9f X-Microsoft-Antispam-Message-Info: u3lDlBGuQ4yZKaCCgJJOnu5LUwPHoiUE2g4TWx9FTjH9BURmd/UZsL3dyxPAh8FCr9ncQEqmCk5okE6cytrRrftphbsaWI4fxfRU94J/rMyVPg9NUH1kKFH1gVxQuJxRU10dPcGYo1BgQ+hgLSciiZnctF8uHASOpHMIduVYRQJw0brUgTHLNYN4iL22HhfZTUWjF6VlmbWO8Kp91PTNlgB0bC/d6wNrVmJ/k9zG7Trbb2qwgSsZg8YAIwQY87A/UeiERRsEYyCvsAUVRuoLhL4XB3jHqWr90BwqyNPJNtmYxb6zph1a8ZYEryZNEXwyOMAxwvZs1E7Jx0/krsnn3gp0NYlimFgYU1MtSIbCMETLeJFcSphSzUunWUXd4gYqfj+gK0xgJO+LlXxC7RLRVLk4eeDZ+HOHplommfOdk4qLqRYHYvqcJcfLt406LD5QLCoLJueBZcmkMDK+dN9idIGz/lWIf+6LivgDCIx/Nqo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:37.6093 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 959d317d-f04e-4b7d-81cf-08d822741172 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: AM5EUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4869 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: DIo22H6HXxDmhAEU4bj2WSgfx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126126; bh=x04hdYu8NxEZ9n9qbScmkPUy3XC48WzQziko5S1ybJU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=CJY2nkkBJJwtDeeQaYWjqU1Jm1a8wVV4q7eaKFKmbL7nh+PF5TKJfIpjoY7fUsboRCe CvCOh9tsbcSaTVyWrAA3Bnv45M0W+vCKPLuvISjEw27XRotzNFERYYQjT0PebiuPC8wJN G8j5OuDHZqiXbPkh8wgYBGIhkTGDW7b/RMY= 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: 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 4553725ee5285d08a25f5e736f6b1cd25f4ba3e9..554ffb2609b25b46caa1fee8e99= 4e2e6ea51f18f 100644 --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml @@ -5,6 +5,8 @@ # used for code analysis. # # Copyright (c) Microsoft Corporation +# Copyright (c) 2020, ARM Limited. All rights reserved. +# # SPDX-License-Identifier: BSD-2-Clause-Patent ## { @@ -34,6 +36,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 (#62151): https://edk2.groups.io/g/devel/message/62151 Mute This Topic: https://groups.io/mt/75354098/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 Tue Apr 30 12:40:20 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+62150+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126127037552.5016072808766; Tue, 7 Jul 2020 05:48:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6w55YY1788612xzuE93NvC78; Tue, 07 Jul 2020 05:48:46 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.67]) by mx.groups.io with SMTP id smtpd.web10.15418.1594126123669791175 for ; Tue, 07 Jul 2020 05:48:44 -0700 X-Received: from AM5PR0601CA0067.eurprd06.prod.outlook.com (2603:10a6:206::32) by AM6PR08MB3926.eurprd08.prod.outlook.com (2603:10a6:20b:a7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Tue, 7 Jul 2020 12:48:39 +0000 X-Received: from AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::73) by AM5PR0601CA0067.outlook.office365.com (2603:10a6:206::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Tue, 7 Jul 2020 12:48:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62150+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 AM5EUR03FT050.mail.protection.outlook.com (10.152.17.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:39 +0000 X-Received: ("Tessian outbound f7489b7e84a7:v62"); Tue, 07 Jul 2020 12:48:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8492d484556ef0d0 X-CR-MTA-TID: 64aa7808 X-Received: from 6330e34edfeb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 93374646-B310-4720-921F-0D38810E565C.1; Tue, 07 Jul 2020 12:48:33 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6330e34edfeb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CGGM6RiNdJLY5SaSjpwdVLiv2Is2RfuKMEWLQxNwXQ3T8S+d+mMEJ7uoAzgNsKZywdKF/DyUeifb7ytdXaOo08FhE3uo7XsYD+Q8MWdCdx0+0oh6EDIsTmbZxAgYYRl31V3P7DPzO7zQE5olxGYzxks1FDLlm2Jee/Dy1ynIiH3TA+rlV1GZxXpkRPYorbdJ6BTEXh6dOqLA9I4i/bAV2gogdBl8UCwDT5kc3EYKr+TxiFvBq00eI9VYmT9nQdn882R/d8ZZBu8By9uxpWn+u71pes3MBSjccgL6KusDkElq8R0p9gQ40aC2rWWwIGkahCdMdLTcr4qRuxIvwQBDrQ== 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=EJ7bPlPQNL6TQVsMP7aCEY7dj8SmpK59s32ZmJsA3VE=; b=fQJZnigFqxJXnQFV3J0JKUgQ1kIacNzHXLS9OzDlU1nbpDcuEqmbLhMrZfttbRNqF2S0VDjGbe5eFm+xxhxlKEfENW4KHaO0TTNvxXRSL0BPkEqDLeewhpWNdwDDvAX8IcaleCXvDkcLphSzi0P9XKYuTJXiOw64ckHdpLMDToXPFiMgZbuH3EoUqeX2qJctXLZy9vpaza73e7g7gqIHiPYgvhu9gnwccR1lf7SjRdngn9/UUIMbqhtHjJzenBONSa0xkiMrLRHW9QYQtsJfy1BjJX5Ycs6yMLyebDrXIrJjG33bXJBR2K/t3LMOmcMrN9qhirbR2oTC1hHnxfNObA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR07CA0176.eurprd07.prod.outlook.com (2603:10a6:6:43::30) by AM0PR08MB4004.eurprd08.prod.outlook.com (2603:10a6:208:12a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Tue, 7 Jul 2020 12:48:31 +0000 X-Received: from DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:43:cafe::7) by DB6PR07CA0176.outlook.office365.com (2603:10a6:6:43::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.9 via Frontend Transport; Tue, 7 Jul 2020 12:48:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT064.mail.protection.outlook.com (10.152.21.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:31 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.1415.2; Tue, 7 Jul 2020 12:48:25 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:25 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v4 13/15] ArmVirtPkg: Add kvmtool to package dictionary Date: Tue, 7 Jul 2020 13:48:07 +0100 Message-ID: <20200707124810.50668-14-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(376002)(136003)(346002)(39860400002)(396003)(46966005)(8676002)(26005)(86362001)(356005)(6916009)(336012)(2906002)(8936002)(426003)(47076004)(44832011)(2616005)(54906003)(70586007)(82740400003)(4326008)(70206006)(186003)(7696005)(81166007)(83380400001)(478600001)(1076003)(6666004)(36756003)(5660300002)(966005)(82310400002)(316002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1739fb1-b829-41f6-9e42-08d822741243 X-MS-TrafficTypeDiagnostic: AM0PR08MB4004:|AM6PR08MB3926: 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: /L7L78KhVWuCd4DNEd2eax8OTWEk9FnL5pe+4h1zQ6udqoOt9W3K4iHtSiPx3DvawvRAemse8bpeXD2WUMa3g9OnvZc9JwgjKX2n3XNe6L3/23cC3TVzMDyRPZ6w3FVdGxQeuajWjUEOdBNv01SQCepfXv7YvXAIGswGCO6iVNmS3d7YSsMmLtjLq0DAiMl5Mr2jwQva0fPkBczFhkX3CMgThBNLpg8495WqG9/oXS7miFNRvm6+QpFfHS5GOrfLqX6ASag6lrSrIHIZXgkCScWXINMStgZZhEGazVHlUdRF2VYq+aWQ1Hm0Ed4UbkoFWq82yEGQat6Y7mV3wLeozWb3k2p0ulJX/GZ8wlTVA3KaJt2wAB/T7b8V1LjSLUL/NW1oXwpnWWyc48CaxKLI4KuwtnZ/pSbd2Aa36dKO1QDvwaOcdiCOg9EspoY/ZZTtkY7d2Q2J/nX+648i7KnBfNdJdokjg4+KjUhWNFtCLWQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4004 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f5e75441-fd85-4d35-7db3-08d822740df0 X-Microsoft-Antispam-Message-Info: UlAGZjH8OEqeSaSzQpjRpKkkzUszh81CzOiRBPoHZaR2WSvHKCjRtkkfbD2dqYILPP+ZPqa4thCifjUrTzNLh8zzkSUUjud1jGjl34q4qpGu83eqwA2wbmtqXkOkLZP9R64QeYUyE5DqlGINgwNwWyG+j+X/sQNVStbAOhHVhbkj9yWMEnJQG7+idro3rMNiZtoVjDNcvQWRn1u1W0aqqDCc0FBDFlfA3gRxx5fs/jg6Dn4nXAoBMh4WIcrIZNbKhw5EbDG6qHBZXH6VdCLzZAt2/OjYr6TzWwL88iBoqcwjInERke98Uy+j0B5L9j3NUo0O/x728iz4gX7d8H+9JbEvvP8KhJ4uJDpnaJy0ypRDPeti6KyW2JGbiTmsMbEOqJlbf3KQGE73XyrQKCdBtYzWr/0QHXFXlKY2NQLiAtDlwjMhWh+lYoJ3qve7c+ByOwZNB5clLQ7Vipc1QYkgG7RdZbs4aGN2ovXg3hg01TA= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:39.0137 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1739fb1-b829-41f6-9e42-08d822741243 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: AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3926 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: IANaLIl5CnuneuBkq1jfQ9E9x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126126; bh=PWEz90+IO9Yo6U10MWu1sa3Pk8X/YQpdU560pU7e7Vo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=fDA5nZS3P4rKwWjJQwiKf46mQnTfQiCupgV4QuMErm7PHf8ejJ2ffFGaIpN0LWyOk6Y o7hJooIqY3Py0fmV7qoTeKGoIlnG62CFiasOXrZmMLdLQhawzxF7ZWhdQI0fUp2xkuOEq camCKGa5mqBK7onszj+8A9DIo4knE9ZKzyY= 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: 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 554ffb2609b25b46caa1fee8e994e2e6ea51f18f..cbe66f82de484dfbec8c81261d9= 8d3ff647193ae 100644 --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml @@ -98,7 +98,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 (#62150): https://edk2.groups.io/g/devel/message/62150 Mute This Topic: https://groups.io/mt/75354097/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 Tue Apr 30 12:40:20 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+62153+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126135727698.3085737812871; Tue, 7 Jul 2020 05:48:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id cFUjYY1788612xHE7aZqoIKE; Tue, 07 Jul 2020 05:48:55 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.55]) by mx.groups.io with SMTP id smtpd.web12.15353.1594126134269004857 for ; Tue, 07 Jul 2020 05:48:54 -0700 X-Received: from DB6P18901CA0024.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:16::34) by DB6PR0801MB2056.eurprd08.prod.outlook.com (2603:10a6:4:71::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Tue, 7 Jul 2020 12:48:51 +0000 X-Received: from DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:16:cafe::b4) by DB6P18901CA0024.outlook.office365.com (2603:10a6:4:16::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Tue, 7 Jul 2020 12:48:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62153+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 DB5EUR03FT036.mail.protection.outlook.com (10.152.20.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:51 +0000 X-Received: ("Tessian outbound f7489b7e84a7:v62"); Tue, 07 Jul 2020 12:48:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c5ecd75e3d0617ac X-CR-MTA-TID: 64aa7808 X-Received: from 0c4eb5aeb95e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5E53F8FC-0402-4035-B888-7893E3D28E56.1; Tue, 07 Jul 2020 12:48:46 +0000 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0c4eb5aeb95e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DKz9zM5PtM80b4D1aAUf9o/hPKK1aukTfo4CCnHwe9mWTYQO+jKROooxCSElNt5PVUMOHIBM8RSt8UN047lC6MaAPYEIoWhL8cRnSYINzELGpl9BaBEcvs5O62XFBBuyx9/YQPRcJR1bR4iAgPlIdClgMSVAcXWiH/4LmEQJ40mTALCiTyxYZRTaSYav7/0AjqL2TBIybz0CToOKGdAw7FVdBUO+7vXcwwzoORo2JCksZt6eY0cRST22QhrDegYHKw6OgLaGk0Cf0NKmedNaIOi5wd/lBQYXvIviSTysVyWsBxR68KWCKFy14Gf3A450EU4uuPGBgr4psiV837Bvew== 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=bjyBASpG3OIgRFmLvS1uKMyOTyw7RFuOihhYgpyFsLY=; b=fddFOrPPYC78sEdiZdeqb7j4TRCXd5jvkvhMVUg5ewIg6+sx+R1+HsyHhP/dQYvlc6KSuAvm16UPGDIuxauJDMs+KdDSWzbzd1o3RUp8gfcRTpAfMaJlKdhotQYxl13ziPUwHnIR6RF/o1axtymwPq8yo40KJfPn33iiStp60IHo07Y4MUe7wI0oz2eguszs4qUUHsH3tc5fvPrw7VtwLpCWC2EDbTmnjZTi43rTOU1TkKBbtAwTBeUoQkhouBeA70jY8W/X8i//YcRNw4fetyA/5cHCdO1yeDQcR37D51NtJmy0DxR/Fdx+oa717CJ5oUywjvxWejL5MkLniXv1eA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6P18901CA0023.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:16::33) by VI1PR08MB3807.eurprd08.prod.outlook.com (2603:10a6:803:bb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:44 +0000 X-Received: from DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:16:cafe::80) by DB6P18901CA0023.outlook.office365.com (2603:10a6:4:16::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Tue, 7 Jul 2020 12:48:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT038.mail.protection.outlook.com (10.152.21.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:44 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 7 Jul 2020 12:48:25 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:25 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v4 14/15] .python/SpellCheck: Add 'XIPFLAGS' to "words" section Date: Tue, 7 Jul 2020 13:48:08 +0100 Message-ID: <20200707124810.50668-15-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(396003)(39860400002)(346002)(376002)(136003)(46966005)(336012)(36756003)(81166007)(356005)(6916009)(4326008)(2906002)(8936002)(8676002)(2616005)(86362001)(7696005)(426003)(26005)(186003)(4744005)(47076004)(1076003)(82740400003)(478600001)(70586007)(44832011)(82310400002)(316002)(70206006)(6666004)(54906003)(5660300002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51b951fa-8ace-4e11-8ad6-08d8227419d6 X-MS-TrafficTypeDiagnostic: VI1PR08MB3807:|DB6PR0801MB2056: 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: q33gOBuliLZDIfbyzJxfNjUYR3dpGQh2zCIL3X6+UaKLwg9uQ2IMt9nKMPI6kpoFGRmxEwM+UxPp42UGuY5H4+hjkQnhFksdRIifQjprbWT5ZIFFwdECU2gr4o9vLLJuvE+m39wU6J5gcQkiexr/IpePrzvg4pQtdutx5h9zlTn3/K0eE+/oVZ17a6vWVtzLKxFyvsY/1UQe4sbpHHHqN+rDmWzCLkfy8X7XSiFbnluo7otO3w9wCaskN+dNC3NiviSjbfEDMUqUAPEalDcWwJrqdJn4T9T8qcy1nMg6+7MdEYEqOAOLfm2EWlYZj5Zu+l1Xw75I5AInRZ4OwYpWKdCNJfzQCa0jnx3TO9nVYXFI7yJFz4tw6KNF+wRTHZj8WM/M/B8cTfHJL9zzZamA/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3807 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: af4bf08a-a139-4a1c-6d31-08d822741557 X-Microsoft-Antispam-Message-Info: dwErFv1UC6ZdLRqI+px1G2XgHCLb1T2kFXdnDVIYft+lFmP4vMUkOCyvmwbHOH0x2Q1RfITbFVdME/k20m9Y35wYUZZbZZCo7Dg2lRhgzM6biVUJ9w61f36C//qB9kBLk6LeAdg1wVAIbUWBBpzPuq8+AJxXeXhwmn2yoY9a97x044fq0qzWulCv3znvRDzhzeweYMpxq8fM/hSza+GGbBKrvKQB+GixaesV1kj//uehkSl34UbX5E1vEmM0GuCyorpwChnVk4HZJAN/p15OX20zHU0PlbgMJf65SB1pHZWRrVoDBFa4L+nXfXot6loWKdy9eDudOhgv0XIkMQkLGNbsQF1GmuuddrT6LV/NhpRaBZXt6oS7nZQFSrJ2UYihdE7hI+sDVp8iqln5DOypTQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:51.7906 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51b951fa-8ace-4e11-8ad6-08d8227419d6 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: DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2056 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: pvMdeMKhM2tS1m1memtTLwDux1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126135; bh=Lpos8IsORKENxkUfOjWxBmHJFbSIh2HLDEYhRWaX8C8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=EN85IbgkPu+ClDu1QclwF3RBr7wBC7KH7sQgsk/9eOqMYR16/ku1CNUDbj3CBheDrvD JTnU4OgIH0ozzD9kPEFXjyuwo2jlf2a0CGQyL6+T4ULgA9lvXb1ysvvfECJWJi/NcVr1e u5jaNpIPhdA1LZsYywLmkjpgUcyMiPvSFus= 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 --- .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 (#62153): https://edk2.groups.io/g/devel/message/62153 Mute This Topic: https://groups.io/mt/75354101/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 Tue Apr 30 12:40:20 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+62152+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1594126126381308.92533763833865; Tue, 7 Jul 2020 05:48:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id gKwBYY1788612xtJRmRIOWUS; Tue, 07 Jul 2020 05:48:46 -0700 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.54]) by mx.groups.io with SMTP id smtpd.web12.15352.1594126124372012074 for ; Tue, 07 Jul 2020 05:48:44 -0700 X-Received: from AM6P195CA0019.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:81::32) by AM5PR0801MB2001.eurprd08.prod.outlook.com (2603:10a6:203:4c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Tue, 7 Jul 2020 12:48:41 +0000 X-Received: from VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:81:cafe::d5) by AM6P195CA0019.outlook.office365.com (2603:10a6:209:81::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Tue, 7 Jul 2020 12:48:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+62152+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 VE1EUR03FT040.mail.protection.outlook.com (10.152.18.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:41 +0000 X-Received: ("Tessian outbound 4e683f4039d5:v62"); Tue, 07 Jul 2020 12:48:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 964d053afba15fdb X-CR-MTA-TID: 64aa7808 X-Received: from 44f7e3537004.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F0B9187B-F871-4AB8-B543-07DD97EDB7F8.1; Tue, 07 Jul 2020 12:48:35 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 44f7e3537004.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V0G21tmJkYOPc8e7dlOy4Id7SX+NBzKOZkYC5WfJh0th4dTLDM0IGtq1UMfW/vuR+20dA3VGBKukGhPEHjtdRB3e3/vpq5cL4Bn5SjEeK5FxW8JB8MqBvAXaU/dizz6A36tzFFTyer/xbNKUIJ1+yPkYXALWCfBOrmOH1EFRuoO+iuxHbEE4qgELIUGyRdMSIthNq5RErmqeZIIT+La24MyL8oe7nu13mkvElaJTc+/fYCHHe62eZPC5ROQg2LYpoBHPX7Zvj7ScKM6QkQgoIKdOMgtXeNZ5aZiUeN6T9zdJIkRQfU8f7sEemNrZpWHi+7ObbFZhI0sALrw/OGGpgg== 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=ROk9Pk9JwiVO4XEOfv3rvZ6zktLuC2jQs53VQmdaSZk=; b=fw6pkPPjb8RfH08mqG3dcXmpYOBEadbw0d8U/NUmQyrJb8FD2JWdPhVcOQZauy238Adf45hP/vsnhBWvcaJf3IMXRfc8vptpUcm8LdOVzfk2LaQI/2N/ES4sq+7uU0wNHdmP/919+lX7eBJ9xUTq3r4b2rEeUAgjW/QRb8iRVLXAJ0LtVOpeT/YD2tt8dWslprdhfUCEFZnos7w57/GlFm5C0sOhEiGUKVCY7ivc6odnQ6Vkrzyl7CKUu197tHERtj+bt06V481M3TQIuzPKekjN6lo2RhbdiDy6uWaVmeU8904vz+OTNeWggbC4WN/otYeMvwX3EdqzbK7ESAXENw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR07CA0166.eurprd07.prod.outlook.com (2603:10a6:6:43::20) by AM6PR08MB3878.eurprd08.prod.outlook.com (2603:10a6:20b:8b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: from DB5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:43:cafe::ad) by DB6PR07CA0166.outlook.office365.com (2603:10a6:6:43::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.9 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT064.mail.protection.outlook.com (10.152.21.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:32 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.1415.2; Tue, 7 Jul 2020 12:48:26 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:25 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v4 15/15] Maintainer.txt: Add Kvmtool platform reviewer Date: Tue, 7 Jul 2020 13:48:09 +0100 Message-ID: <20200707124810.50668-16-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(46966005)(4326008)(1076003)(6916009)(44832011)(2906002)(186003)(19627235002)(7696005)(54906003)(6666004)(498600001)(966005)(70586007)(70206006)(336012)(426003)(2616005)(26005)(47076004)(81166007)(82310400002)(8936002)(5660300002)(83380400001)(36756003)(86362001)(8676002)(356005);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7143ad49-618b-496b-12a3-08d8227413a4 X-MS-TrafficTypeDiagnostic: AM6PR08MB3878:|AM5PR0801MB2001: 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: klgobN44eb7TsNx31cVOpljWpwduSN1Hy/Ei1BCkesDDQoTARsH8MFRogMv//czdYWIRwArTkMKMsUJ+laibOrEY1TSBmeIfuFcEiLGs6sp8+sFN55yBzudjGzVMDwApMwyQRIHO1/Y5xJCkwrZNbORir6WxtVH+QuBwgPGpogjCCcHU+ijSQHECHdwJqjxAr+duSJruMYQnswhMzuh7lODZ8Qf8Bh/KzIgppvsPB7Wee3vOdJO+JjtMlLmoyRn+7a29UgNT1bKgCqUOMDFjKaeU14dHSASB77/W1cMlybrB75kQeEb94fZTN5+0tYi2dvrC5WluHkvhd826XpR/u5bZn646PXgVaXZBWrffCpoTeW4dQZF3k4gnVncS62WjLxp2WqoB28gMkwBXGthTyw1Jc28iBU7xM4CNi09sZYxWRZNdYb0RWdDQ5RKa4PXEiO7NIW14315EMq8QezJOGkQWge05Yj+4mOFsgnkTgJw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3878 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 11f12c36-7ec5-4c06-94ac-08d822740e35 X-Microsoft-Antispam-Message-Info: 0ID924P/J4BaW3/TfL0N1rWq6mzGoKwlLi48RdkfWlEj2KWqBwWrmLbjnIKz4N9obJZ6PSO+n6qKgsNvi+IZd+NMYOWz+7GF71RPsh/dz+3w7bJjo4aDxQdMz1R2kKonSJAa+jGo49+tpQOW/78DfqqrQY+7xFWMzBMm4Vx8HYKInnzMZ7RicvMZ3npJ/AWO6Q9GKSz1RPcCTZxVlJWenLLkZNmeI9l/elaTlsI9r8CTPbZLsDTp3dAuWt1VFc7L1V80xSsudRK6jDahaDZftLHZrXtvGgO1qKQSFou/2xTlhTbLFiGEvsFOHsCp8fRuKg3mK4yfgy5/2zKhegUVcE23kdlYxLn3zHQOd0O8U5ESK4BrvH9c7a336iqCYClgGL1U/hvARJeFaCbStFzVY5QDMPMo0CgsBDQjE6byGwufIaa3VZbrZS2eUzMpx9+VXR7GzdjNFhGEaw8wy/phhpBYPINKDmFy/qHLaw+cFoQ= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:41.2896 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7143ad49-618b-496b-12a3-08d8227413a4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2001 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: E9IpCFdmmRiUCUz45pqxOASbx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126126; bh=v5YP7GYTME2G4yso5JX19pEGY9kETVOcUllRYCSyWfQ=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=UdBPf7Zr1twGVdHsfXTtQOqLlFLj7tFhrdpuBbONh+J3/dkvhRnt89xkNyCHrXz4Poj RsifQUc7sUX/kDfIYX39Zv4XbcISXvWRxfCSASGxDWwTM3wBQy8DmWTPfCSBA9D/r8SVC kriVp/C0tKxpbaU63ADzOLaVtdjYAS9N4yg= 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: v4: - No change, resending patch with v4 series. [Sam= i] Ref: https://edk2.groups.io/g/devel/message/61726 =20 v3: - Updated Maintainers.txt to add reviewer for Kvmtool platform. [Sam= i] 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 32c9003a6209f38da4e422191a4ae327fd166dc0..2d9aefa6ed3181553ce908ddd85= d6078fd5f829c 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -152,6 +152,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 (#62152): https://edk2.groups.io/g/devel/message/62152 Mute This Topic: https://groups.io/mt/75354099/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-