From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.51]) by mx.groups.io with SMTP id smtpd.web09.5831.1608116781368893090 for ; Wed, 16 Dec 2020 03:06:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ZNg9n0WB; spf=pass (domain: arm.com, ip: 40.107.8.51, 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=XGIEJJ2KIHcr9acAZtIjqmPNsNychQtifyaoZX/4p4E=; b=ZNg9n0WBdGm3xt4vUSyiWduwy0sRJ5qfkwPoyLcjiPXlgJcfDuNm2DvWAQbU4m/ZWaiSDiPFjiZj5f7KQLcqnUfMF6hvcR0511XJZLMqNO6DkQf8OayHQ1yZRPw55NHbzUyEndrA0Tddv6end23pwoZmXwpfETUGDhN9w+LtLQA= Received: from AM6PR01CA0044.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::21) by VI1PR0801MB2111.eurprd08.prod.outlook.com (2603:10a6:800:8d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.17; Wed, 16 Dec 2020 11:06:16 +0000 Received: from VE1EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::75) by AM6PR01CA0044.outlook.office365.com (2603:10a6:20b:e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 16 Dec 2020 11:06: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=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 VE1EUR03FT007.mail.protection.outlook.com (10.152.18.114) 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:06:16 +0000 Received: ("Tessian outbound 665ba7fbdfd9:v71"); Wed, 16 Dec 2020 11:06:15 +0000 X-CR-MTA-TID: 64aa7808 Received: from b0f1e5df866f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 85CF967C-8EF1-4CFB-91AF-AB611BE8D62E.1; Wed, 16 Dec 2020 11:06:10 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b0f1e5df866f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 16 Dec 2020 11:06:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y7Gt0pgK/QdJ57j4oi16UQ5LVYmg+25Sp7kR3PXoy99/lm4xbZpOWft2dxAPW2tJl36tZsbpQrveSyMG+JCqk0vngPp7AwWYKpaLLTSf9t+IPfYlWyhKV5N1CzI1XIFoSrsElFVoqXVYheZ36lahqbGLb7ovPuIJvIcqAChY0/WjS/gsX756jX9DzUQrhZuUEuCGxmgY70F2NfJ/+d8zNdUeD0ZKH17zi7IvxIVDxjMW9ppJk/w/YkV4fHfB2Fi7DXp+RQ5SW7ptAU5H8UUNT1l3c40FT1zz93PUL57Vq7l/6FGCxGF1nDag0pMMDH/mjuOWDD9pYmTWMrAW+DxmRA== 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=XGIEJJ2KIHcr9acAZtIjqmPNsNychQtifyaoZX/4p4E=; b=N+8tbuLDt+e6LRWQrWQ7yr57NCandcpDEumcM3muKGsW6Kvu4L+zIQ/o/Jc6ScG0z+6C094QBUzFt4wVPv/SffcB5s+Ig5KM1pvfaEewC34eXrHWLa4kuyjJXvcmdRcVqf1/0WP4ygtm6snArZF3CD7FDHill/gddZcbWgeUaQKVlJePls8Ek0Gif3t5d8EqmXz8PSb3VjnNWhMcbvixT5gyNxCPsKffE/wBxJXhrAp4/Y5nu8f/couJZ5irLxKQcOaI4FPdfGgGRQ+ux8QqbX65F/ThoqcQ6MhSrECuGqySw2U0o1nIqBSOjZCVOtePAdmm5ptvWzmXjq1AkC6tmA== 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=XGIEJJ2KIHcr9acAZtIjqmPNsNychQtifyaoZX/4p4E=; b=ZNg9n0WBdGm3xt4vUSyiWduwy0sRJ5qfkwPoyLcjiPXlgJcfDuNm2DvWAQbU4m/ZWaiSDiPFjiZj5f7KQLcqnUfMF6hvcR0511XJZLMqNO6DkQf8OayHQ1yZRPw55NHbzUyEndrA0Tddv6end23pwoZmXwpfETUGDhN9w+LtLQA= Received: from DB7PR08MB3097.eurprd08.prod.outlook.com (2603:10a6:5:1d::27) by DBBPR08MB6217.eurprd08.prod.outlook.com (2603:10a6:10:201::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.19; Wed, 16 Dec 2020 11:06:10 +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:06:10 +0000 From: "Sami Mujawar" To: Rebecca Cran , "devel@edk2.groups.io" CC: Michael D Kinney , Liming Gao , Zhiguang Liu , Leif Lindholm , Ard Biesheuvel , nd Subject: Re: [PATCH v4 06/11] ArmPkg: Add helper to read CCIDX status Thread-Topic: [PATCH v4 06/11] ArmPkg: Add helper to read CCIDX status Thread-Index: AQHWx3nWQ9UI73QCGEqct6KgUDIlS6n5lPEQ Date: Wed, 16 Dec 2020 11:06:10 +0000 Message-ID: References: <20201201003358.8780-1-rebecca@nuviainc.com> <20201201003358.8780-7-rebecca@nuviainc.com> In-Reply-To: <20201201003358.8780-7-rebecca@nuviainc.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 05BBDA75181D604B9934616CE8B9774E.0 x-checkrecipientchecked: true Authentication-Results-Original: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; 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: c14a9d5f-89f6-4c9d-bc2b-08d8a1b29be5 x-ms-traffictypediagnostic: DBBPR08MB6217:|VI1PR0801MB2111: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:983;OLM:983; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YEhyqNk3reWhb5gWfBG4lmiWVk+7hEVsKOxgibPtLkH2G9+S6ECHUvM25lmS8wBiCpGl3AVWma5SIG3OWAgfhSlKrBOZ2wrwe/267ml0KSLvCbh09ErK2HnoZ0pjuo/u/w9GtNO09eN5dROotuX0M4pJ9O5huyAZB51n0YgMPM4u6OZjhc11sRZoiKBNAlWLXPNFYmQkS6TPXRg5nJofLENRKlCrvhvIiAygN0DIApoGjewfVzXQMgYqLxP6cJCbtixTL8CYUFfttNiif9wzTb09+LWtiCeIY/KEcr7tLj3DRDr0TH5+hywTkBr2jYwq 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)(346002)(376002)(396003)(136003)(39860400002)(366004)(316002)(66556008)(8676002)(110136005)(6506007)(64756008)(2906002)(19627235002)(86362001)(8936002)(54906003)(66946007)(186003)(55016002)(83380400001)(52536014)(5660300002)(71200400001)(66476007)(33656002)(4326008)(53546011)(478600001)(9686003)(66446008)(76116006)(7696005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?T79kE5dp4rPZNg2yPt6tATeAE8Uw2S36q0I0fcg/5UgjW3KWSaL8r+KbsEgB?= =?us-ascii?Q?dPJ7IibjAofelmBA1CNJStp0JLn/SjMTdmWOY7c4Lzg8K8TiIokW9td8ey3I?= =?us-ascii?Q?8HyE0O6PWS42l2qgvul24HJx5tZBGMASTKIV2nEbntFOaZU87cXxDhPgpCRk?= =?us-ascii?Q?IDiafACpqHZsITJwWiPo0T/godx7To/86pjGHWHbp+ONUOsGnTe5EtVnCsM3?= =?us-ascii?Q?wQuXOOqmgBRfq673UeDTItMAJTawrg2xc5KAP42ob6QVSU/qc9JQfJ8wmVW6?= =?us-ascii?Q?6Ho+GBXkGv4Ka/0ActZ2N72nPPN1r30h/PW0HPZnA7Fazu0lTb2hDcRrILbW?= =?us-ascii?Q?9g4LqaKX6FcjKEWdVDB42UjnNxLuYtvrD8uH1YlQ0JVF6o640eF4rkPHRaZt?= =?us-ascii?Q?zp3KCkycl2Ztqg7NwGbTCtZC9jU5hIKVCfKKlbBu8Mxk1uEu7QayZw6LHKTP?= =?us-ascii?Q?Ajvf+1gqHa+kWBp42+nVnzGtNaIq8sTxL8LDv0Mwv7CaCjVbBCDk+kSV1mxA?= =?us-ascii?Q?NBTYh+wcrBRovTrbDUS7jDZgqRlCWHBoSXq3WSLCg7XmfbDFPDsLKh+j/bv4?= =?us-ascii?Q?Q6liKTmCvQmjVmOX4hJsdpTmSRtY+JBY9CczMIePXCxvWJnyiAkMxvN3cQDo?= =?us-ascii?Q?gbooTIBm9MxqTpe+AyBGFyYLjbzS0mQnLL8gSIeyxHU2BhPbdZC8q+hIE/Ju?= =?us-ascii?Q?FiOqxo5lqRemI/W5Pa4wn3ETrxsRredGw+zSqC8bFqK3TxVZUDeYgO8i6dfs?= =?us-ascii?Q?U6RQD/y2BRLA95VVNOEVyAXMKbn5y/k6W+6aa4G/SVnFyuhId6lt58qmRvHU?= =?us-ascii?Q?PHDkiKQSBNYzIiyJC8vfx6caRNto47qSaK54CkhLf7uUc8ZPYoJjkGn+X+rc?= =?us-ascii?Q?c6LRFBF4e95lI3vKag+OCU6tfUXTv45LvKhavnPlNvOIuySSSiJrJ1KVEd73?= =?us-ascii?Q?ksvQ1PXas2zzPv+0lmF420GGK3vNrlZTW9Asr2qvboKr2MptJjMd//LOlR8U?= =?us-ascii?Q?73kSZmHnmLfzoC6DIBD801NY4pAlAHeJTdBZAkwH5hbVo5k=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6217 Original-Authentication-Results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 50f5eb70-148e-4f35-b90f-08d8a1b29849 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fZy+GkC8yPfQWmS3Du1+KAXt3IZdaELLt3EzqOj7SPrH/L/nSxCcnzQeci9byOWqztu+wgG4i2ZDlBaowcp5wZSpfhhGV3yDnVUYLhVHGplbn9TkjjPcu9Su7feQmW1MBiTbOwi9LDP/eoS5X5kph2T5JkxsoLmZleCu+Uke3B7ZTbYV3UPbLhR3+Ff/VQ3Hu9fJ+zK09lpaYus9GUYygY6dXF7qvR2yx5kQViJOFjcaaOGq4oRo8HMpYxpBqYL67eA8cWvCejnOtXGPNa75WHIXpJbH7jsmpvpTNLumCAbBcEtbvTNWE6aITuCVaYkmLFaXseZfGtb9J7NmUJPQJwiJZJlq4yQxpfFIugW6iejKS8E0NESukbcmGCSelSGEhxME6gZZVat7KxLl+W+lvA== 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)(346002)(376002)(39860400002)(396003)(136003)(46966005)(47076004)(82740400003)(82310400003)(9686003)(86362001)(336012)(8936002)(4326008)(6506007)(55016002)(83380400001)(26005)(53546011)(186003)(33656002)(110136005)(2906002)(70586007)(356005)(70206006)(81166007)(7696005)(19627235002)(52536014)(5660300002)(54906003)(8676002)(316002)(478600001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2020 11:06:16.3370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c14a9d5f-89f6-4c9d-bc2b-08d8a1b29be5 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: VE1EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2111 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: Rebecca Cran =20 Sent: 01 December 2020 12:34 AM To: devel@edk2.groups.io Cc: Rebecca Cran ; Michael D Kinney ; Liming Gao ; Zhiguang Liu ; Leif Lindholm ; Ard Biesheuvel ; Sami Mujawar Subject: [PATCH v4 06/11] ArmPkg: Add helper to read CCIDX status 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/ArmLi= b.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/Ar= mLib/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/A= rm/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