From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.42]) by mx.groups.io with SMTP id smtpd.web11.5954.1608118334365007635 for ; Wed, 16 Dec 2020 03:32:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=9DDEkXj1; spf=pass (domain: arm.com, ip: 40.107.21.42, 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=xa7v1bkB/6F1o+Yp4jpLY91RXud8CyeurN9QNkxEyOU=; b=9DDEkXj1E51VpG2RlWDk248BFr/02ep10QiYlM/Yg66TGz2ZpjBnQ10Y1pdhTvmufvdMJKYJ5KtGHsGcxl9xUBMYmsGfd3AYhEb0TNDRHmWoUWG60kMdQdr8igLPWubgdWk8MiXkjmoxiGpiUgHhf1xhtstYHgumoi+VTMRn4GY= Received: from DB7PR05CA0017.eurprd05.prod.outlook.com (2603:10a6:10:36::30) by VI1PR08MB3248.eurprd08.prod.outlook.com (2603:10a6:803:4e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12; Wed, 16 Dec 2020 11:32:10 +0000 Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:36:cafe::ac) by DB7PR05CA0017.outlook.office365.com (2603:10a6:10:36::30) 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:32:10 +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 DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) 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:32:10 +0000 Received: ("Tessian outbound 76bd5a04122f:v71"); Wed, 16 Dec 2020 11:32:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 49eaa580281f0ac3 X-CR-MTA-TID: 64aa7808 Received: from d9d399b0227f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BE3EC93E-AB24-4E89-ACFA-74D3C120812E.1; Wed, 16 Dec 2020 11:32:04 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d9d399b0227f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 16 Dec 2020 11:32:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A2vfyCTghFmTcHr1O1qZwUpn6mvrsvJB99FA4R9dlD2LLtfT2ZvZtzV+hHr0zcBcp+cVEUOEGdRNRhoz8iFNEmKa0opsW8OZctfa6Pt03+3ZFEaw0mRCS4ZnSkdDjy5OxqIUEdwRzm+iV3xc0sYnQrylNYwAdJ8B6eh7waIiLdza5u2RDWu6fh9Ia9399s6UjOyRlIqYIt1CSYtXdObC1216gQjC03Hdrr08Gz7p5RHnv0N3fdmQwU/5xZd/JPxw0SWeMD1qbT6Doz/4wArfUOA7SGkyEVIf35LWvg00PuYbbXknjWLQjR1vr+V+yrunt12Oa6aF/+peTgkcEuIcDg== 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=xa7v1bkB/6F1o+Yp4jpLY91RXud8CyeurN9QNkxEyOU=; b=I5SoNMEiaSIF4NcvtooMW0qXDAYhMLMl28zooV03OE2UkRWRZrNws6FfzJ33nKMLDeuzc4nlhLdeXIvX6dwlvl26Y2lOiPuQpU+NxtF/tHpmq8eyxOzx3V6cL5e/MudzUbNJ1ddGQ7IRsLp9Vi2zh66qPxKofHEd9pPTgpXRFe8fU82mmSPRUzPkjsqZe7lJOMAibrV2/xicAreeFIrDN+uB9e8Yd/HY7PIF3iUHixNpf//PWCjg4g95xXzMHpxf5gFHbBRwSf50vhSGwLb4FXVdXowPez60fQxVe5EBghAYjS44LRxT9ZUQxDbAn60CAAe5jkkIeFebJILflJW2WA== 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=xa7v1bkB/6F1o+Yp4jpLY91RXud8CyeurN9QNkxEyOU=; b=9DDEkXj1E51VpG2RlWDk248BFr/02ep10QiYlM/Yg66TGz2ZpjBnQ10Y1pdhTvmufvdMJKYJ5KtGHsGcxl9xUBMYmsGfd3AYhEb0TNDRHmWoUWG60kMdQdr8igLPWubgdWk8MiXkjmoxiGpiUgHhf1xhtstYHgumoi+VTMRn4GY= Received: from DB7PR08MB3097.eurprd08.prod.outlook.com (2603:10a6:5:1d::27) by DB6PR0801MB2117.eurprd08.prod.outlook.com (2603:10a6:4:2e::23) 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:31:58 +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:31:58 +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 07/10] ArmPkg: Fix the return type of the ReadCCSIDR function Thread-Topic: [edk2-devel] [PATCH v4 07/10] ArmPkg: Fix the return type of the ReadCCSIDR function Thread-Index: AQHWzMLfxBKezMqStUeBJJvUxHZE06n5o+Vg Date: Wed, 16 Dec 2020 11:31:58 +0000 Message-ID: References: <20201207175427.28712-1-rebecca@nuviainc.com> <20201207175427.28712-8-rebecca@nuviainc.com> In-Reply-To: <20201207175427.28712-8-rebecca@nuviainc.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 2721C73171031246B522DF087A4F50A3.1 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: 6b977aa2-85d3-4694-9e75-08d8a1b639e4 x-ms-traffictypediagnostic: DB6PR0801MB2117:|VI1PR08MB3248: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: r3dTfe5cUeksSFYgjCgyye3QcGkGFOKfEisJAwpQwGvZtIEHNzqjfiRdJ+Ui4hpBDrjWYnYjx0XAOg4HKCOK5bweMwDspe7ZRYTBXbswPRf7XjQkbi0+hRhZ1Su8O4TZvAbYbUl0WVpjr4YMMtMpfS5mxolx2c+1pvsXevG8vN5wTBCYj5xXvyVT5GkmrDMYFQ0fNNIPSRkNwlNOuvXNG4eLnUFQuVR9u3lEA+FsXNZRRdyjN0y6tATA3xmXl9S96VUAkuOvg/kl+vBglghXrWRQ/ptFh3hCBVB+I/Z0ms/ByZvctopgCnBdzPGR0zqACDsedEAAKw1Gz9+8ZbehTYux3Ca+nMUGHGtiD1hXeUHgBrcdhA0OWN6QNf80RZ5UJ5Vo+XppQBbZDXVNGJ4GOQ== 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)(376002)(366004)(346002)(39860400002)(396003)(136003)(186003)(66476007)(66556008)(86362001)(4326008)(7696005)(110136005)(8676002)(76116006)(71200400001)(66446008)(9686003)(19627235002)(2906002)(66946007)(5660300002)(6506007)(64756008)(8936002)(83380400001)(966005)(54906003)(478600001)(316002)(55016002)(53546011)(52536014)(33656002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?7V3h/RPT7GCUiTrtTfqzlSJNqV8jHo2h+k09kDB/aBphQwb3w7sb7yP0yRSz?= =?us-ascii?Q?g0FlCq/LoJy7D9gr4+YG6/3F034Zllq1Mjlfub3TJnmsbsBwRklEkRLztATu?= =?us-ascii?Q?xMXEElNcar7Z/QE8L7yPOY+tVffbx2ymIAYB1N2UvAY2ktblXZ7MyZGnFSxk?= =?us-ascii?Q?M1z1NGe05k3mRyFghDNhrxjIncUbAkMUkjZIUJIuVLvJabWirrxDPTIDmzsW?= =?us-ascii?Q?s6CdsrM36mTdMAJayY94hk79U8tC+Y7mon79FtDvBkrLr9haIHDTLWnNVXge?= =?us-ascii?Q?glDqA8Ak3ddVnjoCuXGuCMnuiR7ld5HbycWy3pj+DjL5s1uLoY5Cpj+2643q?= =?us-ascii?Q?kW3zOfhTL8/v42BtLmnhhaGLxcS8vPuGwcDYIxPD9lHaigBQUxnCRuMXLXqa?= =?us-ascii?Q?TjKybGFth5M0tPDDeuf5wn03XcTjq2i+miicjqw159uovsbdqw6cQLbzs7eE?= =?us-ascii?Q?OkQaLqAfxl5fBoMc8zqhLpBb8nmiUfJAvDXPWOfwaOZ2Q8plngUcphm8sNES?= =?us-ascii?Q?2QBdoTCQev39DbCYN8xBgG0J0r5nPtdXpqclaXyOKizeWQG4Z1+sgMoAdEjp?= =?us-ascii?Q?GSM+qZ4P12sq4zB1G54WxR3PqWHaz4NZ1nghv60v5S7/8tlPupmktD0YCC59?= =?us-ascii?Q?p/z3RD+pOozMnCbwp1+EWXnbEX2rapDBwf1Elh6Clg1+LatnyNAqg87oCqZz?= =?us-ascii?Q?kg3oxnGMWmi3ArKpnGm7HSxeHAZMp0iauNeg4I0rx4kBBpl6j3E+iID/flgu?= =?us-ascii?Q?E76TKUc/v+8Pwv5USVytlaLuqQcI4oD67wSybV8xqMFf5JaWd7RV239GjEUS?= =?us-ascii?Q?/H/ZeX2RXN4SxFrCFu+v8YRx2tMmZbbbtLCzyaW34my4OcD+1M19ytKmoMls?= =?us-ascii?Q?/iQW7CELVPAAQFWNN26sWeaa2SF2YyrmOZOVEcAfRbsdyqWmmL4Enh6ZctVe?= =?us-ascii?Q?G4xgJeQ5fsmhQGOcm2Hx768rhPMMY3DoS5Di3Yz+fgyD5mJRS0YjdxK2Dxth?= =?us-ascii?Q?byYTxuGE281sGhF2asw2a2UBd0XP7Ho+CWGvO8pbTa3tnRg=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2117 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: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 63e8a51e-b191-45d4-8c0d-08d8a1b632fa X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5y4DWNF7vV4OiE81ZWQKUIQZ2QmnBdf34tKR22WQKMTVcoI7h27jEs0SkAsVHXfmqamAtQrG5AhRmcAF2LiVAfdH9oAl0wW0RY6LNqUra7/GGz6K0fEi3Vuhbi1pkOnqV4MUoBzFvlC4RYcn5yRe01zOcD4i7V5RSYlVsKU60o+GY7al60hW6qLmiR5VhgjQftSqoqCqTCmnufOCQpozM0twfXKf0sLO+3Pj0k4FBGKfL/hO6Kfeqa55wZ+gmirmQ1yA0eBy8f1RibV985bPNirJYXxQAgei7o3gJ9bmAdstU2omyy6YMzMmXrRFYYtG7er54Ac88dLfRlRlYfxQnXPdNt/HIsvncWTDC2oLqJuDXVcreTxjejVr5142ifkdiNJlCTZFdE8LJqsIKlChYTneQgGeX8oOff7pog5aFEgjqo8EB0bWj5pE+LlQaz+Uk6oa51T1ztzvgLaiW/U3dQ== 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)(396003)(136003)(376002)(346002)(39860400002)(46966005)(53546011)(356005)(82310400003)(5660300002)(478600001)(26005)(70206006)(86362001)(2906002)(47076004)(186003)(8676002)(54906003)(110136005)(82740400003)(9686003)(316002)(33656002)(55016002)(81166007)(70586007)(6506007)(966005)(8936002)(19627235002)(4326008)(7696005)(52536014)(336012)(83380400001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2020 11:32:10.0259 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b977aa2-85d3-4694-9e75-08d8a1b639e4 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: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3248 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Rebecca, Please add doxygen style documentation for the function ReadCCSIDR(). 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 07/10] ArmPkg: Fix the return type of the = ReadCCSIDR function When CCIDX is supported, the Current Cache Size ID Register contains data above 32 bits: namely the number of sets. Avoid truncating this by returning a UINTN instead of UINT32. On AARCH32, the expanded number of sets data can be read via the CCSIDR2 register. Signed-off-by: Rebecca Cran --- ArmPkg/Library/ArmLib/ArmLibPrivate.h | 2 +- ArmPkg/Library/ArmLib/AArch64/ArmLibSupportV8.S | 2 +- ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Library/ArmLib/ArmLibPrivate.h b/ArmPkg/Library/ArmLib= /ArmLibPrivate.h index 2e90739eb858..5eecbc0e1c43 100644 --- a/ArmPkg/Library/ArmLib/ArmLibPrivate.h +++ b/ArmPkg/Library/ArmLib/ArmLibPrivate.h @@ -61,7 +61,7 @@ CPSRRead ( VOID ); =20 -UINT32 +UINTN ReadCCSIDR ( IN UINT32 CSSELR ); diff --git a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupportV8.S b/ArmPkg/Libr= ary/ArmLib/AArch64/ArmLibSupportV8.S index 0e8d21e2264f..0ae75e4cb9f9 100644 --- a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupportV8.S +++ b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupportV8.S @@ -84,7 +84,7 @@ ASM_FUNC(ArmDisableAllExceptions) ret =20 =20 -// UINT32 +// UINTN // ReadCCSIDR ( // IN UINT32 CSSELR // ) diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm b/ArmPkg/Librar= y/ArmLib/Arm/ArmLibSupportV7.asm index 1679b09b797a..81f3cb79994c 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm @@ -68,7 +68,7 @@ mrc p15,0,r0,c0,c2,6 ; Read ID_MMFR4 Register bx LR =20 -// UINT32 +// UINTN // ReadCCSIDR ( // IN UINT32 CSSELR // ) --=20 2.26.2