From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH v5 10/23] ArmPkg: Add helper to read the CCSIDR2 register To: Rebecca Cran ,devel@edk2.groups.io From: "Sami Mujawar" X-Originating-Location: Cambridge, England, GB (86.174.119.44) X-Originating-Platform: Windows Firefox 84 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 06 Jan 2021 01:55:07 -0800 References: <20210104225830.12606-11-rebecca@nuviainc.com> In-Reply-To: <20210104225830.12606-11-rebecca@nuviainc.com> Message-ID: <25055.1609926907570358376@groups.io> Content-Type: multipart/alternative; boundary="IDkuJLlbfkltksdI26qI" --IDkuJLlbfkltksdI26qI Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Rebecca, On Mon, Jan 4, 2021 at 02:58 PM, Rebecca Cran wrote: >=20 > +// UINT32 > +// ReadCCSIDR2 ( > +// IN UINT32 CSSELR > +// ) > +ASM_FUNC(ReadCCSIDR2) > + mcr p15,2,r0,c0,c0,0 @ Write Cache Size Selection Register (CSSELR) > + isb > + mrc p15,1,r0,c0,c2,0 @ Read current CP15 Cache Size ID Register > (CCSIDR2) I believe the instruction encoding for CCSIDR2 should be mrc p15,1,r0,c0,c= 0,2 Similar change is needed in ArmLibSupportV7.asm >=20 > + bx lr > + Regards, Sami Mujawar --IDkuJLlbfkltksdI26qI Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Rebecca,

On Mon, Jan 4, 2021 at 02:58 PM, Rebecca Cran wrote:=
+// UINT32
+// ReadCCSIDR2 (
+// IN UINT32 CSSELR+// )
+ASM_FUNC(ReadCCSIDR2)
+ mcr p15,2,r0,c0,c0,0 @ Write Ca= che Size Selection Register (CSSELR)
+ isb
+ mrc p15,1,r0,c0,c2,0= @ Read current CP15 Cache Size ID Register (CCSIDR2)
I believe the instruction encoding for CCSIDR2 should be mrc p15,1,r0,c0,c= 0,2
Similar change is needed in ArmLibSupportV7.asm=
+ bx lr
+
Regards,

Sami Mujawar --IDkuJLlbfkltksdI26qI--