From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.939.1608060246801340345 for ; Tue, 15 Dec 2020 11:24:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=2OwJdHZH; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id d26so7760368wrb.12 for ; Tue, 15 Dec 2020 11:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XY/eDTy0Oq6kp363zKTZi5uV4doS2c4ZtuLJzL3fsm4=; b=2OwJdHZH5GNttVZ9DNkQeeRqZQcUuZePiAWIH3ZhieTVBG/KNw8FcpumpxY5Qzx9dG 1M2lJsx/+ZsaGe/RPI7NFFQ3g2V0y2NfaPFUqIHE4HkXfPmKo+O0+aiUfORZjwa2AXaq LJztdiIzdALS5N5LThrz5I4tD00LJYbtxTXCitdYUOlWXBSjHgrhZuk1D5rmLw5My4PC O+VA4yqn2VkzWqdZGwzFaLobxMdgl9Ing0orLlLlv8x1AkmATII1aWpi7XMeaDgUg/fb gkJk0j5GXmBj32/lTc41mFUobqnr5AZjbkuyodN943GYQ6RlT8I0FbvDIoe1uj9IvqsF KsPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XY/eDTy0Oq6kp363zKTZi5uV4doS2c4ZtuLJzL3fsm4=; b=ME2bx00Ryvf7BYMcu3AAGfwrKFRe6QcfNHggYzroclzmClmBbDQCEiMxXYEJNOyVo2 K+2zS7llLQCTKWVgukleg6DzCRPV4pzoG8ulhKcb46ordOqhK6JVjumJv19x+y7tumb+ YMXqlLrhl4gG8UJFUm6ZLbA5J47TxEMj5njMxQetuAQNExFU5h387fCeW1nGiGrZdSkp 0z2cFPhEN4H34BaCKLFpcn+6t2Ox2DkjB5kwPBqbaBH8/2yx916xDtVJQh+h0vJS08Ze Bv8YfGhWw0Qlbc8vsILW29wx/1t8Gwx27dKuoeLA+72uETTdGMdqMIvuF+GbVs1xuhnp Abqw== X-Gm-Message-State: AOAM532XdVPzQiQwHZotB40rxkDxKFVYeFRPMRj78LNeKlrxNY2iIe8Z ykJ+plIYmQZGrfLu8Nm0P8C1eA== X-Google-Smtp-Source: ABdhPJxbnF56wkTM0exhK6L/R23jFBQr2BqL2NiiqMrdO8aibzvEW8fYFH178yaa5HpZvK363qkUwA== X-Received: by 2002:adf:e80d:: with SMTP id o13mr35464417wrm.293.1608060245287; Tue, 15 Dec 2020 11:24:05 -0800 (PST) Return-Path: Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id z3sm39204520wrn.59.2020.12.15.11.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 11:24:04 -0800 (PST) Date: Tue, 15 Dec 2020 19:24:03 +0000 From: "Leif Lindholm" To: Rebecca Cran Cc: devel@edk2.groups.io, Michael D Kinney , Liming Gao , Zhiguang Liu , Ard Biesheuvel Subject: Re: [PATCH v4 07/10] ArmPkg: Fix the return type of the ReadCCSIDR function Message-ID: <20201215192403.GE1664@vanye> References: <20201207175427.28712-1-rebecca@nuviainc.com> <20201207175427.28712-8-rebecca@nuviainc.com> MIME-Version: 1.0 In-Reply-To: <20201207175427.28712-8-rebecca@nuviainc.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 07, 2020 at 10:54:24 -0700, Rebecca Cran wrote: > 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 Reviewed-by: Leif Lindholm > --- > 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 > ); > > -UINT32 > +UINTN > ReadCCSIDR ( > IN UINT32 CSSELR > ); > diff --git a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupportV8.S b/ArmPkg/Library/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 > > > -// UINT32 > +// UINTN > // ReadCCSIDR ( > // IN UINT32 CSSELR > // ) > diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm b/ArmPkg/Library/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 > > -// UINT32 > +// UINTN > // ReadCCSIDR ( > // IN UINT32 CSSELR > // ) > -- > 2.26.2 >