From: "Leif Lindholm" <leif@nuviainc.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: [PATCH 8/9] ArmPkg/ArmLib: rename AArch64 variant of ArmReadIdPfr0
Date: Fri, 18 Dec 2020 14:16:16 +0000 [thread overview]
Message-ID: <20201218141617.26947-9-leif@nuviainc.com> (raw)
In-Reply-To: <20201218141617.26947-1-leif@nuviainc.com>
ArmReadIdPfr0 is now used only inside ArmLib. Rename the AArch64
variant ArmReadIdAA64Pfr0 and add a declaration of that only into
local header AArch64/AArch64Lib.h.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 6 ++++++
ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c | 2 +-
ArmPkg/Library/ArmLib/AArch64/AArch64Support.S | 5 +++--
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h
index b2c8a8ea0b84..85bcecda730f 100644
--- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h
+++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h
@@ -2,6 +2,7 @@
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -35,5 +36,10 @@ ArmCleanInvalidateDataCacheEntryBySetWay (
IN UINTN SetWayFormat
);
+UINTN
+EFIAPI
+ArmReadIdAA64Pfr0 (
+ VOID
+ );
#endif // __AARCH64_LIB_H__
diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
index 5b10eb33c97d..53e593bc994b 100644
--- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
+++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
@@ -85,5 +85,5 @@ ArmHasGicSystemRegisters (
VOID
)
{
- return ((ArmReadIdPfr0 () & AARCH64_PFR0_GIC) != 0);
+ return ((ArmReadIdAA64Pfr0 () & AARCH64_PFR0_GIC) != 0);
}
diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
index 7f942c29ea66..129205d2ac27 100644
--- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
+++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
@@ -3,6 +3,7 @@
# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
# Copyright (c) 2011 - 2017, ARM Limited. All rights reserved.
# Copyright (c) 2016, Linaro Limited. All rights reserved.
+# Copyright (c) 2020, NUVIA Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -395,7 +396,7 @@ ASM_FUNC(ArmReadVBar)
ASM_FUNC(ArmEnableVFP)
// Check whether floating-point is implemented in the processor.
mov x1, x30 // Save LR
- bl ArmReadIdPfr0 // Read EL1 Processor Feature Register (PFR0)
+ bl ArmReadIdAA64Pfr0 // Read EL1 Processor Feature Register (PFR0)
mov x30, x1 // Restore LR
ubfx x0, x0, #16, #4 // Extract the FP bits 16:19
cmp x0, #0xF // Check if FP bits are '1111b',
@@ -448,7 +449,7 @@ ASM_FUNC(ArmIsArchTimerImplemented)
ret
-ASM_FUNC(ArmReadIdPfr0)
+ASM_FUNC(ArmReadIdAA64Pfr0)
mrs x0, id_aa64pfr0_el1 // Read ID_AA64PFR0 Register
ret
--
2.20.1
next prev parent reply other threads:[~2020-12-18 14:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 14:16 [PATCH 0/9] ArmPkg: Start cleaning up ID register handling Leif Lindholm
2020-12-18 14:16 ` [PATCH 1/9] ArmPkg/ArmLib: add ArmHasGicSystemRegisters () helper function Leif Lindholm
2020-12-18 14:16 ` [PATCH 2/9] ArmPkg: use ID register helper for ArmGicArch(Sec)Lib Leif Lindholm
2020-12-18 14:16 ` [PATCH 3/9] ArmPkg: remove duplicated ARM/AArch64 ArmGicArchLib sources Leif Lindholm
2020-12-18 14:16 ` [PATCH 4/9] ArmPkg: remove duplicated ARM/AArch64 ArmGicArchSecLib sources Leif Lindholm
2020-12-18 14:16 ` [PATCH 5/9] ArmPkg: add ArmHasSecurityExtensions () helper function Leif Lindholm
2020-12-18 14:16 ` [PATCH 6/9] ArmPkg: use helper to check for Security extensions in ArmArchTimerLib Leif Lindholm
2020-12-18 14:16 ` [PATCH 7/9] ArmPkg/ArmLib: delete AArch64 version of ArmReadIdPfr1 Leif Lindholm
2020-12-18 14:16 ` Leif Lindholm [this message]
2020-12-18 14:16 ` [PATCH 9/9] ArmPkg/ArmLib: move ArmReadIdPfr0/1 into private header ArmV7Lib.h Leif Lindholm
2020-12-18 15:02 ` [PATCH 0/9] ArmPkg: Start cleaning up ID register handling Ard Biesheuvel
2020-12-18 15:36 ` Leif Lindholm
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=20201218141617.26947-9-leif@nuviainc.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