From nobody Fri Oct 18 06:28:23 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.108 as permitted sender) smtp.mailfrom=bounce+27952+109010+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1695393715760377.183743094547; Fri, 22 Sep 2023 07:41:55 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=knkYkUd3mp184j9eLLEWC08s7TyxHmPK71VIDlw/c/Y=; c=relaxed/simple; d=groups.io; h=Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:NoDisclaimer:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1695393715; v=1; b=SV+emSj8Tpa2OpBvAJGWxqu/ZTbiqR/tf65Krcf/vSc5kiRE3N7Zy4+oxLyYMKU70b861YhK VfbFBhZZUJFGPS5wv4cqKJnIeEwzMyBDmaqF4xJAZZiK0z4YIzt7iqrXxkBXKGY6XVkCpxyJ8JO 8TSWhNPVTz2ls3Qkk1X/NcSU= X-Received: by 127.0.0.2 with SMTP id SGpSYY1788612xwV3cKqrjmh; Fri, 22 Sep 2023 07:41:55 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.79]) by mx.groups.io with SMTP id smtpd.web10.23109.1695393714376824467 for ; Fri, 22 Sep 2023 07:41:54 -0700 X-Received: from DUZPR01CA0076.eurprd01.prod.exchangelabs.com (2603:10a6:10:46a::7) by GV1PR08MB7914.eurprd08.prod.outlook.com (2603:10a6:150:8e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.23; Fri, 22 Sep 2023 14:41:44 +0000 X-Received: from DBAEUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:46a:cafe::99) by DUZPR01CA0076.outlook.office365.com (2603:10a6:10:46a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.32 via Frontend Transport; Fri, 22 Sep 2023 14:41:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+109010+1787277+3901457@groups.io; helo=mail02.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; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT033.mail.protection.outlook.com (100.127.142.251) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.12 via Frontend Transport; Fri, 22 Sep 2023 14:41:44 +0000 X-Received: ("Tessian outbound d084e965c4eb:v175"); Fri, 22 Sep 2023 14:41:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a25504438af0c7e3 X-CR-MTA-TID: 64aa7808 X-Received: from bfaa3c9551ba.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 807BDD63-608F-498C-88AF-91EC9EEB6336.1; Fri, 22 Sep 2023 14:41:37 +0000 X-Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bfaa3c9551ba.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 22 Sep 2023 14:41:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ILsR2/LllcuvMLpfmW/CLPjuunKnz/ugE2idWx3gT8KEkcEabZX6D+B7afqFCZWjR7aSH8r9Bv144c3hJi3Y24NJGAjTtDqhJ0/a+8jU2WvJOnv63E557wTOZ3t9+FENt9CwPR6nOkVKoQnZyOznni6royLNMvfx57I8uXa0oa9wPwi4UuPOF6L7S0dHDni+6H1MGLDMxW268OkzDDjVqBx4vj8N6EkLT9XUGN87n1K/amTsAtvDyLfEWS51g7inURwjCSpzR/tvNTbljhkzXLUjEGekBqious47T2+FkRO7cOQ7XWhTep4dgAKZGAvaRT6jtwKxfauJpHV1jgYiMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PWxqAkHWwZr8qPQqPmivv2L30y+il/+OfsRFa13NJ18=; b=H57vhysVnMezV7iTkQvf0GCsgqoYam9R06Oj77/4gviDNSS+swbj13xwmAA8DvyGZmyKBtcEHwiJjYtf3qI2B6ZlYBuVPHS1duQBe66Bw/YTy+zmimuekZEnOz/OaWJrBpP8Rai6lWGVsMEABe3T//v77OU0DP2pxgfa24U/hj6zEQtBrrXLCT0hhF7AvxQ8SFKh8N0oSLwMBArmla9pUaO9OLv5S9NkcBlLG0ABH6FZcz+clwaEOQg6L3+Jdbb4zq0naJMtgme9nD65BKRXnlvfClbX3VqYEhwwQPaHUkyn/KQU/KfE9J3FtjY8OTEdp6QB8znOH34c0E+FhdaOfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AM6P195CA0064.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:87::41) by PAXPR08MB6685.eurprd08.prod.outlook.com (2603:10a6:102:133::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21; Fri, 22 Sep 2023 14:41:33 +0000 X-Received: from AM7EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:87:cafe::73) by AM6P195CA0064.outlook.office365.com (2603:10a6:209:87::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.30 via Frontend Transport; Fri, 22 Sep 2023 14:41:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT052.mail.protection.outlook.com (100.127.140.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6813.20 via Frontend Transport; Fri, 22 Sep 2023 14:41:33 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 22 Sep 2023 14:41:25 +0000 X-Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 22 Sep 2023 14:41:25 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [edk2-devel] [PATCH edk2-platforms v3 3/3] Platform/ARM: FVP: Add ETE device if supported by FVP Date: Fri, 22 Sep 2023 15:41:23 +0100 Message-ID: <20230922144123.41164-4-sami.mujawar@arm.com> In-Reply-To: <20230922144123.41164-1-sami.mujawar@arm.com> References: <20230922144123.41164-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT052:EE_|PAXPR08MB6685:EE_|DBAEUR03FT033:EE_|GV1PR08MB7914:EE_ X-MS-Office365-Filtering-Correlation-Id: 47c8d2ca-9954-4be9-cbea-08dbbb7a0ab9 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fFZAPKDQZLyUu6oNDDCDQr6JJajEh+uqRjcFrAzoN8e5jfJulwRsrHCXn2zIA2N7cLQSH659Xa5M6ETmF6CX6kpasJLsZYRY0HxmqBqix3Md7BKk8gzfz53S7TwFLBKYVTSKiu7+h7p8/e6hpjZafdVRKUjlMQoQuoJ8I6YVwmQNIlR8QPK0DutAAgMXEVgc3umdl7pJT/HlBNSpMlQobnMCpUYVvZtfn36roekQ/7PeZulD6VJYLXRwZ6iUmuU8rkJe8mgZomgzi48HzATnIDJHysNNADJRElVDKz9enP3SK26Hf5ssRAWN90agnlqDjVGxpLNA8IcttLTOuQYUOyrLSZGcK31TP+OGwT4LIXgt4oxdYSZf6AQvGP6Fggu9zEhrfy2KlsKcnCwWbsyjR7eeNN0Ck1kMb6tm7MooD1op5JgGGVkQXSpjmYVBdZ9qmHuoiZ0nOFCgITeALgEWY5ducSFzrBrSeHaadXm5+9ZWYAgbthk06Q2ScmSqv9WQZGy1pInxL7ayo6rZ2xv0dRJOjpjX4Fu9I/9FvEIQCZDg6e/8WdJVDpB9ZSXsv+jm5+kd+xGOP0zUQLJHM/VVpPkkH5MA5lZ9YLNCLfAOMNDLw2m7CyxcQpK2L8OXMmexKlHeQh9qIXBh3xYr/3QslhG9wz0PLpaoh+yiQv7vFgqyaXMiKdodmEQLDqu+/aTp8f6XYvXBRl6qhSDDpnvOwW9mLrselOj5GNdyrsA8mlwCSB/BQ4PXt8fzA888DmWgJhfNOp1gZA6+vD3DEVGeMWQO/2vr/jMTk0o9O2nthqM= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(396003)(376002)(346002)(136003)(82310400011)(186009)(230921699003)(451199024)(1800799009)(46966006)(40470700004)(36840700001)(7696005)(36756003)(40460700003)(83380400001)(86362001)(47076005)(81166007)(82740400003)(356005)(2616005)(36860700001)(40480700001)(336012)(2906002)(54906003)(26005)(70206006)(70586007)(316002)(5660300002)(8676002)(41300700001)(4326008)(6916009)(426003)(966005)(1076003)(478600001)(8936002)(44832011)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6685 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4c46360a-72a7-481b-5785-08dbbb7a0442 X-Microsoft-Antispam-Message-Info: AFZrQfTp3oyWNF/fn7sI+6DhjeZuA8TH/blKr0RlbIVwdva7469BU1R+TciHeyIHltP2IsjuWCGuWqVgTkMpYdDL0YnHtdQ1CPN7YHuSiNCqrVUGlQ8AzJ1ExCPD7ZOwiw51h3qG6ShBhW5vOPCS19dxlFGbEXemvUp6TI2y8D4VnM4AFWCaCHZK7KCtlKR87i7sPIuS3qv6sRcRtb032ZVKzdrTvSBjNUDsHBPIbIWaf3SvpKyvYgiI/cutDVsLVIgqm6eJxcR5DQ2k9NPI3mf0TpKa12nLWEVGbSt3pzIGHJIK8xIph6nk/qfLP+EDN1rNM2gsgnIj1bfLrvK0/d0oy0MZ9X0smai06Q6DAxMWbRxospGYYucyyJZ4i4VPwN5phRdWW7scSsEJLulyFUzp7MQ5kLLb3SJJFuzeLYQ1CgqoAO1Kh43MbO51cNxyPIbSsIzYng2ygIPaAMVwYXDSGDnEhMvjkdLAByfAn+YkRQFNIwF2vz6Ifh5AnyASmm7XZAPGhWbr39X3BKhrK5tos6gz0v5wcoWoxhnjJE3/xVPW8lhvOCWXHRW/J1UEx7wokdhqgiMk54aQ96FchaeF7IPsn830m15E4IyykkbIuPWUrjEINbgIX9MLfVi5NCMy9U0HFKgJUpAzrkxreSQzMWf5GF9DZ3mcENXiQhMqB0kj67lAPL+sKGkFbZQpGp4uy/R9Ef1CVn/Wb0dWoNO6K46dT6D6xG6BezfCz0lPZ8Yl4a2c+djK4diGbZI+6QY8vQLMlIYUSOO3I4qE7g== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2023 14:41:44.3097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47c8d2ca-9954-4be9-cbea-08dbbb7a0ab9 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: DBAEUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7914 Precedence: Bulk List-Subscribe: List-Help: 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 List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: oEUSNVhS9e0qHTWbPmWIG0urx1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1695393716804100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When ETE is enabled in the FVP model the firmware can check the debug feature register ID_AA64DFR0_EL1.TraceVer field to identify the presence of FEAT_ETE and add an ETE device to the CPU node in the AML CPU hierarchy. This enables the Operating System driver to probe and enable ETE support. Note: To enable ETE support in the FVP REvC model 1. Build TF-A with the CTX_INCLUDE_AARCH32_REGS=3D0 build flag set, otherwise this results in an exception when booting TF-A 2. Set the model parameters to enable TRBE as this is required for ETE -C cluster0.has_trbe=3D1 -C cluster1.has_trbe=3D1 3. Set the ETE plugin for the model --plugin \libete-plugin.[so|dll] Signed-off-by: Sami Mujawar --- Notes: v3: - Use macros instead of magic numbers in ETE feature [Pierre] detection code. - Implemented helper functions in ArmLib to detect if [Sami] the ETE feature is present and used it instead. Ref: https://edk2.groups.io/g/devel/message/108986 =20 v2: - No code change from v1 patch series. [SAMI] Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.c | 25 ++++++++++++++++++++ Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationMan= agerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationMana= ger/ConfigurationManagerDxe/ConfigurationManager.c index 749d8eaf52de0888e9e44173f4f84aa41c4c70b5..5b5d1f9d04c0f27bf32cca62f51= c259152e16711 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.c @@ -365,6 +365,11 @@ EDKII_PLATFORM_REPOSITORY_INFO VExpressPlatRepositoryI= nfo =3D { FixedPcdGet32 (PcdPciBusMin), FixedPcdGet32 (PcdPciBusMax) }, + + // Embedded Trace device info + { + ArmEtTypeEte + } }; =20 /** A helper function for returning the Configuration Manager Objects. @@ -476,6 +481,7 @@ InitializePlatformRepository ( EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; UINTN Index; UINT16 TrbeInterrupt; + CM_OBJECT_TOKEN EtToken; =20 PlatformRepo =3D This->PlatRepoInfo; =20 @@ -495,6 +501,7 @@ InitializePlatformRepository ( } =20 TrbeInterrupt =3D 0; + EtToken =3D CM_NULL_TOKEN; =20 // The ID_AA64DFR0_EL1.TraceBuffer field identifies support for FEAT_TRB= E. if (ArmHasTrbe ()) { @@ -502,8 +509,14 @@ InitializePlatformRepository ( TrbeInterrupt =3D 31; } =20 + // The ID_AA64DFR0_EL1.TraceVer field identifies the presence of FEAT_ET= E. + if (ArmHasEte ()) { + EtToken =3D (CM_OBJECT_TOKEN)&PlatformRepo->EtInfo; + } + for (Index =3D 0; Index < PLAT_CPU_COUNT; Index++) { PlatformRepo->GicCInfo[Index].TrbeInterrupt =3D TrbeInterrupt; + PlatformRepo->GicCInfo[Index].EtToken =3D EtToken; } =20 return EFI_SUCCESS; @@ -975,6 +988,18 @@ GetArmNameSpaceObject ( ); break; =20 + case EArmObjEtInfo: + if (Token =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->EtInfo) { + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->EtInfo, + sizeof (PlatformRepo->EtInfo), + 1, + CmObject + ); + } + break; + default: { Status =3D EFI_NOT_FOUND; DEBUG (( diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationMan= agerDxe/ConfigurationManager.h b/Platform/ARM/VExpressPkg/ConfigurationMana= ger/ConfigurationManagerDxe/ConfigurationManager.h index 1b52c2ebc7efb633c748f7316606e3dbe4e0b21c..be2b512911f897dc57328673ae4= f4a2014ec20fb 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.h +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.h @@ -171,6 +171,8 @@ typedef struct PlatformRepositoryInfo { /// PCI configuration space information CM_ARM_PCI_CONFIG_SPACE_INFO PciConfigInfo; =20 + CM_ARM_ET_INFO EtInfo; + /// System ID UINT32 SysId; } EDKII_PLATFORM_REPOSITORY_INFO; --=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 (#109010): https://edk2.groups.io/g/devel/message/109010 Mute This Topic: https://groups.io/mt/101522392/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-