mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
ArmPkg: Add helper to read CCIDX status
Add a helper function to determine CCIDX support. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
This commit is contained in:
parent
4f92cfa44d
commit
6e131aff00
@ -725,6 +725,17 @@ ArmHasGicSystemRegisters (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** Checks if CCIDX is implemented.
|
||||
|
||||
@retval TRUE CCIDX is implemented.
|
||||
@retval FALSE CCIDX is not implemented.
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArmHasCcidx (
|
||||
VOID
|
||||
);
|
||||
|
||||
#ifdef MDE_CPU_ARM
|
||||
///
|
||||
/// AArch32-only ID Register Helper functions
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
|
||||
Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
@ -87,3 +87,20 @@ ArmHasGicSystemRegisters (
|
||||
{
|
||||
return ((ArmReadIdAA64Pfr0 () & AARCH64_PFR0_GIC) != 0);
|
||||
}
|
||||
|
||||
/** Checks if CCIDX is implemented.
|
||||
|
||||
@retval TRUE CCIDX is implemented.
|
||||
@retval FALSE CCIDX is not implemented.
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArmHasCcidx (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINTN Mmfr2;
|
||||
|
||||
Mmfr2 = ArmReadIdAA64Mmfr2 ();
|
||||
return (((Mmfr2 >> 20) & 0xF) == 1) ? TRUE : FALSE;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
|
||||
Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
@ -102,3 +102,20 @@ ArmHasSecurityExtensions (
|
||||
{
|
||||
return ((ArmReadIdPfr1 () & ARM_PFR1_SEC) != 0);
|
||||
}
|
||||
|
||||
/** Checks if CCIDX is implemented.
|
||||
|
||||
@retval TRUE CCIDX is implemented.
|
||||
@retval FALSE CCIDX is not implemented.
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArmHasCcidx (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINTN Mmfr4;
|
||||
|
||||
Mmfr4 = ArmReadIdMmfr4 ();
|
||||
return (((Mmfr4 >> 24) & 0xF) == 1) ? TRUE : FALSE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user