From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.75]) by mx.groups.io with SMTP id smtpd.web11.5873.1608117847763966607 for ; Wed, 16 Dec 2020 03:24:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=H6AqZS6N; spf=pass (domain: arm.com, ip: 40.107.15.75, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6XPCppsPy4SMiZmV8ymM3C7rndsP8N6Cu6OvLTmCCcc=; b=H6AqZS6NbfO0tgXSzrMFCvGBN7rmw3dcgPAhjKocIxLXkazgQAkz5AWWysr5gNmjoPl/QnptPgFXDk8CHR4Bg9afzPuVaCsdoYvPxA+MgAv5iK4DL+zCBGGwjLlezSbSxYa3SEWY5rhmp8wfaxKcqbsix/p8XoibKv1iULurx94= Received: from MR2P264CA0002.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:1::14) by AM6PR08MB4675.eurprd08.prod.outlook.com (2603:10a6:20b:c2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.13; Wed, 16 Dec 2020 11:24:04 +0000 Received: from VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:1:cafe::47) by MR2P264CA0002.outlook.office365.com (2603:10a6:500:1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.17 via Frontend Transport; Wed, 16 Dec 2020 11:24:04 +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=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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT037.mail.protection.outlook.com (10.152.19.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.22 via Frontend Transport; Wed, 16 Dec 2020 11:24:04 +0000 Received: ("Tessian outbound 665ba7fbdfd9:v71"); Wed, 16 Dec 2020 11:24:03 +0000 X-CR-MTA-TID: 64aa7808 Received: from c34e12da9a81.4 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0F1F776C-A6D4-47E3-AD8E-B63AA337DEC7.1; Wed, 16 Dec 2020 11:23:58 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c34e12da9a81.4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 16 Dec 2020 11:23:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QHB5FayUj//rOQkq/XUBx+NlNV5iAr1kTAyPtVU2/2y1wdeqtEHj7JsLozPfc0+dmcgz4ZO+epZpLaq87ea2aNUP/Uv61Ag0qJNqcZdO5IRXtWkjKQGneUzS5M6I5/PdC/Hb92XXgo9hPWjmhZgbL+Utc/SQUaLdjZ8x8OKRSN9hL8WFHpVyRu6q45nw6zsfjYpRdkIHrlnZCtsbkZlcFvImSEzswKgqFOcKQqphf/YCLcTXyjqRX/r30BawY5SPKuuvjaQ/3mrMaUxWDZnFbivDl3WIoQK0X6x3QkT1WCdVR682yAvtI7xOP6bbsR+dw+zKoGpXjxyud3AXkzWCzg== 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=6XPCppsPy4SMiZmV8ymM3C7rndsP8N6Cu6OvLTmCCcc=; b=K4ygToe8DjDBhoxDjHQq09+o/8HOpMd80fBaS2f/bPAJ7P0lHm2rORysyebUuiYcQu4KowGHjvyf3rH2p4rU8u7ojSPZB/npYkkiOyJUctYySx1VG/yvy+vNPHU8hXVAU8lwLCXXS7CXGFWN12/fUNYOYLnzCKFuowAXw5MSVa0SiSApyT2SPNhb8ExNfP04Bkqmq5P/Pw4cxE/PP+62SyENMecOI5SNBAOw8ij38Vk6zj+/7VsPn++Hqa1saYMI7Z4GLkZUYJuMEpa2jUjGU7PgI9/MdrHbMBCw+kyWAfHgaDWufjJuR2HkEkblyoVTFeV0DUnbFETgdnQAQN8t7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6XPCppsPy4SMiZmV8ymM3C7rndsP8N6Cu6OvLTmCCcc=; b=H6AqZS6NbfO0tgXSzrMFCvGBN7rmw3dcgPAhjKocIxLXkazgQAkz5AWWysr5gNmjoPl/QnptPgFXDk8CHR4Bg9afzPuVaCsdoYvPxA+MgAv5iK4DL+zCBGGwjLlezSbSxYa3SEWY5rhmp8wfaxKcqbsix/p8XoibKv1iULurx94= Received: from DB7PR08MB3097.eurprd08.prod.outlook.com (2603:10a6:5:1d::27) by DB8PR08MB4076.eurprd08.prod.outlook.com (2603:10a6:10:b0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.14; Wed, 16 Dec 2020 11:23:56 +0000 Received: from DB7PR08MB3097.eurprd08.prod.outlook.com ([fe80::315c:f6c3:2600:bd39]) by DB7PR08MB3097.eurprd08.prod.outlook.com ([fe80::315c:f6c3:2600:bd39%6]) with mapi id 15.20.3654.025; Wed, 16 Dec 2020 11:23:56 +0000 From: "Sami Mujawar" To: "devel@edk2.groups.io" , "rebecca@nuviainc.com" CC: Michael D Kinney , Liming Gao , Zhiguang Liu , Leif Lindholm , Ard Biesheuvel , nd Subject: Re: [edk2-devel] [PATCH v4 06/10] ArmPkg: Add helper to read CCIDX status Thread-Topic: [edk2-devel] [PATCH v4 06/10] ArmPkg: Add helper to read CCIDX status Thread-Index: AQHWzMK4383wa42AQ0Wf5BRjjXulEKn5oFOQ Date: Wed, 16 Dec 2020 11:23:55 +0000 Message-ID: References: <20201207175427.28712-1-rebecca@nuviainc.com> <20201207175427.28712-7-rebecca@nuviainc.com> In-Reply-To: <20201207175427.28712-7-rebecca@nuviainc.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 7CF0DFAE123A7741B4A311AA817ADB72.2 x-checkrecipientchecked: true Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; x-originating-ip: [2a00:23c6:548a:4800:ac83:fe43:cf2a:e70f] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f3327aa9-1a37-49d4-69f7-08d8a1b51870 x-ms-traffictypediagnostic: DB8PR08MB4076:|AM6PR08MB4675: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:949;OLM:949; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YQ0ReFwEB3DCezDzmPE/iFRy/Txg3QXQ3PxUXM8X+GiecQyrn3dlbTM6vhv98OVscCvHkahadSR0EqDMbETnolMOtxRCrmj8nQB3gaaSYKFXXc2phg6tNBLON0oEH1/gdul+zTBf0VZfEEH8cCOr/8z3XwW8PjfF/3w9qe719Y8SdrBUm6+tOakzF7g/Kcz62R3ojvAVV+wuk3tIktJnV83b1v8YMZ2lBWZOlHqES1/QeYI0DLtyTOFb932jJevuFJZfNgzTHjQ3uDxRDN6pJISdx44DlIkpu/2bZAPTLWQ7n6j5LCzLDqT444xSA3z6n08UpDX0hvCiE4koHaEsitRhHpdkpwImPCKNhZ9YUJxVK1Iwc53oKqbEGAnAvbKNt1g97ki/dwQOzeFUN6moAA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3097.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(346002)(376002)(39860400002)(366004)(136003)(316002)(71200400001)(33656002)(76116006)(66446008)(66946007)(19627235002)(478600001)(8936002)(5660300002)(66556008)(4326008)(110136005)(8676002)(52536014)(2906002)(64756008)(66476007)(6506007)(86362001)(9686003)(55016002)(53546011)(966005)(186003)(83380400001)(54906003)(7696005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?p1Oi2rOicMDV6qXSSddGxBNlKzyRtlvezP0p2+dIk6roAUgri+L6wzvlcaVa?= =?us-ascii?Q?93qxptZuObZaAWN+rR2KW00KCFcSSAqDwyLzcnlx39nbWAWrwLxgw/gQp92m?= =?us-ascii?Q?kkvjBT9yRw73mgQFERXUpnb+5exr3F3WsrVoWvMQWkpGI3zKJTgBZxzhZ+LC?= =?us-ascii?Q?k5MRy9qZDk/fs1WgW/IhMtcnIc4wNtm5VoP+ugCWPyM+pJK46CBMC+E5TMMC?= =?us-ascii?Q?RwDp3sW6sMop6rmw0rrEF+qOaeMEx2v5Jjz4Frm4IemA2dHf99fehfCjBAXU?= =?us-ascii?Q?8cSGnJJGIrnwGrbWC3XUWvmBOZedVSqq9HGzezqt8NnIYP7/v0PmYqR6OfjE?= =?us-ascii?Q?FNLoHyO8aMMA1xeMz8FxXOsl7TdJtkoeH38dGZCYKaKai9nxCnb2+phjK+0S?= =?us-ascii?Q?3jqxDQVXzhddSlzsU36HTJPXPG3wVq16VXsjMzlp9GCzP6KSbFmcnvhIT6Oo?= =?us-ascii?Q?j8gYZuoIqaR/ivGVwyQ/TVQj7zGmGH4xSlxxVG6jUrVwWry8bLCf6hqDDGq8?= =?us-ascii?Q?MI+ODTGtJUqMAsgpFATEs4u3Mwimt+o5gMDWfy/phGfmssoC80G+llJXQIFo?= =?us-ascii?Q?Iy9XiHalp2hqnb84Hi1vg4372gP7zDhgmKtKD5QiHoHd9AWMEivXycLnvtti?= =?us-ascii?Q?tjzbbhX7yd57q2kUeC7zqSJkSeS98HiCLjH/52ofR36mMWltMvwoUBEOdbcp?= =?us-ascii?Q?OwuaDx3wphgY2t6/er2WslXagyv0AwWjnBhfU1vVFw2kmnf0hzaj71WTPQsu?= =?us-ascii?Q?DsFxBzJ+2xsAsw781J1TilULtzwpI3qm8+wqD6+OoFjsVx/qRuYTEsfxtOXe?= =?us-ascii?Q?kH/Hwg+Tew2TK2sDBI2pTyV6tZMuVvhYCDQWYudiyta4cajOhsIg1QDyM/Q8?= =?us-ascii?Q?DSpLpvp4pnS9CdSF+y5KSvkQRF0BEZ70D7W5oKVujLm2Gec5QtVwfWHN73VU?= =?us-ascii?Q?Ta1RDLGT2oX1KfrhMpv+uihhLjyc5dAP47B5CxUMQ413KPIHcQ39HHU/39NV?= =?us-ascii?Q?EOfAdO3Vj8HCwhhzergjEf5Zw/dB5x0d7buifAgBbHcaQcA=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4076 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 860984cf-954a-4b97-3c0c-08d8a1b5137c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7ddPxj6jlTKyfPE0LubIIxcg1xmzgBPGoc6nm+mcxhT+PMYW/Z7TdH0qugNaVZ8kvjivLgaoauwmfgtTVmWjMwaW4fzxCAiQyANl5BurO8uo5KsikAdGF+U7oecvq+r/LILvtlHXOJ4qJgE7q7OG6MxNrc0KQlJVlKE6Uh1QdGAD9cHhqGdZNYJEwR4fh6uG3U8Ja3fKGcKc2Eu6fN++OmQgI7HOplRM6buUmu8iv0KXufaA3v+U1267WzkkXXsW2iAk33emgUa47OIxfGIw06dNtNHi39LrG4wt+cNRNaG5jWTr/vC1cDl/2EPWWAVepxrUNS9aM4s0DNGnKYayAAC0jPJ+XwHboN7CNVWYyEGvKwj75lOGoz+FrUCJuGaHA2JeMFJQaCX+X6SDfruyxhfH4sItEudRvV6oNcsz/k0LEJgxYrLUWvAh6gZRmg7bk+acmpltihZXQ+SLbcqUMg== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(39860400002)(136003)(346002)(396003)(376002)(46966005)(316002)(52536014)(70586007)(55016002)(81166007)(7696005)(6506007)(186003)(478600001)(2906002)(70206006)(5660300002)(110136005)(966005)(8676002)(53546011)(47076004)(54906003)(8936002)(82310400003)(26005)(83380400001)(19627235002)(356005)(86362001)(4326008)(33656002)(336012)(9686003)(82740400003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2020 11:24:04.2805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3327aa9-1a37-49d4-69f7-08d8a1b51870 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: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4675 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Rebecca, Please add doxygen function header for ArmIsCcidxImplemented(). With that added: Reviewed-by: Sami Mujawar Regards, Sami Mujawar -----Original Message----- From: devel@edk2.groups.io On Behalf Of Rebecca Cra= n via groups.io Sent: 07 December 2020 05:54 PM To: devel@edk2.groups.io Cc: Rebecca Cran ; Michael D Kinney ; Liming Gao ; Zhiguang Liu ; Leif Lindholm ; Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 06/10] ArmPkg: Add helper to read CCIDX st= atus Add a helper function to determine CCIDX support. Signed-off-by: Rebecca Cran --- ArmPkg/Include/Library/ArmLib.h | 6 ++++++ ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c | 12 ++++++++++++ ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmL= ib.h index 5a27b7c2fc27..87c3a6f1ecac 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -132,6 +132,12 @@ ArmIsArchTimerImplemented ( VOID ); =20 +BOOLEAN +EFIAPI +ArmIsCcidxImplemented ( + VOID + ); + UINTN EFIAPI ArmReadIdPfr0 ( diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c b/ArmPkg/Library/A= rmLib/AArch64/AArch64Lib.c index 3fbd591192e2..915c2cacdd99 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c @@ -71,3 +71,15 @@ ArmCleanDataCache ( ArmDataSynchronizationBarrier (); AArch64DataCacheOperation (ArmCleanDataCacheEntryBySetWay); } + +BOOLEAN +EFIAPI +ArmIsCcidxImplemented ( + VOID + ) +{ + UINTN Mmfr2; + + Mmfr2 =3D ArmReadIdMmfr2 (); + return (((Mmfr2 >> 20) & 0xF) =3D=3D 1) ? TRUE : FALSE; +} diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c b/ArmPkg/Library/ArmLib/= Arm/ArmV7Lib.c index 2c4a23e1a1b2..7331b1c678f3 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c @@ -71,3 +71,15 @@ ArmCleanDataCache ( ArmDataSynchronizationBarrier (); ArmV7DataCacheOperation (ArmCleanDataCacheEntryBySetWay); } + +BOOLEAN +EFIAPI +ArmIsCcidxImplemented ( + VOID + ) +{ + UINTN Mmfr4; + + Mmfr4 =3D ArmReadIdMmfr4 (); + return (((Mmfr4 >> 24) & 0xF) =3D=3D 1) ? TRUE : FALSE; +} --=20 2.26.2