From nobody Fri Apr 19 05:34:53 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+61661+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 159300571540693.41007790078447; Wed, 24 Jun 2020 06:35:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9VdkYY1788612xWh2Tl8U6k1; Wed, 24 Jun 2020 06:35:14 -0700 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.89]) by mx.groups.io with SMTP id smtpd.web11.13560.1593005712969325109 for ; Wed, 24 Jun 2020 06:35:14 -0700 X-Received: from AM6P195CA0012.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:81::25) by AM4PR08MB2852.eurprd08.prod.outlook.com (2603:10a6:205:e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.26; Wed, 24 Jun 2020 13:35:10 +0000 X-Received: from AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:81:cafe::f) by AM6P195CA0012.outlook.office365.com (2603:10a6:209:81::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:10 +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+61661+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 AM5EUR03FT064.mail.protection.outlook.com (10.152.17.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:09 +0000 X-Received: ("Tessian outbound da41658aa5d4:v59"); Wed, 24 Jun 2020 13:35:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 618613406a851a1e X-CR-MTA-TID: 64aa7808 X-Received: from 0d99594e3aa2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E682D425-02EA-4803-958D-31201ED7ACE9.1; Wed, 24 Jun 2020 13:35:04 +0000 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0d99594e3aa2.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gr1I77sKEycGvdc1X++MDo9kZq7quUeGaC8sPxV6MdVEnw1zkgg3euwd0dCwXVuz2RHRH6iv9e/uyB3shZgtDFyWRNWQDwMfaMoPSCyibYD7D4Kwppp1RQQH4yENsY9z5/Hi8kVR4V0zMAyrJjTsi1sm1iMvk71/22YZ9Fe2ZVAjt8wOa4W5b7I8wI6Af5aN2jG0Qa1NpGAXoLVmQAWcM/rmn2iUfeN7oqvvTpU7QStFJ0cVnrpe5iBO9pQ2mARwJJYGz+YM/uQD65Gbgi45pEV1uFgY9CzCGEbqLDijOBs0rRD+05CjxnaggFdhUP3CbVR+MUolmBwe9ThrwDGQWw== 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=wRvPTbSW6GATa7UeGE1oHx1d8D3NB2Ex5DDqdVOMIFI=; b=MFf5iWdVblbmdggrri8Xo9UkbRO2cajWIEL7/uZw1e2IEeRqmGMvD/v2YItvXcZSQT5oiEATxTl+Sf59H8XudJQACJUUalR5OM2p4pZbQIv7OF2BNUUn0j2XT8E5Hzgz8gXnR/tN87hya/ora0CDLLcPFoB/y2O+BKagLDBNmh+7DQIoQ1r0xyEc+Sm0fZRqmX+0yryyWkh+r7JHwpgcVrts78milGcuT/KtogeY3Ojk6P6qdwS0kXAX0l6fLHBB06z3O8Pq/akzrQ7W9DIeCMIPnSckOO5jWNIwH3lFCLSIB6d5LTVrprMFXMVr80/xAvkpqBWLRDRpuxmI+MvB6Q== 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 AM5PR0601CA0067.eurprd06.prod.outlook.com (2603:10a6:206::32) by AM6PR08MB5190.eurprd08.prod.outlook.com (2603:10a6:20b:e8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Wed, 24 Jun 2020 13:35:02 +0000 X-Received: from AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::9c) 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.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:02 +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 AM5EUR03FT039.mail.protection.outlook.com (10.152.17.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:02 +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; Wed, 24 Jun 2020 13:35:01 +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; Wed, 24 Jun 2020 13:35:00 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:34:59 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 01/15] PcAtChipsetPkg: Add MMIO Support to RTC driver Date: Wed, 24 Jun 2020 14:34:44 +0100 Message-ID: <20200624133458.61920-2-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(346002)(39860400002)(136003)(376002)(396003)(46966005)(356005)(83380400001)(44832011)(26005)(82310400002)(4326008)(7696005)(36756003)(81166007)(478600001)(966005)(186003)(70586007)(2906002)(426003)(70206006)(2616005)(316002)(54906003)(82740400003)(336012)(47076004)(30864003)(6666004)(6916009)(5660300002)(1076003)(19627235002)(8676002)(86362001)(8936002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2fba8db3-85d9-4d98-05cc-08d818436a5f X-MS-TrafficTypeDiagnostic: AM6PR08MB5190:|AM4PR08MB2852: 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: SYkQngdeH/KmJuYzPh9hyAeLyNj/RfnmwkN4D7QARf9CTBSbZW2Dx7XjyqXdhUhPFQyRkA0Xg7o6ZMkp/TFjUcd22fCmQybaEcZQsq0E4sLAviVFFI8W9/TePxdAX8OVvmjWn23yWL0k9PBUvC072jniRKq4OUBqFy3NDboLUM9ByCbzot7mS3sXfa0Vpw2WT4xytlkMLzey2xZe33Y66+WxwNjDSaIbWv1eQ6OToxCCZn+yGCHbnNQD6szzqVdN3eHmIEsY7edzwHeWQnSUC0cHE5djlmKCG4B9XwDS7/wFe8ryMk9KWIBmKnXsB6+RrWzpav0qmWQ1S85IgUuV7hEEgW+wxCtnLk+QhH+vUAiWH0jM2gf6S1I9qP/HRnEsR25CiDYY+HvOooHhdbhc3NW49mlE7n3y5G/tXHqR+iLb6YExCyekv/YenzLO4bkVAIwUEh7HwaITGeNygrMnnd9WVPWI5S2ndtPofLjSzdc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5190 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 308e3085-d65f-4ca9-1d41-08d8184365c4 X-Microsoft-Antispam-Message-Info: ZmCLWP2dOoHYMjszw2bavL1C0f4++m1ArM8koDGWalKEkUOC9wQ7mBu2gVEsWDmemlZYAAsMzRrNxu9hP9D/9wwIw9Ihz0tu8ihu7L52gUZsNdVSmvLoAisgt0SGQOioaH86SP1RIBaztVLmBio0aFGOyb8s1OL7lNHLO87QuDJHNg3VWnxD2/UxChG+UCCZAPtSxtKXoWHnCefN47Zl9WF/aedYFjQ0SlG/LQVBpv0f89aQtMEtTPDDXrmDavn5tWAdk6orcmtvkn2okAKCWCou/D7n2UXXPN2SOKnlOtHgriq4Q7BN2TLdOmUr+ShhQ0+fdazRHFLFaYRetdYwEyXxEj2Cc5zU3CmkkMGSZMVzfAXopL8chHRHIIAxCzqrr5OvyCitm9zyE8cBcr2up1ECXFauXieiLlscyt3rFFeXC9jG+9GnNz/cgmtlNMzhVN2UcfnaTUH4JKBo6mpvmufPyDhpVeAcnv487mXrIqs= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:09.8643 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2fba8db3-85d9-4d98-05cc-08d818436a5f 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2852 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: 5BhxmVQDOB6ZF9pLADzgTdvVx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005714; bh=QeMrxnQeHkjnjebQhclqxY2cIiqtnSptD7DZVzo9200=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=qDx3GUNhITu2s94xNBuhyq5i0+T3W4UR0ep+Ut3xeM2/tp+dzNr5aN0qrDZewsjwVNt ui7Ka5sw64lev5crA9QOD+7Vtm57T6Wwb38yaDou6jLhcbT66/8XD3cqoKddJkPP8bHSU czSlfshe8I7w5MoGjE5rAe9VXsXPFji7Li0= 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 --- Notes: 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 MMIO access [Sami] - 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 = | 119 +++++++++++++++++--- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h = | 31 +++++ PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c = | 72 +++++++++++- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf= | 8 ++ 5 files changed, 230 insertions(+), 16 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..5ddc06549103ce9944054d3a05b= 73803f7037ec2 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. // @@ -21,6 +25,28 @@ UINTN mDayOfMonth[] =3D { 31, 29, 31, 30, 31, 30, 31, 31= , 30, 31, 30, 31 }; CHAR16 mTimeZoneVariableName[] =3D L"RTC"; =20 /** + A function pointer that evaluates to a function that reads the RTC conte= nt + through its registers either using IO or 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. +**/ +RTC_READ RtcRead; + +/** + A function pointer that evaluates to a function that reads the RTC conte= nt + through its registers either using IO or 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. +**/ +RTC_WRITE RtcWrite; + +/** Compare the Hour, Minute and Second of the From time and the To time. =20 Only compare H/M/S in EFI_TIME and ignore other fields here. @@ -54,41 +80,96 @@ IsWithinOneDay ( ); =20 /** - Read RTC content through its registers. + Read RTC content through its registers using IO access. =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 +EFIAPI +IoRtcRead ( + IN UINTN Address ) { - IoWrite8 (PcdGet8 (PcdRtcIndexRegister), (UINT8) (Address | (UINT8) (IoR= ead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x80))); + IoWrite8 ( + PcdGet8 (PcdRtcIndexRegister), + (UINT8)(Address | (UINT8)(IoRead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x= 80)) + ); return IoRead8 (PcdGet8 (PcdRtcTargetRegister)); } =20 /** - Write RTC through its registers. + Write RTC through its registers using IO access. =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, +EFIAPI +IoRtcWrite ( + IN UINTN Address, IN UINT8 Data ) { - IoWrite8 (PcdGet8 (PcdRtcIndexRegister), (UINT8) (Address | (UINT8) (IoR= ead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x80))); + IoWrite8 ( + PcdGet8 (PcdRtcIndexRegister), + (UINT8)(Address | (UINT8)(IoRead8 (PcdGet8 (PcdRtcIndexRegister)) & 0x= 80)) + ); IoWrite8 (PcdGet8 (PcdRtcTargetRegister), Data); } =20 /** + 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 +EFIAPI +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 +EFIAPI +MmioRtcWrite ( + IN UINTN Address, + IN UINT8 Data + ) +{ + MmioWrite8 ( + mRtcIndexRegister, + (UINT8)(Address | (UINT8)(MmioRead8 (mRtcIndexRegister) & 0x80)) + ); + MmioWrite8 (mRtcTargetRegister, Data); +} + +/** Initialize RTC. =20 @param Global For global use inside this module. @@ -113,6 +194,18 @@ PcRtcInit ( BOOLEAN Pending; =20 // + // Initialize the RtcRead and RtcWrite functions + // based on the chosen IO/MMIO access. + // + if (FeaturePcdGet (PcdRtcUseMmio)) { + RtcRead =3D MmioRtcRead; + RtcWrite =3D MmioRtcWrite; + } else { + RtcRead =3D IoRtcRead; + RtcWrite =3D IoRtcWrite; + } + + // // Acquire RTC Lock to make access to RTC atomic // if (!EfiAtRuntime ()) { diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h b/PcAtChips= etPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h index 47293ce44c5a1f4792892892f7da40d7f0a5a001..4074261c2ca5dbc7b0727ea7961= 154eaf41c0e38 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,34 @@ PcRtcAcpiTableChangeCallback ( IN EFI_EVENT Event, IN VOID *Context ); + +/** + Function pointer to Read RTC content through its registers. + + @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. +**/ +typedef +UINT8 +(EFIAPI *RTC_READ) ( + IN UINTN Address + ); + +/** + Function pointer to Write RTC through its registers. + + @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. + +**/ +typedef +VOID +(EFIAPI *RTC_WRITE) ( + IN UINTN Address, + IN UINT8 Data + ); + #endif diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAt= ChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c index ccda6331373bfe4069b0a59495b5e5cc731c8fc8..e30883e53333aae655bbf891f86= d1a6ed739715f 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c @@ -2,16 +2,33 @@ 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; + +// +// Function pointer for the Rtc Read interface function +// +extern RTC_READ RtcRead; + +// +// Function pointer for the Rtc Write interface function +// +extern RTC_WRITE RtcWrite; + /** Returns the current time and date information, and the time-keeping capa= bilities of the hardware platform. @@ -106,6 +123,34 @@ 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); + + // Convert the RtcRead and RtcWrite pointers for runtime use. + EfiConvertPointer (0x0, (VOID**)&RtcRead); + EfiConvertPointer (0x0, (VOID**)&RtcWrite); +} + +/** 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 +170,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 +215,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 (#61661): https://edk2.groups.io/g/devel/message/61661 Mute This Topic: https://groups.io/mt/75081468/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 Fri Apr 19 05:34:53 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+61663+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 1593005721591868.9165059761671; Wed, 24 Jun 2020 06:35:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DCMcYY1788612xS4AflAiESx; Wed, 24 Jun 2020 06:35:21 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.52]) by mx.groups.io with SMTP id smtpd.web11.13568.1593005720210673353 for ; Wed, 24 Jun 2020 06:35:20 -0700 X-Received: from AM5PR0202CA0018.eurprd02.prod.outlook.com (2603:10a6:203:69::28) by VI1PR0802MB2557.eurprd08.prod.outlook.com (2603:10a6:800:b1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:16 +0000 X-Received: from AM5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:69:cafe::56) by AM5PR0202CA0018.outlook.office365.com (2603:10a6:203:69::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:16 +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+61663+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 AM5EUR03FT024.mail.protection.outlook.com (10.152.16.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:16 +0000 X-Received: ("Tessian outbound 8fb20e43acb7:v59"); Wed, 24 Jun 2020 13:35:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 32e2d332a0b52ff9 X-CR-MTA-TID: 64aa7808 X-Received: from 40b7ab3dd150.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 01DD39F1-7A2B-46AE-B9F6-921D7741F4EF.1; Wed, 24 Jun 2020 13:35:16 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 40b7ab3dd150.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ARBMxS93jkDg0UufPMCz/81TxGaAMswWxmKfMKR0j69c72xyHuVDl4Tfsb5hOISykiJTaXx6AMMrQj9xWyoXDUTThMsbiXR7b1veUTXYPILqox8RymZFhLInh9MZed+ZPWXE98GHRgGt5LyjVR8o4WkaCglfiTLkBdqhPTebQvIfHuQiYkOItxAsFiuf9CceNqH7BClpe1k4htYJtB7lnEa7XjA6mRtXTGd47FtXMnvqfzdUbcGPag463Agya2EICjxaDw8iVQU+MX46AII5CZrJ7Fl8zosWsG/DDfFI8aOz+QmjvesxxmtBBPNfYnd8IkzM5KmkPd7bTEEdx1RfWQ== 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=t4p8/JTfji+dTaJ3KeTTKkeIjAjaQf1fYpabvg9n/Ng=; b=b/V64fttJFmIgz4pQhdVQvwFLcHKW5TU6PTqpRsuHqHcwIrSrRviQyYMhnh0jnizRyOgxvqeJGT5oy7T8A5Oe0FNB4AwGFOD7BZPm4i5J9SAh2N12b+bb+n5hJJ8U2AOBc8kZa0wQs2l9e+DKfQu1rwqErR12xf0LzN7FJDpez3zTw5OaTu/Pdtve/z5Wk9dMF7eAbdqZLgjJq/KbGVIe5b2QIRQpUCwtNF+8DLOLWzqyShzwoJ88chCoq0JCp7xLObZ/yIOcqhuOK1PxheBKhhixfMQEnaxQBwJDHLtfLTPrLGYt4TXJFluu4kr4scfycMJ5ky0ZIU38DU7njkb/A== 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 AM6PR04CA0070.eurprd04.prod.outlook.com (2603:10a6:20b:f0::47) by VI1PR0802MB2430.eurprd08.prod.outlook.com (2603:10a6:800:b1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:13 +0000 X-Received: from AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::74) 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.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT042.mail.protection.outlook.com (10.152.17.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:13 +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; Wed, 24 Jun 2020 13:35:02 +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; Wed, 24 Jun 2020 13:35:01 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:00 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 02/15] ArmVirtPkg: Add Kvmtool RTC Fdt Client Library Date: Wed, 24 Jun 2020 14:34:45 +0100 Message-ID: <20200624133458.61920-3-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(346002)(39860400002)(376002)(46966005)(1076003)(44832011)(356005)(81166007)(5660300002)(6916009)(8936002)(82310400002)(2616005)(336012)(316002)(426003)(8676002)(47076004)(82740400003)(6666004)(70206006)(70586007)(26005)(7696005)(54906003)(186003)(2906002)(36756003)(478600001)(83380400001)(4326008)(86362001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea043509-8114-4610-fcee-08d818436e20 X-MS-TrafficTypeDiagnostic: VI1PR0802MB2430:|VI1PR0802MB2557: 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: QI/+q2X7M/+TlQOfWhrSBdWuvK2fxHTtJq/qQLtiKeuRX9xRxKG71bPkyiUokhBtJ0IFEnA5bz4/5/xIBq4Xzmnpa5qkhFWlGChnTGhP7aRhSZd23kl1XyzhRNNXJTEuJE91gsD+XSWH1VY+jR8RJ2x6WwRgS9U6yA2noP2OSZZOYp6ZUr9SFzBrVVuayafhuV1nXiw+a4kEtZOKI29AJUCg+1XYkdGA04TIy0Z/MjTbReAJW118GCIq2Bqq58g2cVqv8wt5pKlh/XddYYtDN/Oc67VpEJOjnKHzbPNpHPv+0DqNz9+PnefPFJmCcyTjw3QTA5iRV4fDjWdAj8VTuvrfEQGsCYOWkx1pvzZY1MxE4/2H7s8xIvnVWRobQNrEZogX8a7zmQcZ6EhDRBinfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2430 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT024.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2b146275-10da-4d71-f8c1-08d818436c91 X-Microsoft-Antispam-Message-Info: VDbzJd4JJQHSiHwAP24pxEeBiXmsGBt+coSJt9ny6l/4pXXd1VoP5t1aq4DXz9BSsFCvK+bS5046Kbf8EYcakKqXjWNd/rXBbf0nKKhN7Uif/MHXbNHIAHvlQcP8KZ5Z9vjJap33fyzd2ROuXsEoyJmVk68qUgVUrhym21lmz8M0N/w+hnrGJNI8SHDYrufK6D+AkxnRHG7BXBwNkl20t8Xi0tTlyWlskf8i1nwobsj76YgCaZ8OPZgLi76kyJ4djU2eFwHlQPrk+BVVze+zjj+sOnVjcni3Zr4pOWrjtT9ScXh2al5idkPBN1nI64umwi8JTs5aGTHzUnNDLe3++svO1nwNJ7IZjlsshiONlCvM040ND4GworJEwINHde2kU2nJDopexWFLHMjrGzmZ0w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:16.1857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea043509-8114-4610-fcee-08d818436e20 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2557 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: OH3536fQvWMbovodG61UuiTox1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005721; bh=eJfIUUTO+Nou9elOiNgqiHNmvENHXzX+nOLsGLA+CqQ=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=iW5PMFiKpspc8n9M9lvjMN8WGFN8BW/y4eBO9kkLe9ME/uB69S1nM8fwgFb81dYhidp EMreIai/1DHYgiJCd7Tflqmfc/dPeQj8t8PhJr13Jr+UtNTd86MNjfUiUgUl/vgHHyisj H+sfq8e2ig2O+zVS/Difz87mM3258uD85Rw= 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: 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 | 255= ++++++++++++++++++++ ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf | 42= ++++ 2 files changed, 297 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientL= ib.c b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c new file mode 100644 index 0000000000000000000000000000000000000000..2f38923187c1a621578413be9c3= 9fa425bde2ed1 --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c @@ -0,0 +1,255 @@ +/** @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 +#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. +**/ +EFI_STATUS +EFIAPI +KvmtoolRtcMapMemory ( + IN EFI_HANDLE ImageHandle, + IN EFI_PHYSICAL_ADDRESS RtcPageBase + ) +{ + EFI_STATUS Status; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR Descriptor; + BOOLEAN MemorySpaceAdded; + + MemorySpaceAdded =3D FALSE; + + Status =3D gDS->GetMemorySpaceDescriptor (RtcPageBase, &Descriptor); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, "Failed to get memory space descriptor. Status =3D %r\n= ", + Status + )); + return Status; + } + + if (Descriptor.GcdMemoryType =3D=3D EfiGcdMemoryTypeNonExistent) { + 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; + } + MemorySpaceAdded =3D TRUE; + } + + 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 + )); + if (MemorySpaceAdded) { + 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 + ); + if (MemorySpaceAdded) { + 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 UINT64 *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 (Reg[0]); + Range =3D SwapBytes64 (Reg[1]); + 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_SIZE = - 1))); + 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 (#61663): https://edk2.groups.io/g/devel/message/61663 Mute This Topic: https://groups.io/mt/75081472/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 Fri Apr 19 05:34:53 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+61666+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 1593005729829967.6069373005676; Wed, 24 Jun 2020 06:35:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id i5MxYY1788612xEZPywrsxPs; Wed, 24 Jun 2020 06:35:29 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.41]) by mx.groups.io with SMTP id smtpd.web11.13571.1593005728052522409 for ; Wed, 24 Jun 2020 06:35:28 -0700 X-Received: from DB8PR06CA0035.eurprd06.prod.outlook.com (2603:10a6:10:100::48) by AM4PR0802MB2243.eurprd08.prod.outlook.com (2603:10a6:200:61::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.25; Wed, 24 Jun 2020 13:35:25 +0000 X-Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:100:cafe::ba) by DB8PR06CA0035.outlook.office365.com (2603:10a6:10:100::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35: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+61666+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 DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35:24 +0000 X-Received: ("Tessian outbound 2ba684f51d22:v59"); Wed, 24 Jun 2020 13:35:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7db705fc401e1ae5 X-CR-MTA-TID: 64aa7808 X-Received: from ce6256ccf3a0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 747571A5-B2CE-4711-B09F-54EFFC77FAFE.1; Wed, 24 Jun 2020 13:35:19 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ce6256ccf3a0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DfFa4pozydtvrB0RDStz/dutOknEwLKqLpy8hqt2r5HY0hq6qkmdHFj8GJzNXrs3PiVKdpACjUw39C09Kkg9asEPWsaHimAhyCSGfXoJruwDyhOneSWa1GaU6qzGES/5xBg6Tk/qYWIGh5PQM1bkPH9IRPTalKipUhxrER8GhfN295Ei0hh1Vs+yR5h1+hIWmi5XgdHO1K63nSMJZaOW4z9OevKE+BOT9zNuYWPBGKeF/eDCnuSfV7yaqoxmAk9AOj+tRAR7CkEefWavSYH8qnSafC+0WUlzcsejl3SfyJgwulNUdYYbcAZydCD+JME/Y1AEnCnKKn+a9w7HrIx8GA== 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=NSdcUhk3dmDXIjlgcN0nygMbr7OBsRVZR/kqbKZzTNI=; b=n7OV9/3nLFOHTyJXjcSFo7Na6ec8RGh2bAAQXBZOTM1FTLihVUKS3GC9Jz6JO5wemrnlfUrHSJMg3eCuu7+saBqROrBXi2Xuxa7AvzDqOcrgVfcOt1AVLgNHFsJGuEUhfmhMZGMTe1SiNl2osmubI7rs3vIPuMGawhV8xu/Dc6Ko2VzjLeqSCZPzbhXqUrcLPNYzbptnQ5yUT34QwE6C8fzjZLUbNQa7JKMFC6cXRGXxCnjSjzgh1mzhJdBjEUzwqwUdz/sKqBNMO7Ifppc8rk/P5FYxw9V1g6+YotlqhYcD32S+3YHb4OKdy17Dkmg94lHd+2Bmz4gx0IJ+tiL4fQ== 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 AM6P194CA0040.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::17) by VI1PR08MB4222.eurprd08.prod.outlook.com (2603:10a6:803:c0::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 24 Jun 2020 13:35:18 +0000 X-Received: from AM5EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::e3) by AM6P194CA0040.outlook.office365.com (2603:10a6:209:84::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:18 +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 AM5EUR03FT060.mail.protection.outlook.com (10.152.16.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35: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; Wed, 24 Jun 2020 13:35:02 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:01 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v3 03/15] ArmPlatformPkg: Dynamic flash variable base Date: Wed, 24 Jun 2020 14:34:46 +0100 Message-ID: <20200624133458.61920-4-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(136003)(396003)(376002)(346002)(46966005)(82740400003)(4326008)(47076004)(966005)(36756003)(44832011)(478600001)(54906003)(7696005)(186003)(81166007)(316002)(426003)(26005)(2616005)(82310400002)(356005)(6916009)(2906002)(1076003)(86362001)(6666004)(336012)(5660300002)(70586007)(8676002)(8936002)(70206006)(83380400001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0729df7-bed1-43f2-3566-08d818437356 X-MS-TrafficTypeDiagnostic: VI1PR08MB4222:|AM4PR0802MB2243: 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: iTd5rhcqhbm1fI/LpacuSabPqML7Tx5AX2fdmm1p+Q7RHhU/2wCQukjouHLH5K2wW9YfISAUQDsFKd5+wSg1hSCIt/Wv/GossF/v+/bemjixesSgHyP8/MQvwY2VrgwiS+R3cNNFmFyWBh3wU47awnKtmg6FwJ4/0d3X3DOK+apq/Gfiw15PTACOLOsl2tngR1m5hcftfbkDFgbMv3gmwrbTUIGlRFtxZxU0Z18IAWgImQUY4o6IT368gdOd5Ild8INUE785cp0POhmVWsnY/Z6+5o6a1dxgN2c8+GFIcv7evTatRvlz3NuDuTCQkp5N+GYE9DO/1g+iLk29YXwewMzxN777uOFqWUI/vHgKpS+7yoV6Q6Xr0Gd1wG0NNSQTZRtR1jMQoxCHSPmkF/wYbeYXFPR7ltDLqcWvfk6FVpy+jg7TbwmmF6j9jwUkhOlZhlD+Kk4YfnkNo1Pu/B0OI2q/T9TSmmXgHgQH8wLfexo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4222 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6308eb83-cf0c-4b91-f0ca-08d818436f1b X-Microsoft-Antispam-Message-Info: mdX4urS8bHifGSI9cT5OZLNVEv/a5oOzdMuG8ylE9/HjIcPgWaFpuVNPn7cyWDY/jGKTscZyUPol5IEDJCSKfAzC0ME5nxJR9j2as03GmMc4jDvpR7tsirfkSshKGvb90q9Xq6miHtyNwWPNToiboOS7LYm/sMwRK5HdR/fmjni/dfB5b/B9c5/EdA8GOkZFzTa/jb8QotQsmDsmKBDitMUNVS4IlFDatc5v23VQxnlWPHe4/c3vuzr9QMklGKCLr8Sn1Gs7MYxzN4tNdH4+8QV36Mr03qCzlWONNqF1wkn0NYkiR+nuNPzKkTuSWYGuhhQsDSgxctuw2P0Wse9SK/Pjud5mHGRyfIqZHy418wMabPER+BR4j1dysaPOzeu3XM6kxCUJRGLzrtd2t1h5E4OlHFU6RIZ8raqHnixbrI7CglVhD0hlh5Ldn7gjmYqTZIiFzCC7tcvzvPeCa1XEmNXo2Wi1q/7CUiipwwazHMo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:24.9760 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0729df7-bed1-43f2-3566-08d818437356 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2243 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: PWkqDNbQscEpF7UXtSfI7Cgbx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005729; bh=xxvwJj/o8LKhKGd7vo3Rt6GFFF2YPMT8z+nstSTybRU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=UOyYOUKmkQzoMwCL18PcA7GW51BC3qax/Fs/lbZUXi15ow7umzJBku2eIofk7hjOb6M eZlaPoO/FDI2K1iY/JyUS9+zfgMzzVBcgVFdiuUljms7Qzm23Sq/GDWkNoiimHd53ulfw zFo+1SOthLicZmxpsQZ4DQtsYJGSuUBKhbA= 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: v3: - Resend patch with updated series. [S= ami] Ref: https://edk2.groups.io/g/devel/topic/74200906#60337 =20 v2: - Add support to make PCD PcdFlashNvStorageVariableBase [S= ami] 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 (#61666): https://edk2.groups.io/g/devel/message/61666 Mute This Topic: https://groups.io/mt/75081478/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 Fri Apr 19 05:34:53 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+61668+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 1593005731973676.5190578051898; Wed, 24 Jun 2020 06:35:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lcXiYY1788612xrge6pQZzLp; Wed, 24 Jun 2020 06:35:30 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.82]) by mx.groups.io with SMTP id smtpd.web12.13750.1593005729377638573 for ; Wed, 24 Jun 2020 06:35:30 -0700 X-Received: from DB6PR07CA0095.eurprd07.prod.outlook.com (2603:10a6:6:2b::33) by DB6PR0802MB2326.eurprd08.prod.outlook.com (2603:10a6:4:86::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: from DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2b:cafe::1e) by DB6PR07CA0095.outlook.office365.com (2603:10a6:6:2b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.12 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61668+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 DB5EUR03FT012.mail.protection.outlook.com (10.152.20.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: ("Tessian outbound 8fb20e43acb7:v59"); Wed, 24 Jun 2020 13:35:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4c334366ce55299d X-CR-MTA-TID: 64aa7808 X-Received: from 4287c613ae22.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 298422FC-83FC-4AF9-A666-2F9E37489C43.1; Wed, 24 Jun 2020 13:35:20 +0000 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4287c613ae22.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HzuNcYTV/GWCT7nl84P7Gwix41TKJVNQ64C5T1OQxuVNXoV5oVPgoVeKzm5pAgaSBC0/X/dIKVeCdbcKhjLZRnuXVk8fJgC0bfYecLfUuL8CDgbjT2rJ2I2J3M0Pyss6KWfDWHrKHzPBv9a+QtXGUqbMeUdpmpKCd/mhtc30OhXKMTabGQ7E30YKFvZrjSVurESJJKzN5Pvm1/l1dqwmPiMOi8VxcUGXw6F+YMwacgLXhgl74oid2hEmmYjifcIjcQG+qqS2ymOVEo27YiYpYwgh7qDsDZv9ppFGUWnNx1ANfFamuVCOf29AkO9EOdBy+N/sSl4PqztWH3vQmcXB0A== 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=LOcZL0hrG1r4/eWhiYF9d2o2SATvN6junhmKLejLRLA=; b=oOMdtCSHnGaxXpi8MKSVTGQeCd+KTp7h9wGvCs8QE6pj84ZV7Vk8o7KSluo2D2ISoqfwnXU76uNErWTLaG33QOjMQBzZMQSQJqY3l9d3CNcK0oJ7BAsNYgfMlpyEpeqYBGbMVQB3LgeqZSKnv1t+1q0VZJTSbS3pbWmgbVORoob93gOiLrFkn3XqUZ7W4V73zgzWtVViWh1AmlNP8VdrlqwCXvwcgIcCIN/c4Gf8xRghhL72atNEvaMzFEbWtoe6aU4aedYjnNLTXLn7JSaZoMTmdFrSd5HQWcdCl60/GmvWgii6F/K1uXxuyowJLef88/dkpzK9i1aBATBy4ZOpnQ== 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 AM6P194CA0050.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::27) by AM0PR08MB4370.eurprd08.prod.outlook.com (2603:10a6:208:148::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:18 +0000 X-Received: from AM5EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::47) by AM6P194CA0050.outlook.office365.com (2603:10a6:209:84::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:18 +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 AM5EUR03FT060.mail.protection.outlook.com (10.152.16.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:18 +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; Wed, 24 Jun 2020 13:35:03 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:02 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 04/15] ArmVirtPkg: Add kvmtool platform driver Date: Wed, 24 Jun 2020 14:34:47 +0100 Message-ID: <20200624133458.61920-5-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(376002)(346002)(46966005)(44832011)(6666004)(26005)(478600001)(6916009)(186003)(2906002)(316002)(54906003)(8936002)(5660300002)(426003)(336012)(1076003)(8676002)(70586007)(4326008)(7696005)(2616005)(70206006)(47076004)(36756003)(82740400003)(81166007)(82310400002)(356005)(966005)(83380400001)(86362001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1bccaf91-6209-4f7f-b7b4-08d8184373fa X-MS-TrafficTypeDiagnostic: AM0PR08MB4370:|DB6PR0802MB2326: 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: VLrLqfZyVeaQxvxNMc8kHFHBYHloihSPttehhQZrsqynqNJSHL11ghWYOtKwXMssMkgLcY/9Ywmj6sVu4OIISACI6fKiVO3mpC9Dt5A1MpJBnIDKWPT6Im2Avc/KblXuLVu8mqHEUhm/T0fbnFGjNa2GAXhX1S5opwpugf/Kd1W3A+Y5w7t0b5n5PAnFmSeJDgPKPq3eF5czLl9/LPseSXWFKygHHHldTGmS7KuRbj+Qzwnn/CXOvAT+DVieJoC3BrPkdjCf86LqmlgD8Uwi/XLYXtVDD8dDzESYP6yoPm5v1uULJf0/pvJf8dDY25gGUx4aVDhvpGLtQXk8TiyWevN/4aA10OZgp+Wdp1/SwQLRrA7ZnAziZtF8Usboo3N++Gy38SRp0CAPxyX+Gl2avngbgqbiF4ZI1qQahoduBE06t5aXKca7Qzy9kyUmO/UGU1AJDlqOaIZLEFfgWFBBKejP/zkbLhXjisJCUpbtkG8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4370 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: feb90ee5-0b6c-40a8-e4d4-08d818436f67 X-Microsoft-Antispam-Message-Info: Xxc+hCSV+B3kAJM4tvirPv0a+RZhwHv6IfApPu2IvxattTRn2hhS+dHOhkFEPoT2K+rWmeV9SDXxCIqLrgsOnSh1pvHlpw1kIYXclpsJ9hn+AB6bDdrNGW9VJS89VA3XpI7ns37Bb4JUy6X7eXSs4NJ86xUC5ErMB52oQ4zzsQHThzo/tu/YuXC/GhtkMukDRQKKfRB0Jb5NTXcyGYqLu0/Se23wPgezpchZBL2PuWLC4we9kf9Nqwp1P6rRz0PEwhaGlZSB0tZ9Lq55F+hWYD3GSMVoZW3pc/1SatzBR8lcYc3Zcf1s2N+hnOZGK8QYC3EAICIPJe/Elnxk2IqJyalX1vN5oRsnFMtxu1/vJvVeeLOEZqsh+uXF5DiIeio33F8q3OfFKcBXVvX20pb+DfKjof0+sg9Zw1+ldAif0kLYAz7y9fA9GA44gXFVub2znhNKPXDip2rW2GNZHHqhSzN3mBVgUfzw7LCTb7jZqvA= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:26.0541 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1bccaf91-6209-4f7f-b7b4-08d8184373fa 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: DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2326 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: zKHdHP7gbMJgzN2dl5vPBKTex1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005730; bh=N0b8tvtyuhpjSGG0FXrvXZIdvL3uAbtjtkE3wNenbbk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Dp12dwlF/Q14hDJA1/1L3fnpMiBC7AMM7/LfWxI6b59hdAppMsBlJq7XaiZ069dfb4N Bo7+RbCZB6Q2xB0yLpwIINLXm7+R58RHmbdZK3KPCY5dDEn6rVBNR5+wpyGxTjcoBaCkE HVeU8lpiWqTw1I6o3N6dyzdTTou+LDeP3L8= 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 --- Notes: 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 | 85 ++++++++++++++++= ++++ ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf | 47 +++++++++++ 2 files changed, 132 insertions(+) diff --git a/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c b/ArmVirtPk= g/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c new file mode 100644 index 0000000000000000000000000000000000000000..17a65bdff0c1a5851e45c2a9ede= 97f76236502e3 --- /dev/null +++ b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c @@ -0,0 +1,85 @@ +/** @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 +#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..08a0fe5ce14469133479046385b= dd48c22698639 --- /dev/null +++ b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf @@ -0,0 +1,47 @@ +#/** @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 + BaseMemoryLib + DebugLib + DxeServicesTableLib + MemoryAllocationLib + 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 (#61668): https://edk2.groups.io/g/devel/message/61668 Mute This Topic: https://groups.io/mt/75081480/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 Fri Apr 19 05:34:53 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+61669+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 159300573350677.41832710174833; Wed, 24 Jun 2020 06:35:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3oCUYY1788612xhliOjERrkc; Wed, 24 Jun 2020 06:35:33 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.43]) by mx.groups.io with SMTP id smtpd.web10.13572.1593005730460556922 for ; Wed, 24 Jun 2020 06:35:31 -0700 X-Received: from DBBPR09CA0038.eurprd09.prod.outlook.com (2603:10a6:10:d4::26) by VI1PR08MB4223.eurprd08.prod.outlook.com (2603:10a6:803:b5::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: from DB5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:d4:cafe::cb) by DBBPR09CA0038.outlook.office365.com (2603:10a6:10:d4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61669+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 DB5EUR03FT025.mail.protection.outlook.com (10.152.20.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: ("Tessian outbound 147ff5d152c1:v59"); Wed, 24 Jun 2020 13:35:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a206f9056f95f475 X-CR-MTA-TID: 64aa7808 X-Received: from 669ced7f55e9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0D7BD23D-E033-47B9-9E1C-F8DADE8B66FE.1; Wed, 24 Jun 2020 13:35:21 +0000 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 669ced7f55e9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=deBXuAagfmltxGWQQhQ0XfcG0b/HF9xJT6oznvF3Q/Y36Lpabdbls7H7DrWOT4QOyAYOSJU1Huco7j9hV6ShNlOGK2RHrKhRLLHjVBxI5FfSHcCpDuUMfPTEd6XKqJU3FMRckszjNxDoWm9CiBDgcEmzeK/W1ZxKFtc4qOD/GaMYeYxMZXquOzO4ybeVO8Qi24In8aAppp5gs17+Yedf6D6PLqMFLeNg1zsc6M5N+H9lIO27JZRJo9yrcNB07mJuCjyskMnVD7p+2jSY8+MvNjE7xcRkEd5lDOQfjR+BNgH/g6r0aDV5LIGK5KirpcVGpt8vHMrFr+xuVrT8WBqTaw== 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=MWlXve2slNkgr+bHEvVtY8mi021in63dDwrjyWJDTyQ=; b=XTAQDGG6pU4oBNmdV92JokEq0Zq/NCK65W4CDh30HjhPR+oPgH9/1/6IrJN2O1NVujPTp4OhjP3f/51ILejyKTlgowQ9f+XMNH3aCnkzincT5WxgVE3rQkqv3eTvG3b/TtCba+Hwd9E0+CPo2dC7vV8QpfRpjU9EB+CWbvYtBjBSoM+SXmvnQeOnnvQEPK4nhRD4ywDA62yiNp8RMc3/RzNi63dJaz0HuIOUtDUEPyHZdxRwVkE+ty+Xy5/MEhFWLJl35eO4BQ7JuLdt6m8JOwYj6BBNDhbWYD7e5cgGTJXnmUI/42cRcjhr9SFcJ/DigkHQZfAH9oTjuylLf9Jc3A== 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 AM6P194CA0072.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::49) by VI1PR0802MB2445.eurprd08.prod.outlook.com (2603:10a6:800:bb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:19 +0000 X-Received: from AM5EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::81) by AM6P194CA0072.outlook.office365.com (2603:10a6:209:84::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:19 +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 AM5EUR03FT060.mail.protection.outlook.com (10.152.16.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:19 +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; Wed, 24 Jun 2020 13:35:05 +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; Wed, 24 Jun 2020 13:35:04 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:03 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 05/15] ArmVirtPkg: kvmtool platform memory map Date: Wed, 24 Jun 2020 14:34:48 +0100 Message-ID: <20200624133458.61920-6-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(376002)(346002)(39860400002)(396003)(46966005)(70586007)(356005)(83380400001)(70206006)(81166007)(5660300002)(2616005)(82740400003)(47076004)(44832011)(6666004)(1076003)(86362001)(426003)(2906002)(26005)(7696005)(186003)(336012)(4326008)(8676002)(54906003)(82310400002)(966005)(36756003)(316002)(6916009)(8936002)(478600001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df2deb46-e54a-4b7e-70a2-08d81843745a X-MS-TrafficTypeDiagnostic: VI1PR0802MB2445:|VI1PR08MB4223: 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: c0ifcTdmjWFe3gSf5bPoyv9hQun2R9y1vvBnhh3nOvUowE9W+u4a5ycVwtrJ1Irfm8Nx+PxyRu46pNaI21lND3MffaO7+rFG/h0JwK4KSX+E8GhbPXmCaGH+IdPdBvxcp0dc6+7qrW+qWWP2/qG+vK8CP+xktaLfGVfySfReEcJLDMGCIfcm/BgZoKAqxIyNUiC8ZMTmNBomVHzCpkMWybDbduV/+ptxoVi4YfQZbAW05TfRdr5NV6dIBPI6HkwQpxXc+8ghNDAb6HY/YYqyDIonKAbF0a8XCwpr8F95cRIKGncdVtfcJwmki+7hr5uDU0wXqwKdzH6Hjlfxm4bN3vVbH1CgOKCrf3zmKTJjEY7w3TKFqaD8bZwA7tzv7GBL8uDXowwGNaeKqA6CYGhomNm72JHzWDV2S1RQj5ipZib0QF9hgC0a/dFkmzDK/EWaQWouai1xj/Av1HRNyfc1E/KLnRe09N0hQ3OQtdoICkU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2445 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7572e2ac-3998-473a-36ba-08d818436fd9 X-Microsoft-Antispam-Message-Info: s/gVwr9HyK9hAqvxWyefqozVyFHpA/QU4B7s1llf0dr4VFN6I6tLreXZskv2M45JIdcOEBeXA/MszLzH+huHRA17/nUl/de3PlCNaNVCnK0y/xDGH7w/epi3L+pktxwUridKPdojXrJNorChRRV6FcFvLNJpmUw6wYy0oqK0aSsd1T8Wb9ITqlSPbU4ypAdZE2YqDQxpAUzdPo8/PO5RpQ2mCDvz2pj908NJmKv1y7ppvf3V6j4WcM/zJc5BLxd9NnN32opbIHdfAXz4n4yNkG8ZIYADwEMRGMmd3DsTjUZubdthyRjFj0BJYY1MUeSTpAZpLz6VNa1RmR7e9HMFifNvtoLKB2SiNJYBF5eoYlF2cH0SlmnpZYuzelsWpvJCGUUUK4SqAWFM3japdieVClAwSwULTnGRelxGRvzzdd5PlpSxlWr5rKOSTYFTjhU/7sAm3zpmIJ25A6aqhfblHQSyvZrtsQt8QX8U3bBKtCk= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:26.6804 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df2deb46-e54a-4b7e-70a2-08d81843745a 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4223 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: cMoPRj2iWR9XKNWu3tHHtOinx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005733; bh=uJgnPvBpQQcM2N/NOuK6oXxkoykEkTjtAXYetRpkIJg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=BirkZe9vHo0xRj/RNrF3hCDn6K2JkYi/ukJ9dBup9uvntS9mfqAqIQFL7bVGBbIglG/ ssPYBPT50azP8pGFDjXFLg3da3Jd06UycPit2JSDMVMy0HvJH6gNJbYTxG7UmkyW/WxSs utVQhtnL+iH9Y9vw5IIileYBC8bAIKQGH1w= 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: 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 | 128 += +++++++++++++++++++ ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf | 42 += ++++++ 2 files changed, 170 insertions(+) diff --git a/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib= .c b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c new file mode 100644 index 0000000000000000000000000000000000000000..981c2b4aa29da2a797206c5770a= df30a761ff55c --- /dev/null +++ b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c @@ -0,0 +1,128 @@ +/** @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 + +#define MAX_REGION_NAME_LEN 32 + +#define LOG_MEM_MAP_HEADER() \ + DEBUG (( \ + DEBUG_ERROR, \ + "%-*a : %-18a : %-18a - %-18a : %-a\n", \ + MAX_REGION_NAME_LEN, \ + "Region", \ + "Physical Address", \ + "Virtual Address", \ + "Size", \ + "Attribute" \ + )); + +#define LOG_MEM_MAP(Txt) \ + DEBUG (( \ + DEBUG_ERROR, \ + "%-*a : 0x%016x : 0x%016x - 0x%016x : 0x%02x\n", \ + MAX_REGION_NAME_LEN, \ + Txt, \ + VirtualMemoryTable[Idx].PhysicalBase, \ + VirtualMemoryTable[Idx].VirtualBase, \ + VirtualMemoryTable[Idx].Length, \ + VirtualMemoryTable[Idx].Attributes \ + )); + +/** + 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; + } + + LOG_MEM_MAP_HEADER (); + + // 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; + LOG_MEM_MAP ("System DRAM Memory Map"); + + // 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; + LOG_MEM_MAP ("Peripheral space before DRAM"); + + // 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; + LOG_MEM_MAP ("Peripheral space after DRAM"); + + // 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; + LOG_MEM_MAP ("FV region"); + + // 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 (#61669): https://edk2.groups.io/g/devel/message/61669 Mute This Topic: https://groups.io/mt/75081481/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 Fri Apr 19 05:34:53 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+61665+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 1593005728873412.4316785768797; Wed, 24 Jun 2020 06:35:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id PjgHYY1788612xLXZ3xS8r5E; Wed, 24 Jun 2020 06:35:28 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.81]) by mx.groups.io with SMTP id smtpd.web12.13749.1593005727472941712 for ; Wed, 24 Jun 2020 06:35:27 -0700 X-Received: from DB6PR0801CA0049.eurprd08.prod.outlook.com (2603:10a6:4:2b::17) by DB6PR0802MB2293.eurprd08.prod.outlook.com (2603:10a6:4:86::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:25 +0000 X-Received: from DB5EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:2b:cafe::f4) by DB6PR0801CA0049.outlook.office365.com (2603:10a6:4:2b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23 via Frontend Transport; Wed, 24 Jun 2020 13:35: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+61665+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 DB5EUR03FT059.mail.protection.outlook.com (10.152.21.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:24 +0000 X-Received: ("Tessian outbound 217a52b9caed:v59"); Wed, 24 Jun 2020 13:35:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c6f6e816997b3ea3 X-CR-MTA-TID: 64aa7808 X-Received: from b323b984d1a5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 634BE867-E932-4D66-A8CC-D6E3D0231E6C.1; Wed, 24 Jun 2020 13:35:19 +0000 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b323b984d1a5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PVcltADKf5MdTE5m9czbBNc4vhro3ZCShw9Lj30RHfYOJGAZoiNNv0uM7KfF4UYZ9dsRJR/BjImugGFdy5Afec2GbocpPIwzDL4j51TUPWy4A9TIxGoYv9iXKGTcNwdfktwbKgOEfC55pYOt/NI+hg0yvmhMWUMxqQJxo59dtQjsQsAd4L+v9sakPPIuQfDa70Hjk0J5J/+G97UGq4cS9FiuFhJrND0ZTaGsmb5RgIHbfRQSDfF1w7/gMdsyx1L07doBaiPUxz6FWMqYBtfLNqilEGDPTE5VnI9O8IgdgNZ+F4GOU8HsEvufeexjtJs2EyZhdzRcaQGnU65aXlOMKQ== 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=mr+Y29oHMUG37ys6t5rmwAklm/JM1twWDpsEXIZqD+k=; b=W80UciNKCO+XUDLI4Qb+89WnEETp+VwusTDQjGigMavkVtkQzNX3m/Ylfw41hmI5c29L1J0heTyZ+zZBKky61CLeS4HPzRR2wstKbMKG/r13HHJIqDQ8CX4caV468WgyOBARQphQWUgzjHVJ8DGh+3NvkIdYz2rb2tvXmzEl6W37iY5DkqLDY/1OQmsqe1G16usepiOh1AEWTUEz0Rich70MkqRfQUFRhH/kymv5zYkCWQ00LRtJqwTgDbWvkFToEoM20Gpf29f/K4pKx6i10SAuOAEcFxFTbyH5GQkMDBRbHYSTjjmNeBziJvA/qRvJv7Rvzlewtrs9Sytie16qSQ== 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 DB6PR0601CA0019.eurprd06.prod.outlook.com (2603:10a6:4:7b::29) by AM0PR08MB5538.eurprd08.prod.outlook.com (2603:10a6:208:13b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:15 +0000 X-Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:7b:cafe::3a) by DB6PR0601CA0019.outlook.office365.com (2603:10a6:4:7b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=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 DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:15 +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; Wed, 24 Jun 2020 13:35:08 +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; Wed, 24 Jun 2020 13:35:07 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:05 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [edk2-devel] [PATCH v3 06/15] ArmVirtPkg: Add Kvmtool NOR flash lib Date: Wed, 24 Jun 2020 14:34:49 +0100 Message-ID: <20200624133458.61920-7-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(376002)(346002)(46966005)(8936002)(30864003)(5660300002)(26005)(82310400002)(8676002)(70206006)(186003)(81166007)(2906002)(86362001)(1076003)(356005)(70586007)(6916009)(47076004)(36756003)(44832011)(82740400003)(2616005)(6666004)(4326008)(336012)(426003)(478600001)(83380400001)(966005)(54906003)(7696005)(316002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99b072c2-4069-4922-478d-08d818437357 X-MS-TrafficTypeDiagnostic: AM0PR08MB5538:|DB6PR0802MB2293: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0/0Jptk/VkDUwyCM9SKukGx8t87F4ieX1Yrjui1tfmDVq4l/9CbUBNf7u69yDNNIi4o1+Bejpd5K4R1Lbgp+oSE9af74d1aeobv2ZFAmSXH+FS5hAyTaHL5TXxTB7MnjaflDz9LLWUwH8zMsHs+RvlTGXADLldekN2ROETzVRwPYkGlXcV2Vd8VvVsA1/RIdI1sMlWyc6kXMQrpv76v9zbQG6c1X8lbSedN3oEIsTWPhR8P0dleho2PZfyOf6FcQqfy8iZyr5HlzKV55+hiCyDauEHFjPqu5/Sdune7rVEhcq2H9q4D4//tw+hZr4WM0L4w5exoxC0f/xhqaFkDojL4XtB9A8ARGDqGsAgzvW2XMU1FgR7AtYQyReMcGhqmJCtEKJDcRn3Z8pe/VgYcQmnpzq2Dcx2FxQHDM6blzPwsF8iPass87rvpBiO7lDxSfEgG4C/Kz03qDe1xJXAmtaj2R4zYCbfln56rEfNYaKUw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5538 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 954ef3b1-e35c-4b0c-545e-08d818436d7f X-Microsoft-Antispam-Message-Info: YbLCJoXtmM3W8gGMP6qOAL09L7Hh/vOdlDnVSqWfGLkWqVc6g6YbFkUi9jQBwrMWMyXDaAZ0g3ihmSKpC86ZiGyp+QAYTqjmbmw5VqNHPQJE3StHWBxFeXXUKgYcHSPjxMMmeuzYnN7U7SFahpDFDyNJJR92JOJhJGyNqpbTu3tKDGgF2TLFbaXVoskFD8DngJuJ1hWLcAdFhYnRg6pDZrnR3ZbRoeIIOOdiEbGrrIFOPF2aPJk7827ffm1bU5/MpfWUY8OU0BjGL5cKh3qTbZaVQlJ13IrLpQEeFjqjdv7jrXNFy9/iVdM0mGeDiIR3+MBbxBZVhna00NzuMZDjnzauasGyDfUKZn5jCXFxAV7Ia4xRbUeE6PW5sEFXbIYuHl93XFtMGwq8wr6tjJ4xdhxrO4KFkUtw3ge0//qKCXyoThp8M4XZ9Wt68X8H+VJyqteCecUfgdOCJk9ZhzNIUGWFJ/AplkDeccfdrIsUFs4= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:24.9820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99b072c2-4069-4922-478d-08d818437357 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2293 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: YByoj2yKc1dCRG0E8w4MyKTwx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005728; bh=XCbLynLSEKTNklBLyqB8KJhXOc7IsFH31leldsFqP0Y=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=tRoxNlmhMK0VtLwPHUQWVi/nyDkOEbSiWn5+0VNskENAGuhYsBo84BKa85PeIbaJBs0 ofq5VnuaZ2qPrsGPrA1LUExADSfFN6st+RlSLE3rSfFxLRAKbe9TraJNIHcL/LBqtEzUw PmhLb2WT2V8QSvF5E2NA+5U89VJG6hKs+Vg= 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 --- Notes: 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 | 330 +++++++= +++++++++++++ ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf | 49 +++ 2 files changed, 379 insertions(+) diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c b/ArmV= irtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c new file mode 100644 index 0000000000000000000000000000000000000000..8e9dcf31691b4b12b9c7bac1ad4= ba8d3a534a1d8 --- /dev/null +++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c @@ -0,0 +1,330 @@ +/** @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 by the FaultTolerantWriteDxe to setup = the + // Ftw PCDs and later by the NorFlashDxe to provide the NorFlashPlatfo= rmLib + // interfaces. Therefore the FDT node used for UEFI storage variable is + // disabled 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. +**/ +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 (#61665): https://edk2.groups.io/g/devel/message/61665 Mute This Topic: https://groups.io/mt/75081477/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 Fri Apr 19 05:34:53 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+61667+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 159300573033192.79327952119945; Wed, 24 Jun 2020 06:35:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id gIPNYY1788612xFb7NeW8TMm; Wed, 24 Jun 2020 06:35:30 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.72]) by mx.groups.io with SMTP id smtpd.web11.13572.1593005728739969130 for ; Wed, 24 Jun 2020 06:35:29 -0700 X-Received: from DB6PR1001CA0038.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::24) by AM0PR08MB5443.eurprd08.prod.outlook.com (2603:10a6:208:183::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: from DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::b) by DB6PR1001CA0038.outlook.office365.com (2603:10a6:4:55::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61667+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 DB5EUR03FT037.mail.protection.outlook.com (10.152.20.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: ("Tessian outbound 839770a6d413:v59"); Wed, 24 Jun 2020 13:35:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4c263d8a5490cf94 X-CR-MTA-TID: 64aa7808 X-Received: from 91a065fa935c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 32C49058-B802-458C-91F0-84FF774277CC.1; Wed, 24 Jun 2020 13:35:20 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 91a065fa935c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EXq5Ns5fEYiffYqOMZibmC2IG1vtyl8RLpQCB5EjsOeUnTAZAXmur2QNN73II25xYAmd/2baTkhX5wvHPasZkJZhniAga8BYLm7YFpjLHSuYdbCLX1B4CNJ0od98QX8ZK+QFDbn3UCgsSoKNrQSsR6CBNKdYcslv4wpFHDvmEsIs22esWO1T4Rin/bSvlo5mnuhsCOPmA07HmdGMNHnE6D6vqet0ivMUVePeO6gvi31qi4vNAr1Uz7vZGqexL0l495iJ/Xx8qM9n7gEoOQwc3wge6QgCcmzqAstDXGszzcP3ENIKBAeHaSO65P9muINigEkazCCgB0tw5x4g0LeZwg== 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=fbxBRKb98+2/DdHWhom2Fv97Xgvc34WhAsjWeIINP3I=; b=WPiAsJ5I5Vi/LcLBWBhydW4RXceRxGxrWvacYL0501PZvafNPzAjaoTxNi6pDVeMSyJycN4bMW48gwd/UvlNraBs8uvSY0DvTQja/PYQcC+xcutuwhpMSHA9vD4uDKRxoSt940Do/66C8ONlJm9OgdbobJatkxx336omVFi5GMHU12leEH7hkibTLSqtZBcc2uJ2lZz/Zd+8yGBGWieufHQs2miZz7iaHgUv2ttgZhLauqsReqyamSEwWB4Xtkge6tQZT+jPLVvoMazmkL1vQM3oY1NbGwJAPrIIPD5XhlgxoV+/OnfO4jx37WH9nrro1i4DUk2DHD86XA1Qqa1pHA== 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 AM6PR04CA0057.eurprd04.prod.outlook.com (2603:10a6:20b:f0::34) by VI1PR08MB3774.eurprd08.prod.outlook.com (2603:10a6:803:c5::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:19 +0000 X-Received: from AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::4e) by AM6PR04CA0057.outlook.office365.com (2603:10a6:20b:f0::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35:19 +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 AM5EUR03FT042.mail.protection.outlook.com (10.152.17.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:19 +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; Wed, 24 Jun 2020 13:35:08 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:08 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 07/15] ArmVirtPkg: Early serial port initialisation Date: Wed, 24 Jun 2020 14:34:50 +0100 Message-ID: <20200624133458.61920-8-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(376002)(39860400002)(396003)(136003)(46966005)(44832011)(4326008)(7696005)(70586007)(336012)(2616005)(70206006)(1076003)(8676002)(82310400002)(356005)(47076004)(36756003)(83380400001)(86362001)(82740400003)(81166007)(478600001)(2906002)(6666004)(26005)(6916009)(426003)(8936002)(186003)(5660300002)(316002)(54906003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e2f6f1ef-cc9d-45d0-c4db-08d81843741e X-MS-TrafficTypeDiagnostic: VI1PR08MB3774:|AM0PR08MB5443: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5516;OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: xXmI9ovRP1pWlZ2HzDAAWoiBrlug47u+Z+LGJbbCy4ftlkGWJsMuccAB2tWWkpANP7BfJftLKOJCi53ijyDwVDu2M0Fluiq7YvEQfUqSCktjuos0H+STPU6gFxIs4Cf2t+Gt+widCzqEjxMeVxldPxATDTN8E6CWlWUXdA78OXYWyaDUXxx+BhAOglhBsblkK5ploQVRM9f0HWhCBFCSTFSPGcAdFWQEMF1wf18k92EGRpwQ4+0nEhDbrGwLP6BZGjUt1GHh4tMkFk10pZJJ2UmojjrgMq/wLVEoF8Syaumjg0XLdtxtBbdhuFGFpmODhQZZmThWCNU+Lpxj0p8AAJGSs9aA/fukauvJS8Lt4l9EefRuAMdtpCldF+ANWtcxJ7B1bdFX5hkZOApKEdyDEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3774 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 442ac2dc-179d-4c6e-9aa9-08d818437024 X-Microsoft-Antispam-Message-Info: eCU6aDCU/Qwx49OmGFKldH+l65nOw3bjK3v0HFzSHyc8lXQjvMVDjc1H3cftlkdDDmqMe2ePmf6qiNBX7FdlqpxTjDPiYuHHdpvGyyBxN8glal9V4GiaM5q/kzCQ46/NlA5ZQHtAwoBeM7Ev/2JxX4hVD3xPhITWlTc8gUK4GJETsK5Ar6YgS8ftO0Isx+z7QHWPjVrVjd+w9zs1FeVjrnXjh88KBGpEH5zzdvEOWnjn4ywvqGFLZJNp4dMG31wlym64D5SGQhFHSQJ6lkqG0u/rd0pb4uZS2Za7MwQwruepPrJ61nT3H61Offp6r2GiHd+XQcp4Ui3gaR9L4xJztnOdTbQoeC0DFomhrUcFdq37vMnia9kVfqmWorklzbiJIait4V8J3IzgKAruY6KmFg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:26.2899 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2f6f1ef-cc9d-45d0-c4db-08d81843741e 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5443 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: 5QjnoHcWEPXeYiFsshh4EJK9x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005730; bh=R4dlSFc1jzzUv1tsfL1HSeigJQVeZ6JYCeo6ModgRHA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=wL4Kd58OhiIppKBbTb8OmndBz2r7WP3q8MPQNMjE3b4aeRO9DafE699+oXWUA5Dwh0r hcJxGhVxZq4685+mFCoBCC0H8eejLPPOJohhF9EeD8cqLM70x+weOIZDri7bvGuJbjRy5 btg5gdiiw4nLVlt/aaRi+1+q9415E5yCtg8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Initialise serial port early so that the platform memory map can be logged. Signed-off-by: Sami Mujawar --- ArmVirtPkg/PrePi/PrePi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c index 4f0c3f98bad63d0682cccd76a0a062d1fd4f46ab..5e144f4bdefb810708238097a33= 73f11d150bfe5 100755 --- a/ArmVirtPkg/PrePi/PrePi.c +++ b/ArmVirtPkg/PrePi/PrePi.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2014, ARM Limited. All rights reserved. +* Copyright (c) 2011-2020, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -60,16 +60,16 @@ PrePiMain ( // InvalidateDataCacheRange((VOID *)(UINTN)PcdGet64 (PcdFdBaseAddress), Pcd= Get32 (PcdFdSize)); =20 - // Initialize MMU and Memory HOBs (Resource Descriptor HOBs) - Status =3D MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUef= iRegionSize)); - ASSERT_EFI_ERROR (Status); - // Initialize the Serial Port SerialPortInitialize (); CharCount =3D AsciiSPrint (Buffer,sizeof (Buffer),"UEFI firmware (versio= n %s built at %a on %a)\n\r", (CHAR16*)PcdGetPtr(PcdFirmwareVersionString), __TIME__, __DATE__); SerialPortWrite ((UINT8 *) Buffer, CharCount); =20 + // Initialize MMU and Memory HOBs (Resource Descriptor HOBs) + Status =3D MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUef= iRegionSize)); + ASSERT_EFI_ERROR (Status); + // Create the Stacks HOB (reserve the memory for all stacks) StacksSize =3D PcdGet32 (PcdCPUCorePrimaryStackSize); BuildStackHob (StacksBase, StacksSize); --=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 (#61667): https://edk2.groups.io/g/devel/message/61667 Mute This Topic: https://groups.io/mt/75081479/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 Fri Apr 19 05:34:53 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+61670+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 1593005734048210.98959233658536; Wed, 24 Jun 2020 06:35:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bbLkYY1788612xEWFWjvwSk8; Wed, 24 Jun 2020 06:35:33 -0700 X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.52]) by mx.groups.io with SMTP id smtpd.web12.13752.1593005731005744500 for ; Wed, 24 Jun 2020 06:35:31 -0700 X-Received: from DB6PR0601CA0007.eurprd06.prod.outlook.com (2603:10a6:4:7b::17) by AM5PR0801MB1650.eurprd08.prod.outlook.com (2603:10a6:203:2f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:27 +0000 X-Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:7b:cafe::53) by DB6PR0601CA0007.outlook.office365.com (2603:10a6:4:7b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61670+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 13:35:27 +0000 X-Received: ("Tessian outbound 8fb20e43acb7:v59"); Wed, 24 Jun 2020 13:35:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d1f75e3d014cd5ed X-CR-MTA-TID: 64aa7808 X-Received: from 0f71cbf6d0ff.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DAEC747A-007B-470F-AE79-66A10E7F733D.1; Wed, 24 Jun 2020 13:35:22 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0f71cbf6d0ff.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g0E4mZ8Y1buiR++GhfNmGmrPglo3ejKI7wWsYQcNuuMyXdAYSrReJL8ApZw3nTdnCNtgdWqS5US52eNKdIJYBnsLXzKVfA7sQnqXMT/Zw35o1QMCqMsXWU6hQ0/VPZUmn8tper+r2TmPcqe2ckCOraYNXXKJfjIxoURPee4M6yuQOyGSSpfJACuSKsy9PpPJiDvEEfwisDhLGAAGpU74lEDJ7mq8H8kB05Q6LsJg86VRobN2isRbMYz0wsjoSzZhAArX6Hvg5xm5uAzIZ9+I3U9EKcR0h5f3taOZvwxIemXgDgWsYXjIHPaT+5C0KlhTnohjV+fuQYIAqIWX9ZAwSw== 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=shfiLEntyhtQBdaTQLq7G19vps6RckGkof8ca/pX6cs=; b=jf0c0mAXFpI5T4DqVcEeYi6a3roTnNZ5H5sgcNUMhQMmsXnC++edZpKxiLPjWLED4giNYxlpBgjyEoNxrzjh0TkD6kpSyXSoaZO+odBcUKKtBLMI20mz3sNpuvgRRZ1BVjLfqWCMApfUxFYNLHk7qOQdAGWpSBjhqZ4rRX6LLoi7WuTPscWLg07hv7zhbmsz7tjQqfhA5r+kTUu4df/o3+5TkJsDKBZ5VBAGDf83V85WpkMaH838zN0sUP5ZAW1cATLu8P3T6/qH9I9RW+CXTbIw1wdrxm0LygfJlnOEt1e4ShyeEhedNUK/pSujGeP33erTkbIrmRvVZvqvtBP00A== 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 AM6PR04CA0068.eurprd04.prod.outlook.com (2603:10a6:20b:f0::45) by AM4PR08MB2642.eurprd08.prod.outlook.com (2603:10a6:205:e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:20 +0000 X-Received: from AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::51) by AM6PR04CA0068.outlook.office365.com (2603:10a6:20b:f0::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.27 via Frontend Transport; Wed, 24 Jun 2020 13:35:19 +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 AM5EUR03FT042.mail.protection.outlook.com (10.152.17.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:19 +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; Wed, 24 Jun 2020 13:35:09 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:08 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v3 08/15] MdeModulePkg: Fix constructor invocation ordering Date: Wed, 24 Jun 2020 14:34:51 +0100 Message-ID: <20200624133458.61920-9-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(346002)(136003)(396003)(376002)(46966005)(8936002)(426003)(36756003)(47076004)(336012)(2616005)(8676002)(7696005)(44832011)(86362001)(54906003)(356005)(186003)(4326008)(316002)(26005)(5660300002)(478600001)(1076003)(81166007)(19627235002)(82740400003)(70206006)(70586007)(6916009)(2906002)(82310400002)(83380400001)(6666004);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52e2480d-5a48-45af-97a3-08d8184374e6 X-MS-TrafficTypeDiagnostic: AM4PR08MB2642:|AM5PR0801MB1650: 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: 4QuA6U1oOSq1kyzq9nauq+qkRTnQiuTSAZD1NT9mNWzFTJQBWGSEq0g1VQS3ye0tosQ3npBXiMuqXwo/DYiKuwKeh/r9RxluCVQj907PJsBrtyf6zgCA7DlSrs9BZ+VW+zNT+16pGLEww4QrNJjFZmoQe+KGoHNZu9gSitVck563zqJN6qtNHN1zs36WfMxa4LBKINOEIsRJSGHps2FC8xEFwBuQCvhNwMAMCj0u0nWCZmvB1G71dqHQBZxT+G5BNfHP6PO8p0YWUj5exopPAYNEt/SXpNHXV96K3dIA/E2odFPKitQT64gb3EuR3gyKOfK4j4qC+23LPuF7I6wVQUMoFfLrjDlAWM+fjtWobThD8omMheh4+sAs2PAdH6ekB3aAWpt5mHsGlc8oLIpe0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2642 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5a68ae7a-c016-4a3b-2be1-08d818437056 X-Microsoft-Antispam-Message-Info: rcnaNhDIU7peH2YiYUWs3oQoNG8RaSdfd/kUcBOmmDnJDrCgSE4Bmjr89uCTUEqvQhfjxnUqL5tjSlmKmHezOuOe/WaW3kmO/30TlO83ItGIpdsSvMh5npsUNMO+Z3z8RHdkXcXrL4HtlmOC1gUXJN8oba7C8StKtnMNwuWEM+jSoFo06IPF/qDRZC2YSxH6dp5obUWjOiINxJxahhkrG/Aaev58dfym4sc66QoH5w6krrE+v2713VaHzWM1KR0b2GyhzSlcc52U7ZCHy8kGGkUK5Rn9C18DNGVXB6YiPmCfjEULFSZjw9w0lrHl40sRWmIZwDvnSrmuwspel2v1Pvk6A3ys1yexh4WWxRxh4bRNm/v9qQ3buFFN4zYLlE0drskmTMxY2OK7eF9j88LNsQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:27.5989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52e2480d-5a48-45af-97a3-08d8184374e6 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1650 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: N004X0UgBCHte6Lmh11HnUGtx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005733; bh=j0bZEbCu8HHi1cBUVJd3Oi71NHx3X/kJkPksXoPsWow=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=iFmrKIk4iLg43Y5SDoKdmk/2hDz6UBMe/5He7RkYXHYdSMRhkrqhbF1lBERBxHRQvFb UdUH4gnn4vnnWbAj7yoJP527ojSi7KfleuRJv55+NKemGGH+ib/KcjxvYObIK4rV+U/K9 D9fMtWIlI4w0Jy9D2o7D038v3b+FG1mPcZY= 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 --- 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 (#61670): https://edk2.groups.io/g/devel/message/61670 Mute This Topic: https://groups.io/mt/75081484/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 Fri Apr 19 05:34:53 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+61664+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 159300572834256.6283688144124; Wed, 24 Jun 2020 06:35:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id QSpCYY1788612xF6jZwunC3P; Wed, 24 Jun 2020 06:35:28 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.77]) by mx.groups.io with SMTP id smtpd.web10.13571.1593005726776208178 for ; Wed, 24 Jun 2020 06:35:27 -0700 X-Received: from DB6PR07CA0078.eurprd07.prod.outlook.com (2603:10a6:6:2b::16) by AM6PR08MB5029.eurprd08.prod.outlook.com (2603:10a6:20b:e7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:23 +0000 X-Received: from DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2b:cafe::c) by DB6PR07CA0078.outlook.office365.com (2603:10a6:6:2b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.11 via Frontend Transport; Wed, 24 Jun 2020 13:35:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61664+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 DB5EUR03FT012.mail.protection.outlook.com (10.152.20.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:23 +0000 X-Received: ("Tessian outbound 8fb20e43acb7:v59"); Wed, 24 Jun 2020 13:35:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 56578da942d958a2 X-CR-MTA-TID: 64aa7808 X-Received: from c11639f29f00.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C50A600A-0E38-45FD-89CD-259367A7FA16.1; Wed, 24 Jun 2020 13:35:18 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c11639f29f00.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrhhpiT2cdVxEQfeJ+zIrqT94GdmwgYS8fxo3u2qaEEtkClHa00llpVpJdV0DCvaidKvvhD2cL1dYVHzEh2HPxAwgif1JmLKtCuh7NhoVisRvG2wRn8ddybG5mbkQXeXqkmTQjnnALpfpHeBf2NvKeJlOGZnHhoDKEBWS/kTe8DgAtnkdjmHprg/FT2gGBCGTWE0BFUpPAt6+aLKfjulTt0fgv7K7bxkYdiNXHAzoi52sK7I+lkPk0cPVw3DK9tYEAv31oOFOtolaaE7hv2xIAWZKZN6sUc+r3dDGT+5GKX/TZ7CJalDI+iWN7wJa9x8ESxO5rMnxB1+qr4VE0gjvA== 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=5xQ0hAs6D6hQdknasTtX56UmIAXR6z01VDLQYIxbx/k=; b=BQDfBq261tOoxC+6pl0LqxIiRWHVrrXk2JpysjdMqeubRBvYud03LbKxP4ptqpA699BmN+Jdtr1L8pLCqhb1ObbeiFGx+uNDcQ39i6k5As2K8VINzlGvn1tDr69D+D3Mv9ggUqHTfGW1fxQxjyrTThCu5HJn4H6CLoKjBMIzKMgHZ8+mWAjG70nJ5e1HHY3Fr/z/uvawVgaETcLC0+egpP7l2o3pBjkxpvD8b5VTLEglo0JaZby99vRDNeRATaaDoraxSYdjLPDMahhibHJjbSk1ZpfpnnTZWJnbHAxrdDeihtIzV+hCDeSENzyEitGEqSScokBURHV0NUaVZ+UI6Q== 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 DB6PR0601CA0019.eurprd06.prod.outlook.com (2603:10a6:4:7b::29) by DB7PR08MB3724.eurprd08.prod.outlook.com (2603:10a6:10:30::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:16 +0000 X-Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:7b:cafe::3a) by DB6PR0601CA0019.outlook.office365.com (2603:10a6:4:7b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=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 DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:15 +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; Wed, 24 Jun 2020 13:35:11 +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; Wed, 24 Jun 2020 13:35:10 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:09 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 09/15] ArmVirtPkg: GUID Hob for 16550 UART base address Date: Wed, 24 Jun 2020 14:34:52 +0100 Message-ID: <20200624133458.61920-10-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(44832011)(19627235002)(478600001)(6666004)(26005)(6916009)(2906002)(426003)(186003)(316002)(8936002)(5660300002)(54906003)(1076003)(336012)(8676002)(70206006)(70586007)(2616005)(4326008)(7696005)(81166007)(82740400003)(36756003)(86362001)(47076004)(82310400002)(83380400001)(356005);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 833bb76a-d6e7-416c-4137-08d81843729a X-MS-TrafficTypeDiagnostic: DB7PR08MB3724:|AM6PR08MB5029: 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: rrLRhGnPt7Dfgb+xbIOWmcTEngnZhisEqHSc+B7lrpWuHQiVonV5aQleQuFrBAAnpzd+voPTsTT/lnH+5rCBmfJuPLhwXD4gTyXvSGKnUv3pcmYphhwYewlObFXbk2jx+N7JUn7yRdlDO8rh0x03gOMmECRuYB1Zp7Ct3J4ighCmSdM+E/u7d1rV0EsgIb3QNYIjtvHV2kNm80+V0lfyHJSFFqzjChtWnQ3K6WQbvsArUYL9zS/xyYZ9Ar52+/C+mDepOJJmw6ywkAbpY45q/LhO3W80frHCKhU3G502LBXJwGtXdQIRwZFgu+cPM7+8sVN5C59W9MUeyobpSEN+ABG4yntxs0RlAsj0oZrbuXYlF8/seiOy5iU1wazRRY/X+Pw/TDW8AG3oybMYDHmzDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3724 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 46f9ec5f-4128-4171-1bd9-08d818436ddf X-Microsoft-Antispam-Message-Info: d2EkcTpGPfbma2TYTpQ9WMgZ41Ua5fkgvFjIy3DdLDAkuFVKdzWPCeNQqD4gT3CpCX0AAr4oK8X3EvTNlqFYoexWzofp24AwHDlYEGsWP672waQu1ZZM0d0qpT8N1/9HQl4wNwboVG1SyiiuZju+4G3B3AxOzpltfHS3R6WIk5u2w+//8bgK+4cqoSgx9sjM09lm/dsDTn608xWsSa+dTdoOopL2wjNfGXCrC0dR+1WiAQbHkc6EcWIgLR0MHOV6H1Gck7+KFkQ0xIVezf9Dl/ONLAiQCohzsXkCKZHk/6ePIox34lvQPvWADoyM7XYuO7+tjJ+mEdyOzt2acG/8Z5Rz9jLrE5XyqSjWda6kmcHMeXrbqxpWu78UgrX61z8oOtabGPuA9gXRAmxPHcAMqQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:23.7432 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 833bb76a-d6e7-416c-4137-08d81843729a 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5029 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: 9GY5Ce1gTdFT2Brl7JfD1DRwx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005728; bh=I0BOOWrWYknUrXgHfNy/UnjiHPoOVl7qQIITCQz7bq0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=FL1BGI0n/CMDaAY0OAWFRtPIW7Ip2/DthZufWAl5gRe//0Kx1toonOQV2//QsHCW9Eb 1L4BSeR6KVfBdaqmeaUBNb4PLZbhvGpABF1jWkD/wkjn3NCIyD8zeJdtbwSEqZ4jUYgQJ 8zDX3YkNpV15/EYDkLy6vEUr24AmFLmJ2/8= 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 --- 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 (#61664): https://edk2.groups.io/g/devel/message/61664 Mute This Topic: https://groups.io/mt/75081476/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 Fri Apr 19 05:34:53 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+61671+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 15930057355141015.526471468732; Wed, 24 Jun 2020 06:35:35 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id yzoIYY1788612xrvtoB0AqzD; Wed, 24 Jun 2020 06:35:35 -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.13756.1593005733885657709 for ; Wed, 24 Jun 2020 06:35:34 -0700 X-Received: from AM6P193CA0144.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::49) by HE1PR0801MB2106.eurprd08.prod.outlook.com (2603:10a6:3:4a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:30 +0000 X-Received: from VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:85:cafe::91) by AM6P193CA0144.outlook.office365.com (2603:10a6:209:85::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:30 +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+61671+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 VE1EUR03FT009.mail.protection.outlook.com (10.152.18.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:29 +0000 X-Received: ("Tessian outbound 217a52b9caed:v59"); Wed, 24 Jun 2020 13:35:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 20d03b8cff61b8c6 X-CR-MTA-TID: 64aa7808 X-Received: from 197a30fbe330.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E196DA36-BC77-4117-A5A0-6E1E1381FEBC.1; Wed, 24 Jun 2020 13:35:24 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 197a30fbe330.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HICcxDYAT327UPCOa1MwRDgfVYGth7FXQLienM1SvcF897qXKz70aiP5+PG2SMgzrjcu0G85CScqiiiheomFJntAHmEe22imCurXl9tj8TjPVMKxA3CsRtZvHL9ZD132zCdbVEycPDb6aWCpdrMq2rbEpS0U0OqR1IqgmHNCpfxqsDKivA8Dd7yVLpkyKnq1weuDHOPAcjGPwlmWTGQw5/SqU9OxKQfVS9nnNegPHXFahxZhRBjhA8qqNxcgjhDr2htXpHmGA79P8UJN15g1JIKDts9nRte1EQL+dVpCchAoFthFurk9zBZFPiSO/aeIPiTnqxaXq+ftMROHwVRaXQ== 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=fyjnId8irKDW9xTvSx21K2Is5kMgM8siEpOB6fTjFjI=; b=TEY4uEI6MxwSjdVhqiUYS+31bh95XvdIjm7Adp04Gud3FQxGmRYCGYWEbSIuEFskof7c8HgqngNHF0ipqB3uwPnvAz91t8pp1XugnIgepUVH+KP3Q5Ne7mW/+akR4jiLPIZyboDIUJG7JzpGDwfOY+9t6NatasQ5rAdcoPaDKhDZWMYyQB22c7ToZazVveTRLWEN7H84wGgE68GYTZ4w2piemLYErPLjQpgTSHat0YQJaZKcEHfuUYwAJLsjEebUfyATVeYEpB3yzwM4T5u2buX92YwicjjF+HwEir5m3N6AmwWewkRZnbwuOp79WSPNbd/rOXhZiOWeQBMCCBj2gg== 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 AM6P194CA0044.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::21) by DB6PR0801MB1989.eurprd08.prod.outlook.com (2603:10a6:4:75::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:21 +0000 X-Received: from AM5EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::51) by AM6P194CA0044.outlook.office365.com (2603:10a6:209:84::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35: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 AM5EUR03FT060.mail.protection.outlook.com (10.152.16.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:21 +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; Wed, 24 Jun 2020 13:35:11 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:10 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 10/15] ArmVirtPkg: 16550 UART Platform hook library Date: Wed, 24 Jun 2020 14:34:53 +0100 Message-ID: <20200624133458.61920-11-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(376002)(346002)(396003)(39860400002)(46966005)(356005)(82310400002)(2616005)(81166007)(30864003)(8676002)(86362001)(6916009)(8936002)(1076003)(5660300002)(82740400003)(47076004)(336012)(70586007)(426003)(70206006)(19627235002)(83380400001)(6666004)(44832011)(4326008)(26005)(186003)(2906002)(316002)(54906003)(7696005)(36756003)(478600001);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30f94afc-e985-404f-7802-08d81843763a X-MS-TrafficTypeDiagnostic: DB6PR0801MB1989:|HE1PR0801MB2106: 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: 2E2ARFw1g6cZZHHQdKWA8YAc4F3Ml9g8ELQ4jrZDYnfMgINuOp7Z+6xH+4CTDQaToZeY+MxELzSPnf7xAHeAZftKjPxxgQLNrgIadetqWMxhIpvv9GfVMiiJ/Bu0cSjqTK0Amv2MtwQUiH6XsKbBEs9/L/JEBkx6/VTyie/bbvQFHqxxbiN7uJiT8OzuooKwBFfA3xRZV+YvdkK5e7lcqBGpjdgvJRvGd47rL/el97InZcV22d9Cq88fTQPFzxGYKgneqZuSdTLj0aGrbEYoohYr0yvBCmfpDpfRxrQAT/qFh76WKiqnTugslue9+Tbzlli6Hdm/CpwLF5WvYkQZcwgt9MfLTiX4d8fYcRQGDdPptGn3LKPqqT22pjHME5a1BqzpYqk2LLrqUmYXzQXPlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1989 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 3a2d3153-6993-48ed-b938-08d818437160 X-Microsoft-Antispam-Message-Info: 3rhaPSrn2mF8xKCvSslLBt/KjvSCeXthL+eS6xSWEKAQoa2ETpcAi5rBY5QyoP4r3Pwj+Q8z4XIUaWX7cszYkN0Y4dro91s3Cbdpdu0riNJ2NfC+Q74ffHzjh+2akj+vJt5Z0JZ9rORc+ZrYRb0RAJ583FIx9ck/1tZAaK3k4QYKiKJF9fOl3sd+0nDkidApcPCiavmt5Zq31983YhDYVx4dL2WjeJRgBfIzyAJMzk2jYL5zPWPZQA5Rf2SId2GYaXMfsJOfqOr9qcThkAmuJgP2peiDc+CBTw3H+eohEmjgbvdQEKWz1XNmTioaLxq7IFaXGZQYmclhlYkUJSLAX317IohOA8s8JXgyd5zHyn35finA86nEL/3HSUKWHeD5Y5TFsRst31jJda4FCNWgnA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:29.6804 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30f94afc-e985-404f-7802-08d81843763a 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB2106 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: ZjhvD8S7o2CJu29OO4zlf6B5x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005735; bh=WTxu20Zngorxcrzq21/4JJ1oGJsRyfUkor5Xg4qB/Sg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=GENIH8QuxprK6qwoGgU/nQDSB6I1XTTGf0gkBh8a/7frMEybg/bKuMOt2jlmtNQxCnq oDe+MubsgzKM+GsZV66/f2WaHx3ewtMepIYNuE5HDtH8j60eHIwqF+LPdL7oC0YlOmDF4 GWDsYA6Fp10BPnMEenviLX3tlcXWqmL+28Y= 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 --- 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 (#61671): https://edk2.groups.io/g/devel/message/61671 Mute This Topic: https://groups.io/mt/75081488/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 Fri Apr 19 05:34:53 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+61672+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 1593005739186297.3370621969257; Wed, 24 Jun 2020 06:35:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0sG5YY1788612xdTnnh9hRbs; Wed, 24 Jun 2020 06:35:38 -0700 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.79]) by mx.groups.io with SMTP id smtpd.web12.13759.1593005734662299586 for ; Wed, 24 Jun 2020 06:35:35 -0700 X-Received: from DB6PR1001CA0038.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::24) by VI1PR0802MB2319.eurprd08.prod.outlook.com (2603:10a6:800:a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.25; Wed, 24 Jun 2020 13:35:30 +0000 X-Received: from DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::b) by DB6PR1001CA0038.outlook.office365.com (2603:10a6:4:55::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35: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+61672+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 DB5EUR03FT037.mail.protection.outlook.com (10.152.20.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:29 +0000 X-Received: ("Tessian outbound 839770a6d413:v59"); Wed, 24 Jun 2020 13:35:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6aea2370e8aa80d9 X-CR-MTA-TID: 64aa7808 X-Received: from a5dbdaeb9d47.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 41B1C8B6-AA56-4B13-A1BF-BE705B6599A1.1; Wed, 24 Jun 2020 13:35:24 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a5dbdaeb9d47.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eG+NaxXZGJS3Uo38kFT8WvLcgZ8Lr+QShBwsjvReI6o5n7GWosg4szXyJntw2z86dgwmCwoNpFCv4l2R4SQQfo/24s6ge+J2kNcN+VzWSv6u6oUGGhFI9a2s89yQvkmLXTVmZbHYTXUhFXeD49QAPXpynFciRwy4ngbDAoPrHIdbT0NA7thz5/WxhZbndBWSde/SSczqVs/ZYRCo0/pXIjRonCdi+F8tXJYoRVn/hbbL1465mDRsNx/syv32K9Br0RsbMRb4nSxBBNVvjzqSlI0pnDeQCthJWgCpV6xP8FVITB2JqVheaxh1T7J4uBViIwPZ2SHZBs1bMw0z8Cn7sQ== 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=vkdDOZGyT6CNSqMneY9qt/hOgWyoD13sXfSoPj/LurA=; b=drU0Xih3hsqJ3kYPTCFI3RMmBTAz662NofbYWJJc+k01Ud5NONtisBn2tllhDjaI3xo9rO+6Af18mrLRQ7pHrRaJtE+0MyHsuiQgPhUKs6ZTBIZMQl/zsVdJjoOvgBScv+rNgc7wlcA6bX9V1VxkBZ9ttYfnxHgPFAk2sGqnpxKBY8iSSjYX+Z5bRFkAtQm6z4/HXbQKy35TyO5c4X6AzlLCEbvCbX6bmQOV5qSpQg9B08lLARPxdlOjQDV0EkSdYqnIlZ92HK5NCFDf2ZH0u3/1oUCArzx2e5YoUCG1QxkS1pXcB0WjnXFqZaEob7Wwv4vx/ey/qWtcS2S1cwf8dA== 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 AM6P191CA0072.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::49) by DB7PR08MB3675.eurprd08.prod.outlook.com (2603:10a6:10:4c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 13:35:23 +0000 X-Received: from AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::a7) by AM6P191CA0072.outlook.office365.com (2603:10a6:209:7f::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=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 AM5EUR03FT052.mail.protection.outlook.com (10.152.17.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:23 +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; Wed, 24 Jun 2020 13:35:12 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:11 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 11/15] ArmVirtPkg: Add Kvmtool Platform Pei Lib Date: Wed, 24 Jun 2020 14:34:54 +0100 Message-ID: <20200624133458.61920-12-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(376002)(39860400002)(396003)(136003)(46966005)(2616005)(86362001)(44832011)(186003)(19627235002)(82310400002)(478600001)(426003)(316002)(356005)(7696005)(6916009)(26005)(54906003)(81166007)(70206006)(82740400003)(8936002)(5660300002)(6666004)(47076004)(4326008)(36756003)(2906002)(8676002)(70586007)(336012)(83380400001)(1076003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0626758-c3a6-436e-5cb6-08d818437649 X-MS-TrafficTypeDiagnostic: DB7PR08MB3675:|VI1PR0802MB2319: 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: 9rVHVzCI1fdlG2UT3/bRMWiYAfcuOPnD0uwKcg5C4vb/9i079GEkWjsZLBZhJbFY9A8u3MH1gC1rHNneaoMoT0z8BxHQ2uNcmwH2OXmsyWnAXz5H2O5e8qAr4xCo0OXlwuFRtgISvv9RlSAzb3Y/FshCROj6CxxMbZhmMcN2bH7KXppT5xMVzCLK4iDCrtM8RR/UsePGBY3saZ7jpPptwqlSp5CODeJM64+SA7y+U6KmR0HrF8Q3an1JhsOHjZqLuTRrdVrkyLfHi0EcL/CsXgeZYDzZ7mkuJ0Y4W+PewuJCYKy0/Nu+U26c5K/D8FktlpurJepqUAz6rUBu92BPg3U3e1yFNlEtuAguk1Ruh0aW7sTVvqDgOQwNcQ2jPfZJ08Imn7siS9ZI4OZgfmI+NA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3675 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9e14571f-72ff-4cb6-8b39-08d818437280 X-Microsoft-Antispam-Message-Info: C0OhTwSJpoTXohE6SR2TzNl79MTHCm3D3Q9yKWpkFIpqgi0Ymboc3ucOUIHXwBoSSFHmOpCQBQtBo+DVbCGpxSwzcECYqUwSblSlrjZhdthNNABKpFbs+lFoWxe3CQ2ruF2fdZ1xvpYBbXjGFcHDxSN6C8V/lL4s47/ioPbQIHlO+CP98BO7bIx6WPltu4keVNlRbYsZUiqyZEdHCmr55/DVSOC0T3nVh3pfgyk4Gj10jfyJOK2gLUr4iTpoYSehIb9mHRChnRFjiY+oHdrnEPNiT0Uf6QokUlISYyRgEWBVdgy7yxmE2R7fJynGlZERMFpZv+HG0X7lKuBYGb3yvbFPsk80Hl2qK3drspYPaOgiTSTvsrfGv7I0Rs43PD0zwGnLOICdtkrBuamwNnbSjg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:29.9250 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0626758-c3a6-436e-5cb6-08d818437649 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2319 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: cRVi6FyZGMAIUDBsGzwduC37x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005738; bh=voGg+YpW8G5ACxAmL58pMlvqgdD33QtnAFZwFOzdqoI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=xFyQFn0+vNR/70fov6E8dIDwHxVrVFvN941XlRRQvdSwoJ3gaSO8FUjO+bEaIiKdekR xfxnqFltnB5WEEOzToMvW2KYGha2iTCwrRkQmga7374lsSEp/Bh4+KnzRS70VVWFznnwS 0ood0UTjrgIjVru0I9W6cQvn0Xq5KUOAhzw= 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 --- 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 (#61672): https://edk2.groups.io/g/devel/message/61672 Mute This Topic: https://groups.io/mt/75081489/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 Fri Apr 19 05:34:53 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+61674+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 1593005739688379.43013564395096; Wed, 24 Jun 2020 06:35:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iSaiYY1788612xyfoY1IZPUF; Wed, 24 Jun 2020 06:35:39 -0700 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.84]) by mx.groups.io with SMTP id smtpd.web12.13761.1593005737321797467 for ; Wed, 24 Jun 2020 06:35:38 -0700 X-Received: from AM6PR10CA0078.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:8c::19) by AM7PR08MB5349.eurprd08.prod.outlook.com (2603:10a6:20b:107::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 24 Jun 2020 13:35:34 +0000 X-Received: from VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8c:cafe::c1) by AM6PR10CA0078.outlook.office365.com (2603:10a6:209:8c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61674+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 VE1EUR03FT057.mail.protection.outlook.com (10.152.19.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:33 +0000 X-Received: ("Tessian outbound 022d32fb9a40:v59"); Wed, 24 Jun 2020 13:35:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 55a8c4a380fe7672 X-CR-MTA-TID: 64aa7808 X-Received: from ef47809a2c5d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7BEFA549-0348-40FC-AE11-5AAA1169D426.1; Wed, 24 Jun 2020 13:35:28 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ef47809a2c5d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RDyF81wvNmHsLIsoBdVo3k8IdFO+4gDM3KkmMN01d6UOjT8Ii1kZCGtcKv32YZBmzgZgJdJGnlMHPNjiz/artOPT9nPbLeYsXKUjJUTAcVLRvgkKdTLhKGlniYQLnH0wSAmcwdfBf+4zdsmr7o0kqU35GR7TIHa6p9xnemJhjGXeqNVqbhonnfx+Gzexh1sV6npANj8DQSH82f/eGGaLKQVGGNGZUC2JujpQSbUv6Wjh9tOwKp9/y9+0JN77PsEhyg+FywchM0TJUJxpcUFJUE4ekU8uHIzH3+L6X1e6UuUs4ft4DaYOjtjFWJWtAcMkzqzytZCJBfzIp+uDsjDhCQ== 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=RdLOoOGdRE0ayLUEsESS5oc5PZyYM9GXdWSK4MKRjqg=; b=MiugrF/ZVabtp7E+jmNhGeudeJWRhVXv4qlfHyuWepSWXF3WwoK01rZw2qBAOB3TzVfP6q1PfWBaLK7j9vCa97t2h4YQtoMlSHYgZRDCECLQ8gkb5GFbq9ddmYW2y1XL92I4CqmCdE7J8tmP7CFoQdYsTXxyHrxBcLklF4DIUpPfEAGlognoaRPSy/h0I750/Lftuo372eUSqofPkRxNiBLWpbtv4m6L8cEwvQhIkeFhm2EZIwBQ16jcxDcaNLesWAZlloNPZzmejy2Xqr5qms2yC0HuFApCbtlnU5fCsmdB2S65Kef5+sTuQAM45we1JGYzrXZhI2NtXl42eg6EGA== 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 AM6P191CA0072.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::49) by HE1SPR01MB022.eurprd08.prod.outlook.com (2603:10a6:7:30::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Wed, 24 Jun 2020 13:35:25 +0000 X-Received: from AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::a7) by AM6P191CA0072.outlook.office365.com (2603:10a6:209:7f::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=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 AM5EUR03FT052.mail.protection.outlook.com (10.152.17.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:25 +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; Wed, 24 Jun 2020 13:35:13 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:12 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 12/15] ArmVirtPkg: Support for kvmtool virtual platform Date: Wed, 24 Jun 2020 14:34:55 +0100 Message-ID: <20200624133458.61920-13-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(346002)(376002)(396003)(39860400002)(46966005)(86362001)(336012)(5660300002)(8676002)(19627235002)(186003)(8936002)(1076003)(70586007)(6916009)(2616005)(83380400001)(81166007)(356005)(26005)(70206006)(316002)(426003)(30864003)(47076004)(966005)(44832011)(54906003)(4326008)(36756003)(2906002)(7696005)(478600001)(82310400002)(82740400003)(6666004);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9589300-16c6-461f-8273-08d818437898 X-MS-TrafficTypeDiagnostic: HE1SPR01MB022:|AM7PR08MB5349: 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: WKV4rV3OXyJGhkT4sjGLMk03oY4f2PmNhtH67DIC9I7YFtZC0Fmesjchh99/VhC5g3ERi2XLeXmGVm7mRcHvCXEJUPAWcFpF39DcJtuHrJmAJlgdQxQ+oADj6nyN0jBWAMGfQ3qp2mMwZin26ZvwCXE7O/QLbnxy5FM8Hu+M4seP+6Aks/t66OmaOwFqrrMdje6G8WyKJN/SIdx2jsGuKGC01Nc7BBOyNe0yuO6N9n0KDdLFdPW2csKRm1/pievR41zUOls2x0LMYwHOMg2M5hncNAnDsMbRJfv0Ti8Hpw0BhZPU0qXA1P5KrJ6H5T4fsxu83Bc7m/EVV6I9BrYB9rHKOV08fU3YSh5D3VUp+7ZpHcoIKfR3FP4W1q0Ny3I60oipX53IH18yEXETSYbXxREzthgaBPYOAD1mmrmYY937EcQyKmdTWu1qqQPltytappyzhC5D6hRSMy2aW/QLXXOA4LR79C+kfdNXnBlDRac= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1SPR01MB022 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ae89c28c-3cf5-4089-792f-08d818437399 X-Microsoft-Antispam-Message-Info: C7q4++4V1H6s44fKiy/TIdsD/P+xBzjNhPKrK+/3l2Xne4Q6zPoBoySBbhX/hisAxM9TfslQPy1NRz7lsqO5nbrW2+p7qVpbEaC4qU+ZENjEc/8LKEDB37XR5xp6VxdWasSaXO/Mia4KnlJ1f3r3dD6ThDVdeMD41URPBcho53udtnYaASEPAUbepVI/rtrCU+jrKo70T0o65YO6fdSdff2pL06gUmRODslT96Rh85GoyUrMB5YmGySyW/MuXPsD7fwNvhnyVciw++PNr03KZwNkT7vWG5+5CJEx57Jadzlax3RtzADTCYquQm8pb6PBsXALXXn5zZAMbnr6LN79zcOsZSU4HGslzPKBNiPxpSEet+2Tu1j1GasbUk5D0iZccoi4ai8rM/wLQ7N08shjdTpm8MRkXW+pB8og8SAxCVyE4PZKMF0pUPncI3VNQIYd+1AZVsavjYiHvgEW+h7KQ9yNuL3L/HdA8dXyJrMBS0I= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:33.6572 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9589300-16c6-461f-8273-08d818437898 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5349 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: uyrGfcnQkVwD6Q85h1HIyzEJx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005739; bh=cKudGIz4qc5WQFNfS+t2qdY0Ja0NSQJMqtbRasQrZ2M=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=OyK2nn1bLm5Q0iqpYp4wA4CZa9VYQxMSW0PFBIyiYWIb8NSYb5P/8skOliNyQYLOuE4 MkrNCjBVHTQ7zU980805c9Q7wq/fHsHoFxxprXPlVH35+brlmyOC35b+2T5zTDTnmaVoS EuQ1hsibBRgEcBLJpcji2lQm2SApGIrMukE= 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 --- Notes: 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 | 345 ++++++++++++++++++++ ArmVirtPkg/ArmVirtKvmTool.fdf | 259 +++++++++++++++ 2 files changed, 604 insertions(+) diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc new file mode 100644 index 0000000000000000000000000000000000000000..76e158eaea4be089de65f0f908f= 8623840681e0e --- /dev/null +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -0,0 +1,345 @@ +# @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 + + # + # Defines for default states. These can be changed on the command line. + # -D FLAG=3DVALUE + # + DEFINE ENABLE_NETWORK =3D FALSE + +!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 modules, so that the PE/COFF + # self-relocation code itself is guaranteed to be position independent. + # + GCC:*_*_*_CC_FLAGS =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 + } + +!if $(ENABLE_NETWORK) =3D=3D TRUE + # + # Networking stack + # + NetworkPkg/SnpDxe/SnpDxe.inf + NetworkPkg/DpcDxe/DpcDxe.inf + NetworkPkg/ArpDxe/ArpDxe.inf + NetworkPkg/Dhcp4Dxe/Dhcp4Dxe.inf + NetworkPkg/Ip4Dxe/Ip4Dxe.inf + NetworkPkg/MnpDxe/MnpDxe.inf + NetworkPkg/VlanConfigDxe/VlanConfigDxe.inf + NetworkPkg/Mtftp4Dxe/Mtftp4Dxe.inf + NetworkPkg/Udp4Dxe/Udp4Dxe.inf + NetworkPkg/TcpDxe/TcpDxe.inf + NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf + NetworkPkg/IScsiDxe/IScsiDxe.inf +!endif + + # + # 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..9c70b315cc787bba6db747298a6= 00d65759b4188 --- /dev/null +++ b/ArmVirtPkg/ArmVirtKvmTool.fdf @@ -0,0 +1,259 @@ +# +# 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 + +!if $(ENABLE_NETWORK) =3D=3D TRUE + # + # Networking stack + # + INF NetworkPkg/SnpDxe/SnpDxe.inf + INF NetworkPkg/DpcDxe/DpcDxe.inf + INF NetworkPkg/ArpDxe/ArpDxe.inf + INF NetworkPkg/Dhcp4Dxe/Dhcp4Dxe.inf + INF NetworkPkg/Ip4Dxe/Ip4Dxe.inf + INF NetworkPkg/MnpDxe/MnpDxe.inf + INF NetworkPkg/VlanConfigDxe/VlanConfigDxe.inf + INF NetworkPkg/Mtftp4Dxe/Mtftp4Dxe.inf + INF NetworkPkg/Udp4Dxe/Udp4Dxe.inf + INF NetworkPkg/TcpDxe/TcpDxe.inf + INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf + INF NetworkPkg/IScsiDxe/IScsiDxe.inf +!endif + + # + # SCSI Bus and Disk Driver + # + INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf + INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + +!if $(ARCH) =3D=3D AARCH64 + # + # EBC support + # + INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf +!endif + + # + # 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 (#61674): https://edk2.groups.io/g/devel/message/61674 Mute This Topic: https://groups.io/mt/75081494/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 Fri Apr 19 05:34:53 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+61673+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 1593005738534574.8296898954289; Wed, 24 Jun 2020 06:35:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id n2PrYY1788612xbkc4pckrAI; Wed, 24 Jun 2020 06:35:38 -0700 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.57]) by mx.groups.io with SMTP id smtpd.web10.13579.1593005737276778649 for ; Wed, 24 Jun 2020 06:35:37 -0700 X-Received: from AM5P194CA0021.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::31) by HE1PR0801MB1659.eurprd08.prod.outlook.com (2603:10a6:3:86::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Wed, 24 Jun 2020 13:35:33 +0000 X-Received: from VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:8f:cafe::cf) by AM5P194CA0021.outlook.office365.com (2603:10a6:203:8f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35: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+61673+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 VE1EUR03FT063.mail.protection.outlook.com (10.152.18.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:33 +0000 X-Received: ("Tessian outbound 147ff5d152c1:v59"); Wed, 24 Jun 2020 13:35:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7c42d14d53692bf6 X-CR-MTA-TID: 64aa7808 X-Received: from 945e343c41af.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FF60B060-1E03-48C4-9578-196CD884CF87.1; Wed, 24 Jun 2020 13:35:27 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 945e343c41af.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gjWpFEHtE5yb2sZa+oML2pryD0u2JUmq5a/U+LUkm8gkc/J9UpqSsEAKjnJPeUU229YWEMsME7mOLwHZY3dVIEhaovKdQGMch6P5bNxWNA7acHK44rKAGmPk1uhuwxIxcjOUJP7og17mv6q0Trzb5I14sPucZy++C9IFUo2ZUpyaKbNgcS7c05X9sKvxMEKVvInA38aRibLyiHivg3a61cg/zsrTBu0ittV5TjpAi1xGwmjUWWBo9FscCzeIzAUp3Pjty83ddx+qS03lSBNu96l2J5bYiYgs5bM/NVKD02c+I7UJHyM3DlGUy9joyVSa9/NMGS3bDYNPJTnKaeeb4Q== 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=5tugKOAKShoE4BWfxOBvOPT6gJBRCS5dKw5WvhdB6n0=; b=lremYpqcty+flwY0fg88DovxlRsPCR6EVrSjp+xYr0TLjOBGy9eQwEU/8WOx5m5kyrp39BO2zXB8aZpDGTheccDsoFrAMgnMzYceCQoTEFg7IcpWM1MML31F+Pui2T/fCbPhj1ktG9jkiwUyafATk5fZS1cV7eAaXluDJA2Sq0tyXdmOf645vzG3ohna+kybA/coJl+9SDxlTg7PtKiI5V9vaN5qRwVkWB/XwuT7RUAlQs8eDNff+CP3y5SzlQirD/HLLxp8poM4FI0ual64TvXCp0PLwbGEi+6mufjfpea2vdWDjVsUGMjrnyNeaH1KxsOQhYDKJ98bjdDK8otiBw== 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 AM6P191CA0068.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::45) by AM0PR08MB2995.eurprd08.prod.outlook.com (2603:10a6:208:5f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: from AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::14) by AM6P191CA0068.outlook.office365.com (2603:10a6:209:7f::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=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 AM5EUR03FT052.mail.protection.outlook.com (10.152.17.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +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; Wed, 24 Jun 2020 13:35: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; Wed, 24 Jun 2020 13:35:14 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:14 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v3 13/15] ArmVirtPkg: Package dependency for MC146818 RTC Date: Wed, 24 Jun 2020 14:34:56 +0100 Message-ID: <20200624133458.61920-14-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(346002)(396003)(39860400002)(376002)(46966005)(316002)(26005)(54906003)(70586007)(70206006)(82310400002)(83380400001)(86362001)(5660300002)(426003)(7696005)(4326008)(1076003)(2906002)(44832011)(47076004)(186003)(6916009)(336012)(356005)(478600001)(2616005)(45080400002)(82740400003)(81166007)(6666004)(8676002)(36756003)(8936002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 797761bf-571e-4e96-ef89-08d81843784d X-MS-TrafficTypeDiagnostic: AM0PR08MB2995:|HE1PR0801MB1659: 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: S68fAqV9RQgBmITfGFr/DB5hI2ainDUSTCvdvVFTGlf8CUHNKauRCuJqcNevPT0Qst+mL01M9j6kqkQNitbG6y6TOmOlPO9EPOsljz/RR5D6POLwa7gdigIJCqFJ1PZVwUiHZeno3ul3+rMnTYa+TNOUzFxy0GuNq0mLeioRwtXIwx5z7zoJOFGd1oG2CmPIDQBHj2oyskZAPY8DdUlzv1B0qr+hMg2nGrCq+QutYLg46AbXGKBDt4xOVnK0qU3FyJlVncFY0eXayvNjmfMX2YCXaUEDfEz2IH+2QfMflTGlgtEX5gbNr2m5JhSC2BWKP8oqVlDlSieJgDC9Xe6P+UQEHLaW0jfJ2a8BsSEquA1RAJvdhTBJteo1XNtEEZ/O30DVsDi48u7K7hPwzHEz4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB2995 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ccaa7519-344d-4a62-f17c-08d81843740a X-Microsoft-Antispam-Message-Info: 14VzE8t0VDfMHoS3zGIfD1HlwtQATbaWd7kw0PChfCh7y7JafmXpcYcSRv2xQhu/PLzrCIHdb9dGFGd4QmtQakCXXLQBxjDt4jbx6/kDNqi9XyhKmhomsJNYyL3k/qFfseJ6My7VGMh2XHD+R9zzRQ9Ayt7B7jSyPeDJDRmFD2WvHj/f7GZh8HxPf6aqWArxuRLl8cogcf9o0i8ddZLe9udCDKBG5FfSVihMvvqqywJ3eBCJA/tDJdVFYwRo7iQUev9rv3YVRT3TsJJfSBWnorBoJiYgZA5qT5JrWtenCtsjOs7WX56m8bcYJK/DWGLjDGU9tkgzXpkdsgfCzEQ8Inr7rLflQpdCROV5l0X90Z+B2QwmlfDmBkp1SxZTX8nRKmmnT7w423cT4Kig3DgVPA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:33.2081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 797761bf-571e-4e96-ef89-08d81843784d 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: VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1659 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: AmR1C9Kl3QL5kXPScrUV7vuax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005738; bh=sMcXDEjvjPrbm/n0+RIjmpioVqx7lLGWdeHZi7wrAJM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=bepc9sAmyT4BVc5MVashfed+LoTZwIZcktKBfIFVSpObcV+34ZnWVbZGjgicWdZlTCn Xbq9ZowOu6hpWcNJlcDIEJGJaFIbgxfpyBu/PFY5KMrdLOUiF6GIyaYk1GtQjF/0MBf57 9uZWVBxS59Qt66EW3WSutmzownfjXisUU4E= 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 --- 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 (#61673): https://edk2.groups.io/g/devel/message/61673 Mute This Topic: https://groups.io/mt/75081493/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 Fri Apr 19 05:34:53 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+61675+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 1593005741836349.4879778932278; Wed, 24 Jun 2020 06:35:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4KowYY1788612xDcAVdEPxq5; Wed, 24 Jun 2020 06:35:40 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.78]) by mx.groups.io with SMTP id smtpd.web12.13763.1593005737589733756 for ; Wed, 24 Jun 2020 06:35:38 -0700 X-Received: from MR2P264CA0127.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::19) by DB7PR08MB3547.eurprd08.prod.outlook.com (2603:10a6:10:4f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Wed, 24 Jun 2020 13:35:34 +0000 X-Received: from VE1EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:30:cafe::36) by MR2P264CA0127.outlook.office365.com (2603:10a6:500:30::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=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+61675+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 VE1EUR03FT041.mail.protection.outlook.com (10.152.19.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:34 +0000 X-Received: ("Tessian outbound 839770a6d413:v59"); Wed, 24 Jun 2020 13:35:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e30a203082ee7f6f X-CR-MTA-TID: 64aa7808 X-Received: from 3b680f74069a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E9A3ACBC-B11F-44F6-90F7-781FE70D390B.1; Wed, 24 Jun 2020 13:35:27 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3b680f74069a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CxOuhW2voPEMuMXtCkHAiYNOJQcLEjs0DMGTL2bfRAkZiA8dFojhykCBhfAHJsk9+BLAWBSgJqi7lqgSPNpAZPEnm5smsUE4qB2RUvpSYbOZj2hcWDqt5XqzxZTyONFhpCB6rAUNKhwO2ayoOcHdp7DoN4EuULw7PwslKYynmV+Ik8QGA73stwHcw3bJC6U08WEf1Z8cs25+lAYbul55nBYDDVAlY4PwJW6Ksfc7wtNUIZFehruovKKwmz+jMpztR9Bqre7ek3WQy3quSMiQGoXGfDEhfpqsgbwUFwfZ/QXMDUImhto0qBm/hLbdCs9TRyWI9K0OboH3SLMU1+K4Pw== 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=a7xOaLk7oyLqHlo30YN4+gtMId+3q62fbg7en1AoPPo=; b=iurtpmrjnrMlz2MAgCCP9vY/Uju3x7ITx2sU4zskMp1aMlqbCNo8lJP9O44+gpcgsPYaeo7hM0DzmWbFfnJmBnyIYAHjixHmn35pNGypJ6P0Hbig9uDqCFJl+DWzZGJ2JG9juokpaikf5dDplDWz1hpxFD5yaDWsHfNsGNr4STOhSK478nspUBfUbCtEJi0Rez7LoRlSvscliMEO/vUUDziU8sYBxlMw9MbnpoxjnnNsXQdX12ITak1+/oAUpKW3o1zu2npRyTIgqPQH2KSzj239CF1o3qG5yUt/u1bhKbLv1+fo9iZzy8X6ENyPHP2cI3ZvgR3UZE3xWaHHV3TeyQ== 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 AM6P191CA0069.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::46) by DB7PR08MB3212.eurprd08.prod.outlook.com (2603:10a6:5:1f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Wed, 24 Jun 2020 13:35:26 +0000 X-Received: from AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::71) by AM6P191CA0069.outlook.office365.com (2603:10a6:209:7f::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=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 AM5EUR03FT052.mail.protection.outlook.com (10.152.17.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:26 +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; Wed, 24 Jun 2020 13:35:15 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:14 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v3 14/15] ArmVirtPkg: Add kvmtool to package dictionary Date: Wed, 24 Jun 2020 14:34:57 +0100 Message-ID: <20200624133458.61920-15-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(136003)(376002)(396003)(346002)(46966005)(70206006)(70586007)(186003)(26005)(6916009)(336012)(7696005)(426003)(316002)(2616005)(44832011)(2906002)(82740400003)(356005)(4326008)(82310400002)(5660300002)(8936002)(8676002)(81166007)(54906003)(47076004)(36756003)(83380400001)(86362001)(478600001)(6666004)(1076003)(4744005);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e4a8bb65-a9cb-4369-c2ad-08d8184378d2 X-MS-TrafficTypeDiagnostic: DB7PR08MB3212:|DB7PR08MB3547: 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: mtqQO09mTIgrsSMjC9wcba+6pSMmB3ahSp/fy1UarLo7ZnYp11P3Mk05XLKYvOdCXMfRHafKxkYmleymk3C9VTa9w3PAWUGkI5YohL7R5MNhkBGOI16PzyMzk5NplEsSMKlBKR0ninwB5TIcDXOuV0a5rYc+uvTy9Mu5AC8YGt1t5gjRJWtO429/MirD80UGSbRWfXbIKJUoEZ03rv0ooNvvQVmudl//2Xjrm78WP9d4gQKMY0E75+4BqIBLKRYLv9fC2iw7QbARm1Ci4owCBbKvDyBuLFrHJY7NhOKfdyChhJe776uNqzrprZEW/iQmnHT/oGTCywAkuzKeTvuReOPrBZzcH0+DaOVbR8M2XohOQvYtwrlowp55+0/+vaW5IatO2wFGn8xqrKLwF5DO7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3212 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 61911d2a-aec8-4d61-06c8-08d81843746b X-Microsoft-Antispam-Message-Info: 4gyapUhpRdg6PGDWCZ+ZbdvrQHRNlKp5xJRROrgP8pPumKZ8XBnqmWidrHC8soOap8l1iaF4jDdxaR5DMEv2tTKChG0qTl5mMMLnA9xxZ0bKCKuMcZRVVLmjzB3hGNoiEvhbQkP/JoF0uMB80/zJi3dx3xq3J0HVNtIql7z7QFJ8dNELbvddj4jf+ZzPSffDEZl91AgtZMDYv5CfuJL2qTMhWczaBPulvaYyJAGURnAYeM3SPdxpaHkdkIVUcvmPyQd+oNI3KOsq550S34kLR4JMacbRVqcDnVa2O3F5d0Vl40DbdyFurWT8DWK+V+bJzRNGT8vR+K0NOQhgo7Q0vKYau1HeB0HUTWvsduMOJD8GooD4WsJPQM47wvn81YJrWaQwH+vMv6SjtpqPzziOKA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:34.0729 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4a8bb65-a9cb-4369-c2ad-08d8184378d2 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: VE1EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3547 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: 9V8uMyqJZZmJvoUfQjObL0vax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005740; bh=vJlBFnyMeEcckqH+bBycKg5NZ2JNq5ZONfQrSouXDlI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=a/4YYwWW7YD2N0GvsrqupUXz296GcbIChMXaeHKiUjaxdf0BiZ7/38RjlRjR0UeasHO gHlKwtfJEMgaQD3DALYZtwYKCbJyHisobVTtKxpTrxpnKhY7SlXEQ9cfSgPv5UGZKPRz+ dK2jhyzU+9Ftkfkr5yqwUEC6xTTTgeJzlTI= 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 --- 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 (#61675): https://edk2.groups.io/g/devel/message/61675 Mute This Topic: https://groups.io/mt/75081495/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 Fri Apr 19 05:34:53 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+61676+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 1593005742373609.456048297749; Wed, 24 Jun 2020 06:35:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id A6EIYY1788612xEs1573juXo; Wed, 24 Jun 2020 06:35:42 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.70]) by mx.groups.io with SMTP id smtpd.web11.13582.1593005738781888385 for ; Wed, 24 Jun 2020 06:35:39 -0700 X-Received: from AM5PR1001CA0041.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::18) by DBBPR08MB4284.eurprd08.prod.outlook.com (2603:10a6:10:d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.27; Wed, 24 Jun 2020 13:35:35 +0000 X-Received: from VE1EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:15:cafe::c) by AM5PR1001CA0041.outlook.office365.com (2603:10a6:206:15::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35: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+61676+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 VE1EUR03FT023.mail.protection.outlook.com (10.152.18.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:35 +0000 X-Received: ("Tessian outbound 2ba684f51d22:v59"); Wed, 24 Jun 2020 13:35:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8e09875be860cfa2 X-CR-MTA-TID: 64aa7808 X-Received: from 3fdad3020095.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0AAEC3CF-5489-46F9-A129-88FFBD34EF5D.1; Wed, 24 Jun 2020 13:35:29 +0000 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3fdad3020095.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jun 2020 13:35:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OxyCr1OqUMv1jy8FiNHSy+rlo9JTZH4nUtgqQvkOFe+CjJlcMZNFu1TXUeWcFMmmkbVFg1Tf90+5jLqroXbn3KlY8Kpfwr08n65K3kAcfaBlubmfFpI/5HBvnsUsrMfSVc5oQ0XySFyncRW+1IusLnqXpei6MDM4+kTWhlddGuHonfCOk0RBLIAfV1c80uHk8/NeP0DOrxzZFurDcDkTPUPA928QcV7vjy8OifWEHstbEN/LPa5Z1GNc4Ul+uKVyp6majAqJyXhySctktsHq97htBQ5YtdsCvOO8W/ISOV0pm+Wfv4H3sDgAp1CBK3Bq2sf9ObJR6fVjk2F7oQz3Jw== 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=QJalxT792K78TB25bNQehRH3DTKuAnmvNVCAisfEImE=; b=CjJb70XtqFgutA+PinxpCD7PNGcrAKkMgc18Jgj8GGG694emAWhkKMydj1/oYI9wPHTnUOU8yiHWp1bFdhJz2ZDtlhR1hzmc4G7mpvbAZIALS2TtlUNLkv3xEoy4VOZdaUZ4owzXjjpv5Adu0u0+grMwhZZ1C1ea7FWfKTVXRuumPkNm9Yzlu8ZWDguyE80w/h9hWQUw3ZhGP16w0nBcXFX9MKyxVP+hVOw9SV1qi0Dx8xl7lqoRLsLx4CpKvcdqBaEhh1tNEFvMti+Fwh8hccSjH561Mp8M6clEma49bfGezjgQ/1uYzvWeuVKcNoBeoPiLHjwXAsh3BH7INhaq5A== 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 AM6P191CA0069.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::46) by AM6PR08MB4881.eurprd08.prod.outlook.com (2603:10a6:20b:c8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Wed, 24 Jun 2020 13:35:27 +0000 X-Received: from AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::71) by AM6P191CA0069.outlook.office365.com (2603:10a6:209:7f::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35: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 AM5EUR03FT052.mail.protection.outlook.com (10.152.17.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 13:35:27 +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; Wed, 24 Jun 2020 13:35:16 +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; Wed, 24 Jun 2020 13:35:15 +0000 X-Received: from E107187.Arm.com (10.57.22.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 24 Jun 2020 13:35:15 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v3 15/15] Maintainer.txt: Add Kvmtool platform reviewer Date: Wed, 24 Jun 2020 14:34:58 +0100 Message-ID: <20200624133458.61920-16-sami.mujawar@arm.com> In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com> References: <20200624133458.61920-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)(396003)(376002)(39860400002)(136003)(46966005)(47076004)(966005)(86362001)(26005)(1076003)(8936002)(19627235002)(82740400003)(2906002)(186003)(54906003)(316002)(4326008)(44832011)(478600001)(336012)(2616005)(426003)(7696005)(6666004)(5660300002)(8676002)(6916009)(356005)(36756003)(70586007)(81166007)(82310400002)(83380400001)(70206006);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3fbb460-1f41-4b31-0edb-08d818437982 X-MS-TrafficTypeDiagnostic: AM6PR08MB4881:|DBBPR08MB4284: 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: zR1mptGF2Nb2+FHOnazy2qs3JSIY+bcBLJBllxeMng21yba/GNxd5GU3c3qQa2ZXv1V/JbRrJat1cNTEJcOgByfbBLkhQd/9hNEylKuD2LyETxyewlnPsYQ8IoYhPBKK8cpBhcTxFWGjdES8PFI42LKBpNl+XyGHSWJMIGV86fDzewpiMibSGBsQwVlIzLakBSzQTNDCmJJkatczsGF4OBqUT+QzAYMdqS58PGg1br8QKVn65j04gp5GMEqDGIWNa1TihagmFuLrssz1Nncla+Xv6vSewp2/YvinxEqR3Tv/7kJvF7okuHRyRTiy0BF0QZRExnPX7Mf+q9Ivu7cFqIldGFJMWux5pGbRQk+x5Rf+vr+E2tkeFqh7TkoRgDlSzuy3huQnxZR4Q9oNJqYCM15qVVyF/u6VgECCAZx5qX8g8QLwf26RpteAwzIv/MQSuBMMwLv/Sgl/QEn1z/beAzQmlnxlI6IQ928xUFrsDUk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4881 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 28059fee-2eff-4844-f350-08d8184374ee X-Microsoft-Antispam-Message-Info: i4pUCRWBsugOuwopO7UOOluITasLZgNjPAokqIMevL91oR+JH9h1mcVCYYwdrJYHsYKM8IdyBXR6xZYj/KZEAPNsw6vO3dbWnnmIT3EdSKpLuHyb/7sryXW4FWDFeZMzi1wyhGUN0z4hwV6LNW/V/jFFIOtvC/RwKu409k3CFPwTNJS0TR906Dxz4ThcYTKIbSYxM1TwzlEqHEVpuowFzyu178Mpou6Q9f13AfTfcX1JvKWZXERFEX1RFt3vj+yQKmoNXw4w/lAmrmW2IISLd2nk+VabkOTS0HWWnf14DTeaHP1zzaWQK+X5+fu0Uxe5w2i1eH4bIdtoWTUj4J5qbE5qOke5Vd5M0pfoeetRBdpY2+++0a1E21H1+tinNqR9g0Xl2PpoDCkWNUER3og2uTORzdb7vwOWMbdn52C74ZpdIEw7VnXJ/0S4YGozPsVSJPo6Cku8jtnFSVmBDO5Nf7y9bQvtKNNlvOUxOxNGUe8= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 13:35:35.1558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3fbb460-1f41-4b31-0edb-08d818437982 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4284 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: MtHKhZFB3w94v8qG2nuIShSQx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593005742; bh=EafsyDNL2noaE7yW288lOc7mZqlb9Da4wUzMFejoc/U=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=dARbwp+MkMN0tnp5W5uop9COxk4FLwQhy6a+Ux599X3AJ1yANAuy3G5UlhcTWIO3N9x XQVp8wTbyUHtGcu1JFRwDQ+ko2zjXvRQGd+Fxvvkw8GyduQz/ht9e7pEpROowgTUoChfH I+N2KecOJI1p89u9XjhDlMqJVySzFYxKTjg= 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: v3: - Updated Maintainers.txt to add reviewer for Kvmtool platform. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200911#59650 Maintainers.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Maintainers.txt b/Maintainers.txt index 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 (#61676): https://edk2.groups.io/g/devel/message/61676 Mute This Topic: https://groups.io/mt/75081497/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-