public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Sami Mujawar <sami.mujawar@arm.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Rebecca Cran <rebecca@bsdio.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Edward Pickup <Edward.Pickup@arm.com>
Subject: [PATCH RESEND v1 3/7] ArmPkg/ArmLib: Add ArmReadIdIsaR5() helper
Date: Wed, 29 Jun 2022 21:13:51 +0200	[thread overview]
Message-ID: <20220629191355.2618844-4-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20220629191355.2618844-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

Add a ArmReadIdIsaR5() helper function to access the AArch32
ID_ISAR5 register.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
 ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S |  7 ++++++-
 ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h      | 11 +++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S
index 0856740e3290..bc2be5331c7d 100644
--- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S
@@ -1,7 +1,7 @@
 #------------------------------------------------------------------------------
 #
 # Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.
+# Copyright (c) 2011 - 2022, Arm Limited. All rights reserved.
 # Copyright (c) 2016, Linaro Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -167,4 +167,9 @@ ASM_FUNC (ArmGetPhysicalAddressBits)
   movge   r0, #40                 // 40 bits if LPAE
   bx      lr
 
+// UINTN ArmReadIdIsaR5(VOID)
+ASM_FUNC(ArmReadIdIsaR5)
+  mrc     p15, 0, r0, c0, c2, 5
+  bx      lr
+
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h
index 404ff92c4e06..1cfd6e5f65ac 100644
--- a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h
+++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h
@@ -1,6 +1,7 @@
 /** @file
 
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+  Copyright (c) 2022, Arm Ltd. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -66,4 +67,14 @@ ArmReadIdPfr1 (
   VOID
   );
 
+/** Reads the ID_ISAR5 register.
+
+   @return The contents of the ID_ISAR5 register.
+**/
+UINTN
+EFIAPI
+ArmReadIdIsaR5 (
+  VOID
+  );
+
 #endif // ARM_V7_LIB_H_
-- 
2.25.1


  parent reply	other threads:[~2022-06-29 19:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 19:13 [PATCH RESEND v1 0/7] Add AesLib and ArmAesLib PierreGondois
2022-06-29 19:13 ` [PATCH RESEND v1 1/7] ArmPkg: Update Armpkg.ci.yaml PierreGondois
2022-06-29 19:13 ` [PATCH RESEND v1 2/7] ArmPkg/ArmDisassemblerLib: Replace RotateRight() PierreGondois
2022-06-29 19:13 ` PierreGondois [this message]
2022-06-29 19:13 ` [PATCH RESEND v1 4/7] ArmPkg/ArmLib: Add ArmHasAesExt() PierreGondois
2022-06-29 19:13 ` [PATCH RESEND v1 5/7] MdePkg/AesLib: Definition for AES library class interface PierreGondois
2022-06-30  0:29   ` [edk2-devel] " Yao, Jiewen
2022-07-01  9:48     ` PierreGondois
2022-07-01 11:55       ` Yao, Jiewen
2022-07-01 13:58         ` PierreGondois
2022-07-01 14:40           ` Yao, Jiewen
2022-07-01 15:22             ` PierreGondois
2022-07-01 16:11               ` Yao, Jiewen
2022-07-04 13:16                 ` PierreGondois
2022-06-29 19:13 ` [PATCH RESEND v1 6/7] MdePkg/AesLib: Add NULL instance of AesLib PierreGondois
2022-06-29 19:13 ` [PATCH RESEND v1 7/7] ArmPkg/ArmAesLib: Add ArmAesLib PierreGondois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220629191355.2618844-4-Pierre.Gondois@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox