From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 64806AC0BA8 for ; Tue, 25 Jul 2023 10:31:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LZLMhfg9V3LBDKU5IucE0mwsY9OWy4oNbxXfFbSiqY4=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Received:X-MS-Exchange-Authentication-Results:Received-SPF:X-Received:X-Received:X-CheckRecipientChecked:X-CR-MTA-CID:X-CR-MTA-TID:X-Received:X-Received:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:X-Received:X-Received:X-MS-Exchange-Authentication-Results:Received-SPF:X-Received:X-Received:X-Received:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:X-EOPAttributedMessage:X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id:x-checkrecipientrouted:NoDisclaimer:X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam-Untrusted:X-Microsoft-Antispam-Message-Info-Original:X-Forefront-Antispam-Report-Untrusted:X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-MS-Exchange-Transport-CrossTenantHeadersStripped:X-MS-PublicTrafficType:X-MS-Office365-Filtering-Correlation-Id-Prvs:X-Microsoft-Antispam-Message-Info:X-OriginatorOrg:X-MS-Exchange-CrossTenant-OriginalArrivalTime:X-MS-Exchange -CrossTenant-Network-Message-Id:X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs:X-MS-Exchange-CrossTenant-FromEntityHeader:X-MS-Exchange-Transport-CrossTenantHeadersStamped:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:X-Gm-Message-State:Content-Type; s=20140610; t=1690281105; v=1; b=bJ/fK6NtIkqEyf0DSv4qRju+QNMAUzU63T5Y7hmcQj71OOkQpO9dY3E3bP+aBfCqkVqfs6Tz iQwFUlTTKHmCRnyeNOwUkF4qvYyEEwqMdCY52jwbSXvOLBvnTEs1aTFtaC3xiBaJoXRixXzv6bG UyIedlIJraCtgcLVfQxsn6sI= X-Received: by 127.0.0.2 with SMTP id bRcXYY7687511xYa5TkV4bsY; Tue, 25 Jul 2023 03:31:45 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.77]) by mx.groups.io with SMTP id smtpd.web11.17237.1690281104321959507 for ; Tue, 25 Jul 2023 03:31:44 -0700 X-Received: from AM6P193CA0078.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::19) by DB9PR08MB8627.eurprd08.prod.outlook.com (2603:10a6:10:3d1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Tue, 25 Jul 2023 10:31:39 +0000 X-Received: from AM7EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:88:cafe::17) by AM6P193CA0078.outlook.office365.com (2603:10a6:209:88::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33 via Frontend Transport; Tue, 25 Jul 2023 10:31:39 +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 (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 AM7EUR03FT008.mail.protection.outlook.com (100.127.141.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Tue, 25 Jul 2023 10:31:39 +0000 X-Received: ("Tessian outbound e1fdbe8a48d3:v145"); Tue, 25 Jul 2023 10:31:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7ed0130f04c25226 X-CR-MTA-TID: 64aa7808 X-Received: from 0f060978a6bd.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1B12A9E1-6C6E-4818-A517-34E160F55967.1; Tue, 25 Jul 2023 10:31:28 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0f060978a6bd.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Jul 2023 10:31:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DRdQlm9CNfwLXqPIk2b3b/qL+zinJLs2tYdFwaBIUn8xeK6PpUDjVp4lpvwUYClv0rdmcoQYhQfkj4/HlsGQHrbz7hAWNvXVmarHj2tsoxxygrcYdqt2JuEdZuS4VmzBqq44z0X0sEIawqoJDSHzU8GEX6ii4gCXbB+cM/8xS24XMzrLgYeUWXaUgYQAQM8dkk0bJSCJyQKUGhSxv/KIPhJ9SJbtGej/v82ssuEN4NBs8YJxakCvy7hZVg9S6xwleso4KOn30fAknUqtRJHt9cxsi2HdEd9kVtCeDI0en7IHJnaIluH7g0klYAFUwrppMnfrMtQoGqk3qr0rznCegQ== 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=BkLjCwEiIcsLzZ01SGw63fD6PLofHotLNlya3PNtKZU=; b=UANHtlF6RQ93q9jJXTOjxW1sr7tOCNZ27eTkJuKcFI0cibWYmF0KIHIVdbC/OMNKpIByDRaaRWDG0diAgfSMYZ++30mmEEi7pMMxoYZMt2Dxg7BYh/gN+vSX8YfPp9PO1PJG3FxEt78e0XdisC36jHuQfM74zkqrDOG9+wR4AdQx8s3uY8kzRhNjXHZFFOuG6VKs3OjLFiQgBDdGBBhv37AK6+X141Kx5uJCXK8JyEBFDYbrm/2IamGC+7fl98FAuKZ4IX9Mi44tyFIvshpYoksIy5Tbzjjq7CfDCG45dotcowq9ROmcGcVnVMl5YpHuT+X/KJ9AL3akxIxzqdGFag== 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 DBBPR09CA0013.eurprd09.prod.outlook.com (2603:10a6:10:c0::25) by PA4PR08MB6048.eurprd08.prod.outlook.com (2603:10a6:102:e6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Tue, 25 Jul 2023 10:31:26 +0000 X-Received: from DBAEUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::ec) by DBBPR09CA0013.outlook.office365.com (2603:10a6:10:c0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33 via Frontend Transport; Tue, 25 Jul 2023 10:31:26 +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 DBAEUR03FT016.mail.protection.outlook.com (100.127.142.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.29 via Frontend Transport; Tue, 25 Jul 2023 10:31:26 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 25 Jul 2023 10:31:07 +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; Tue, 25 Jul 2023 10:31:07 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH edk2-platforms v1 3/3] Platform/ARM: FVP: Add ETE device if supported by FVP Date: Tue, 25 Jul 2023 11:31:05 +0100 Message-ID: <20230725103105.8068-4-sami.mujawar@arm.com> In-Reply-To: <20230725103105.8068-1-sami.mujawar@arm.com> References: <20230725103105.8068-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT016:EE_|PA4PR08MB6048:EE_|AM7EUR03FT008:EE_|DB9PR08MB8627:EE_ X-MS-Office365-Filtering-Correlation-Id: 9712e129-fa18-4217-72ae-08db8cfa54f2 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: Sb8E4VxDIioevF3a7In7XAinyf4yY4ReFFY+jrJMuBLuDFvKR4X+qOJgCLfF5+xTMY0AdEhuWZ6bR9KbJSka6uxuIIseerhuo41JSEeVYtZUJN7GdJiKzsR/vPpGRmKS19spw4vL7WTXUwssnpNk5JhdmuZDZfL673WhSWdLPZcZdBVf0LwBY6JsIGa+4pVDsrJk3+o1WtxZbrtGmqO0mZGOXLoCnXHMEDS9ya0iLd/749dosc7TDFlaHasmpYfy6uSEXrko9bgo9Xz8XYHMZ4sd57yIS/jMru/N3gbhtYFslOqYjlGqligpPiISpaU52YEi9/gc6dZj+CWGN4NG+dYj5R8qo9maxi80bRf125DePODFH8dX2vK1XkaDjFyLVJSGTeL10ogwizrNYMizX+x9PvhR6fNCLiBwag6U3h/TpiBXr09F5eB1ojH/MXVvu7nSvIAXLlX1/UeVE8R9B55M29n4urVXtCfe4VyTGqpPEy7+V8e4+zSIVpzyI34Rh4b8jXQQuea0TJ7+Bdb+6UL7r1bA4GpjkVPQZwt/UMyCpc57fF09T8Nt9WHydM5QpRRJtN9tHyVLD/OtbLtz+tyRNU66f4b87h0ggu/xMuU8GypEMNbV4XtaOefUmcSZA02m6dWH7GmceS8r9d6ZmzwEx7A47ifx8VBC7bsWDTBeexWyh+Fx82Lhzor1JyNJTcIB8z+oFuLYi/tTfwuSC/OCXze58m9JTRXDS1Z7QJ5frufdSLg87vR332ZjEIILWW5WDzXBzeMDweuimfWZxg== 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:(13230028)(4636009)(39860400002)(346002)(376002)(396003)(136003)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(1076003)(26005)(186003)(40460700003)(336012)(5660300002)(44832011)(36756003)(36860700001)(8676002)(8936002)(81166007)(2906002)(356005)(2616005)(426003)(47076005)(82740400003)(86362001)(40480700001)(6916009)(4326008)(316002)(70206006)(70586007)(478600001)(7696005)(41300700001)(54906003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6048 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d4bc5e9f-80ef-4b3e-4e4c-08db8cfa4cdb X-Microsoft-Antispam-Message-Info: jKvZZerw0eLxA2fBsx9wuOc0dstCybQ4vn6uWX6quJHN62oPwVUIkUNp77Cu/abtbcDmRkpObywC/CUpdYY69lkuaOWNcsTvPfjSzGQaIsgnVr7vbrGLGlb33l+sOBBJLm1uXLGzrskL+JeARef0f4BjAdIe8rndOI6WNbkVUYBDha3kXYaZ3QyeFEc45JeHIdgV5eg87FMh3CTNv1qHWVmDH53Meowoy4DvapxO8rdHhoBGelypXv+ECDbYTXaTMvIapqHCNOdT4NUrcli1INWhSf8mp6asJX1hdzsbQ2XmG0zgyBbWqecCsFxXwfukf3YZJOf6Y8yGQC+eQ0rN4hQFjVF/RFSLdiF25+T65PZYDxvUPQrUxghR/LR6koS5TIuNuW7w//XrDH1ULQjbj5J0Vv216/p4WzldOmpY7KO0j6CSdZrueDUkFakDi0FP4u9KLbnqvkOReISaTrQeCL+D4e2R4sVJgTFq22VcCp4hNSo0cHwMzvjb82uRee+zlAVmWK5SQQBi54MF1Fh6H22VjuZY975o/AlCHwGecLwgvAO45ghK0+vud5GwnXE4940d4Swq1vf+oXp5PfJ56jWlCG+hBSbmY72pXsXb7uSVJgK8tjSEA4SgSdiKGvXMY2rseoZ/5ipSC1aUHEZFjMFm8o0dRmIpgwcL7jk/EYEWxMQSa2nAj5vQUxA8yGgPKO/dXCmVu0O0bQ1vr11DysZ1tIg08ugv9jVKnjtkOWraHGTVcRxkMlKX4Vnbj78u X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2023 10:31:39.7320 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9712e129-fa18-4217-72ae-08db8cfa54f2 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: AM7EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8627 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: UeOejexpylD7ADyZ4Ue8nlI0x7686176AA= Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="bJ/fK6Nt"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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=0 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=1 -C cluster1.has_trbe=1 3. Set the ETE plugin for the model --plugin \libete-plugin.[so|dll] Signed-off-by: Sami Mujawar --- Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 25 ++++++++++++++++++++ Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 03393905be1c627b7cdbaa0efed33e920072c8cb..86d5bbdb6219294d41b4ac314cc01139f975dc48 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -366,6 +366,11 @@ EDKII_PLATFORM_REPOSITORY_INFO VExpressPlatRepositoryInfo = { FixedPcdGet32 (PcdPciBusMin), FixedPcdGet32 (PcdPciBusMax) }, + + // Embedded Trace device info + { + ArmEtTypeEte + } }; /** A helper function for returning the Configuration Manager Objects. @@ -478,6 +483,7 @@ InitializePlatformRepository ( UINT64 DbgFeatures; UINTN Index; UINT16 TrbeInterrupt; + CM_OBJECT_TOKEN EtToken; PlatformRepo = This->PlatRepoInfo; @@ -497,6 +503,7 @@ InitializePlatformRepository ( } TrbeInterrupt = 0; + EtToken = CM_NULL_TOKEN; DbgFeatures = ArmReadIdAA64Dfr0 (); DEBUG (( DEBUG_INFO, @@ -510,8 +517,14 @@ InitializePlatformRepository ( TrbeInterrupt = 31; } + // The ID_AA64DFR0_EL1.TraceVer field identifies the presence of FEAT_ETE. + if (((DbgFeatures >> 4) & 0xF) != 0) { + EtToken = (CM_OBJECT_TOKEN)&PlatformRepo->EtInfo; + } + for (Index = 0; Index < PLAT_CPU_COUNT; Index++) { PlatformRepo->GicCInfo[Index].TrbeInterrupt = TrbeInterrupt; + PlatformRepo->GicCInfo[Index].EtToken = EtToken; } return EFI_SUCCESS; @@ -983,6 +996,18 @@ GetArmNameSpaceObject ( ); break; + case EArmObjEtInfo: + if (Token == (CM_OBJECT_TOKEN)&PlatformRepo->EtInfo) { + Status = HandleCmObject ( + CmObjectId, + &PlatformRepo->EtInfo, + sizeof (PlatformRepo->EtInfo), + 1, + CmObject + ); + } + break; + default: { Status = EFI_NOT_FOUND; DEBUG (( diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index 1b52c2ebc7efb633c748f7316606e3dbe4e0b21c..be2b512911f897dc57328673ae4f4a2014ec20fb 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; + CM_ARM_ET_INFO EtInfo; + /// System ID UINT32 SysId; } EDKII_PLATFORM_REPOSITORY_INFO; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107243): https://edk2.groups.io/g/devel/message/107243 Mute This Topic: https://groups.io/mt/100347411/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-