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 840DD74003C for ; Wed, 13 Sep 2023 12:53:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BtihbnmCN9BoXBgyHdqhV1r8NOWTRt/s6h3T0OguPSA=; 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=1694609593; v=1; b=gTVy2jEfnkJK1h6Z/4RVYGVL1zq2LT7GZAKSCbCe+SRVpHLV7bYH4k7LjbksUz2Ov9FajPHd we0ieQgzhjfhVyj/4spuSFO1hdWNgpaKZa7Rp8GfsdqIIfY3FIoQRZOX90KVxNZihBpLZr6/Q/L VYpfBH6WJotxH9BR4Y/uv2EM= X-Received: by 127.0.0.2 with SMTP id MPusYY7687511xzy2WFT7oIs; Wed, 13 Sep 2023 05:53:13 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.72]) by mx.groups.io with SMTP id smtpd.web11.11063.1694609591007152994 for ; Wed, 13 Sep 2023 05:53:11 -0700 X-Received: from DB9PR01CA0022.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::27) by DU0PR08MB7857.eurprd08.prod.outlook.com (2603:10a6:10:3b3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.35; Wed, 13 Sep 2023 12:53:05 +0000 X-Received: from DBAEUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d8:cafe::c4) by DB9PR01CA0022.outlook.office365.com (2603:10a6:10:1d8::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19 via Frontend Transport; Wed, 13 Sep 2023 12:53:05 +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 DBAEUR03FT012.mail.protection.outlook.com (100.127.142.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19 via Frontend Transport; Wed, 13 Sep 2023 12:53:04 +0000 X-Received: ("Tessian outbound b5a0f4347031:v175"); Wed, 13 Sep 2023 12:53:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6dc725a35ca384df X-CR-MTA-TID: 64aa7808 X-Received: from 12f536a45f02.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 43D196B5-6444-4F23-AED0-3405FE340C3F.1; Wed, 13 Sep 2023 12:52:53 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 12f536a45f02.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 13 Sep 2023 12:52:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NGAWvPwlRffQwTfafnu8zspIS9/CucJNQb9CFq8+1xCCXjpJexI7LyHjOGdRouw8tJ2gXiZh4OsN6vi/x7ZzbDzXTVXkiMSy1QC14knNfvbqhEE58gr64GLYUL6y4z7a/7VxX7+9sWjcm26b5SxsBsufobsi26U+qwcwu8uVw3SqNxiM7gNgBqOINjlC4pFM+HfN8j4azncx2KcGXDVX1dEfGqFxKx2ivaVc8YjGJUu/MY83XKskwH96xXZlK0k2a3i1wceyjUQn1snK2lguLDD9EeqUuPdY6g18blNumryJo8UhTo386lsFuF6X73OoLzWm67DR3HhRg5YuiTiF8w== 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=Av1PDNRna+5KTztJuLfpxtQDaHGukNN8k2vHVUdssTY=; b=RNtaIM5IeVCkEG4OEd3qLyzPMDTI/70aOGJyqk6uXIlWV8dIOXgeA7LKVJs7CtRG3MGxB2V1hoKwaGH6UUVc6ZdB+6zpNe2OTbtVNFIOeUwOeLc29MDzzBYOJUjaAbsRsE0PIFjy+IlT0al8mSWGu2rqQyxQ4+IRX1pwFqx9ivdSpUS/0poDQq1/AdieKmWjU88Wzb3CgRaT75tWXTgMXdJi/VThj86ujfGG7cO7y8uyUknxJwBeTnzdsV4vRTd2Mw9xG0umKfwkyK6h9y1Oh78D1T92EZQ47vTvFv97l/wmV86Fb2x57Rzj3KGLkEveWh0dh5kMs/90LuIFWmz5Fw== 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 DUZPR01CA0101.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::22) by DU0PR08MB7836.eurprd08.prod.outlook.com (2603:10a6:10:3b3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.36; Wed, 13 Sep 2023 12:52:50 +0000 X-Received: from DBAEUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4bb:cafe::cc) by DUZPR01CA0101.outlook.office365.com (2603:10a6:10:4bb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19 via Frontend Transport; Wed, 13 Sep 2023 12:52:50 +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 DBAEUR03FT035.mail.protection.outlook.com (100.127.142.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6792.19 via Frontend Transport; Wed, 13 Sep 2023 12:52:50 +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; Wed, 13 Sep 2023 12:52:49 +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; Wed, 13 Sep 2023 12:52:49 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [edk2-devel] [PATCH edk2-platforms v2 3/3] Platform/ARM: FVP: Add ETE device if supported by FVP Date: Wed, 13 Sep 2023 13:52:47 +0100 Message-ID: <20230913125247.34748-4-sami.mujawar@arm.com> In-Reply-To: <20230913125247.34748-1-sami.mujawar@arm.com> References: <20230913125247.34748-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT035:EE_|DU0PR08MB7836:EE_|DBAEUR03FT012:EE_|DU0PR08MB7857:EE_ X-MS-Office365-Filtering-Correlation-Id: e19ba31e-940c-4a6c-3734-08dbb4585f27 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: BU6xKgP9dw9gIwfrOm9QY7bClePHWhF5yfKOTDud6MrwQ5UO9NTM34KOlaIcfJ23x9a9BJNeflPOHleIFZRzWQxcfsLXE+chjf5eeocfk2C/2HZMMB1Q9NDE/2eP/HRtr6BqDz7bw6A8200+WjYFx3HTsjTAoiNRqyn6J3xlacRqWXCWF9AOjOIL9IoAw1zZlDvWZpD3mbggFw40j079PN3/1iv0lbtBDn9LvyfmGhDZS9NRQEY6xG8AHfu3iUvg3KMDqjYGMqCAbONJiT5qCrLY7MJK1kKv+ssuFgoa/fqNZBJk+h4r20IWblYFRE/+7/HVpEs/ihqRjdl0uJ18jhzbn3JxZhL7lgoyTYRYquBBvsJmL6oJJ1Kb6iRMVldGaD3SayeWXa0nbmt+vAJNcKXerwF0h7w3FWvyVHBPGsNPDbys9Fz7XKEWgf2bjDt/hLbIdPtSXLxnUhx3j83cUWElpG8KcqonimFADaPugQ8wIL043tsY9tVN//J9pPSvgoefFy9c6aOQt03Ko3ExALSbjTGmtEE8Bhsq49RnUiPUk+v1XyG4OFZWCWmjGsBUbHdRTdHhnqmXIFULwkBk4FxPL3MlfStVGKl2K5bWaXUvmsEhEhqsFW8zY+rUsIi7mCICecjMASlx/5OamD1e0J1MoztIw5mmyeBTKJVaZLuDw+FpObkWgCBLeqcMiLdJuAYKwxjB9QjSkfylX+5E63nVeWyhOT1ZKK66CNY2qt4PlfL1Gd9+8OH8CgO8gi0G 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)(376002)(136003)(346002)(39860400002)(396003)(1800799009)(82310400011)(186009)(451199024)(36840700001)(46966006)(356005)(82740400003)(81166007)(86362001)(36756003)(40480700001)(6916009)(2906002)(54906003)(5660300002)(8936002)(7696005)(4326008)(44832011)(8676002)(336012)(316002)(41300700001)(70586007)(70206006)(47076005)(478600001)(36860700001)(426003)(1076003)(26005)(2616005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7836 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6f321e9c-358d-4541-cbb8-08dbb45856c0 X-Microsoft-Antispam-Message-Info: gw/Dkj9bKclkx1enwfkVj2qTJcbCkoB8XKo/s01ucKbrcGfKdXGIwbc/D3FRMJ2mj+QFf5q1Ps8lMtxr6O7Zf/wQAGtwdXaAAmDoMVH31z+uodJ8AMOHHJglVW05nBY+mbWlPstcgSuIsJpsEGPLbTIZ6HaaeEjA9rU+Dw7oapraUzkbdVIS7Jz73NvlWZBsP9utfU3OLhF8IaxxIBQCOa4hARBzYwVPS7fHDKaYRtFZlsyRHwVLljnm20Hh1/qBahtN22vwlcB4L2oMVfIr5SmJKQyhpYlh2fD8eVfSPFRaaX61RCRCDjMsY2NBWZ/vpKreix1nGAw97KpPcxUhKyAedK9YZx5n5S3HBTkbQ8v4JYcHVB0rgKHCkTgqC82wFS5P43Yp4HWDLBFRxtgRHQj+zMGO5Awjw5r71PgZr/gLU/buDfseuv18/9GTThoqHYrTBjQrZcl97r7gh6NfaeYKNsbYvtcrKGBSQUPDuQV/wm47ItSr7i0uDpPIsxsoZ5zGfIfG+e9LHL44FyZhghNE4vh+ZvtaAxmOcR14gJ+S5Ee998Wa1LXL67Jmi59DIMKtkleqdtdZQW00v1Bv9ZzKdWRQiG+NUP+MifhWAwta92oD0H2xf1bOnktkGqlh6DRIsxPHydqz15XhuE4A/iMbCPyLXL3YgXdl4g8x/FEeps9f/D/57d9W6yMyS1P+/+xtIaw9Se1e3wOo6rAzWUFeFEocUKVWuX7V0NIDMEmELBvd0em7ET7BjyZgHU2w X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2023 12:53:04.9428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e19ba31e-940c-4a6c-3734-08dbb4585f27 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: DBAEUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7857 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: GgrUNurVCH3kojU9GJQroQuZx7686176AA= 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=gTVy2jEf; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") 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 --- Notes: v2: - No code change from v1 patch series. [SAMI] 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 221ccd44ca419edf030a0b37a6bbe64a1ab11273..b4855c6b6fdca0093744cad65cfabbb785a6c62c 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 (#108596): https://edk2.groups.io/g/devel/message/108596 Mute This Topic: https://groups.io/mt/101335888/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-