From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web11.12728.1610241982603530333 for ; Sat, 09 Jan 2021 17:26:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=chDXwtIn; spf=pass (domain: nuviainc.com, ip: 209.85.128.54, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f54.google.com with SMTP id k10so10781258wmi.3 for ; Sat, 09 Jan 2021 17:26:22 -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=Pzas83jddt2WryB4SJX8aI1iq359s8Um/PNbdHSnRMY=; b=chDXwtInlI8BT4aCK+8j4ObNkMqKT/ekUZgIuKJ5unMs8GSIG8u0o6gDgtzCbzOc5Y IzqJdDGgOPNM8U6vWiHDbW2MHeZTQ4hQ88r8+CjzDt8B+auwZEmRvkpk8owhyIjDY4bX IDULp9pRvNJxzk+9zh0QgePWrN7Mi2Ful3lg8OXat504A54ZOn3K4Ila0cxlX97Uajqc z5GetQQGB5HrxlVNDjq4RyMPtuPU2J+QgFVv/SnEy/DFFjTKVmlqDQdq7w4TSDafJC1c otbSYkE+vdBTaTWrk6nfUkkEWU0a+rXmppSC85q/9Wt+vz0pL8aD3FJ4DgDZkTZP7XQM +NpA== 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=Pzas83jddt2WryB4SJX8aI1iq359s8Um/PNbdHSnRMY=; b=lqP9t3oYHUUguIdSzANHK4MsQTCGbvIpHd4pBeIr05r+K/xnxQQiU+BhdhZbY6zNKN +5jVN89cjnEKwoHD3QJ/VyQYaPkK+JOtnGFUuoUNNQnyxLZMq6SqkqnYdYFa2a/e1IFc IkcJtJA+IlbwabLEv3CAuk66OcU1xe3FsYiTb5LHV25+G8Y8RvVzljHM3QkC8/SWgNyu rVlBvPTRNMdHmgGWGEczmZuRXycwdbo4gpQkaM6awSudrjTcDQYqS4LYWnI69MpioLeX 36mgW7Z9pOGECFi3yQM6ewO/lokhJhHn6iznXU/K8tNC1MPcv4TxLo0eMJ/xSfhgW5aB N55Q== X-Gm-Message-State: AOAM5327TSRle109nro8gCe9GmNydVU9lxhhI9wIJoXPaz2znLaVtG6w BI0C8bl+9M1MSOg+7FmQpZ+5og== X-Google-Smtp-Source: ABdhPJyEzEO5m1OoYFLixn9icVmo4ccIVWHbjiZJRv/t4xL4eCEiRR6KbI9DZxb/+MFzIJshgzjKlw== X-Received: by 2002:a1c:1bcd:: with SMTP id b196mr8913883wmb.70.1610241980988; Sat, 09 Jan 2021 17:26:20 -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 v20sm16899633wml.34.2021.01.09.17.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Jan 2021 17:26:20 -0800 (PST) Date: Sun, 10 Jan 2021 01:26:18 +0000 From: "Leif Lindholm" To: Rebecca Cran Cc: devel@edk2.groups.io, Ard Biesheuvel , "nd @ arm . com . Sami Mujawar" , Liming Gao , Michael D Kinney , Zhiguang Liu Subject: Re: [PATCH v5 05/23] ArmPkg: Add helper function to read the Memory Model Feature Register 4 Message-ID: <20210110012618.GZ1664@vanye> References: <20210104225830.12606-1-rebecca@nuviainc.com> <20210104225830.12606-6-rebecca@nuviainc.com> MIME-Version: 1.0 In-Reply-To: <20210104225830.12606-6-rebecca@nuviainc.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jan 04, 2021 at 15:58:12 -0700, Rebecca Cran wrote: > In AARCH32, CCIDX support is indicated in the MMFR4 register - unlike > under AARCH64 where it's in MMFR2. Add a helper function to read it. > > Signed-off-by: Rebecca Cran > Reviewed-by: Sami Mujawar Reviewed-by: Leif Lindholm However, and I say this as someone who usually tells people to split their patches up: this one could be squashed with the preceding two. > --- > ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h | 8 ++++++-- > ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S | 4 ++++ > ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm | 4 ++++ > 3 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h > index bb7bda0a3aeb..dcf6723b803b 100644 > --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h > +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h > @@ -48,9 +48,13 @@ ArmCleanInvalidateDataCacheEntryBySetWay ( > IN UINTN SetWayFormat > ); > > -UINTN > +/** Reads the ID_MMFR4 register. > + > + @return The contents of the ID_MMFR4 register. > +**/ > +UINT32 > EFIAPI > -ArmReadIdPfr0 ( > +ArmReadIdMmfr4 ( > VOID > ); > > diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S > index 01c91b10fcb7..a60a2f634132 100644 > --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S > +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S > @@ -60,6 +60,10 @@ ASM_FUNC(ArmDisableInterrupts) > isb > bx LR > > +ASM_FUNC(ArmReadIdMmfr4) > + mrc p15,0,r0,c0,c2,6 @ Read ID_MMFR4 Register > + bx lr > + > // UINT32 > // ReadCCSIDR ( > // IN UINT32 CSSELR > diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm > index 26ffa331b929..1679b09b797a 100644 > --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm > +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm > @@ -64,6 +64,10 @@ > isb > bx LR > > + RVCT_ASM_EXPORT ArmReadIdMmfr4 > + mrc p15,0,r0,c0,c2,6 ; Read ID_MMFR4 Register > + bx LR > + > // UINT32 > // ReadCCSIDR ( > // IN UINT32 CSSELR > -- > 2.26.2 >