* [PATCH] ArmPkg/Library: Add ArmReadSctlr for aarch64
@ 2016-07-29 23:11 Supreeth Venkatesh
0 siblings, 0 replies; 4+ messages in thread
From: Supreeth Venkatesh @ 2016-07-29 23:11 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, john.powell, ard.biesheuvel, Supreeth Venkatesh
One of the UEFI Self Certification tests (UEFI-SCT) need to read the
current exception level SCTLR Register.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: John Powell <john.powell@arm.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
index a6fd5e3..c9f3bd1 100644
--- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
+# Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -39,6 +39,7 @@ GCC_ASM_EXPORT (ArmCallWFE)
GCC_ASM_EXPORT (ArmCallSEV)
GCC_ASM_EXPORT (ArmReadCpuActlr)
GCC_ASM_EXPORT (ArmWriteCpuActlr)
+GCC_ASM_EXPORT (ArmReadSctlr)
#------------------------------------------------------------------------------
@@ -205,4 +206,13 @@ ASM_PFX(ArmWriteCpuActlr):
isb
ret
+ASM_PFX(ArmReadSctlr):
+ EL1_OR_EL2_OR_EL3(x1)
+1:mrs x0, sctlr_el1
+ ret
+2:mrs x0, sctlr_el2
+ ret
+3:mrs x0, sctlr_el3
+4:ret
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ArmPkg/Library: Add ArmReadSctlr for aarch64
@ 2016-07-29 23:06 Supreeth Venkatesh
2016-08-01 12:10 ` Ard Biesheuvel
0 siblings, 1 reply; 4+ messages in thread
From: Supreeth Venkatesh @ 2016-07-29 23:06 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, john.powell, ard.biesheuvel, Supreeth Venkatesh
One of the UEFI Self Certification tests (UEFI-SCT) need to read the
current exception level SCTLR Register.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: John Powell <john.powell@arm.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
index a6fd5e3..c9f3bd1 100644
--- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
+# Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -39,6 +39,7 @@ GCC_ASM_EXPORT (ArmCallWFE)
GCC_ASM_EXPORT (ArmCallSEV)
GCC_ASM_EXPORT (ArmReadCpuActlr)
GCC_ASM_EXPORT (ArmWriteCpuActlr)
+GCC_ASM_EXPORT (ArmReadSctlr)
#------------------------------------------------------------------------------
@@ -205,4 +206,13 @@ ASM_PFX(ArmWriteCpuActlr):
isb
ret
+ASM_PFX(ArmReadSctlr):
+ EL1_OR_EL2_OR_EL3(x1)
+1:mrs x0, sctlr_el1
+ ret
+2:mrs x0, sctlr_el2
+ ret
+3:mrs x0, sctlr_el3
+4:ret
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ArmPkg/Library: Add ArmReadSctlr for aarch64
2016-07-29 23:06 Supreeth Venkatesh
@ 2016-08-01 12:10 ` Ard Biesheuvel
2016-08-01 17:07 ` Supreeth Venkatesh
0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2016-08-01 12:10 UTC (permalink / raw)
To: Supreeth Venkatesh; +Cc: edk2-devel-01, Leif Lindholm, john.powell
On 30 July 2016 at 01:06, Supreeth Venkatesh <supreeth.venkatesh@arm.com> wrote:
> One of the UEFI Self Certification tests (UEFI-SCT) need to read the
> current exception level SCTLR Register.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: John Powell <john.powell@arm.com>
> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
> ---
Thanks for the patch. I don't think mentioning the UEFI-SCT here makes
any sense, since the function is defined in ArmLIb.h, and simply
missing from the AARCH64 implementation.
I fixed this up when applying (07783fdd67e4)
Thanks,
Ard.
> ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> index a6fd5e3..c9f3bd1 100644
> --- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> +++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> @@ -1,7 +1,7 @@
> #------------------------------------------------------------------------------
> #
> # Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
> -# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
> +# Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.
> #
> # This program and the accompanying materials
> # are licensed and made available under the terms and conditions of the BSD License
> @@ -39,6 +39,7 @@ GCC_ASM_EXPORT (ArmCallWFE)
> GCC_ASM_EXPORT (ArmCallSEV)
> GCC_ASM_EXPORT (ArmReadCpuActlr)
> GCC_ASM_EXPORT (ArmWriteCpuActlr)
> +GCC_ASM_EXPORT (ArmReadSctlr)
>
> #------------------------------------------------------------------------------
>
> @@ -205,4 +206,13 @@ ASM_PFX(ArmWriteCpuActlr):
> isb
> ret
>
> +ASM_PFX(ArmReadSctlr):
> + EL1_OR_EL2_OR_EL3(x1)
> +1:mrs x0, sctlr_el1
> + ret
> +2:mrs x0, sctlr_el2
> + ret
> +3:mrs x0, sctlr_el3
> +4:ret
> +
> ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> --
> 2.8.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ArmPkg/Library: Add ArmReadSctlr for aarch64
2016-08-01 12:10 ` Ard Biesheuvel
@ 2016-08-01 17:07 ` Supreeth Venkatesh
0 siblings, 0 replies; 4+ messages in thread
From: Supreeth Venkatesh @ 2016-08-01 17:07 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel-01, Leif Lindholm, John Powell
Thanks Ard.
-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
Sent: Monday, August 01, 2016 7:11 AM
To: Supreeth Venkatesh
Cc: edk2-devel-01; Leif Lindholm; John Powell
Subject: Re: [PATCH] ArmPkg/Library: Add ArmReadSctlr for aarch64
On 30 July 2016 at 01:06, Supreeth Venkatesh <supreeth.venkatesh@arm.com> wrote:
> One of the UEFI Self Certification tests (UEFI-SCT) need to read the
> current exception level SCTLR Register.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: John Powell <john.powell@arm.com>
> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
> ---
Thanks for the patch. I don't think mentioning the UEFI-SCT here makes any sense, since the function is defined in ArmLIb.h, and simply missing from the AARCH64 implementation.
I fixed this up when applying (07783fdd67e4)
Thanks,
Ard.
> ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S | 12
> +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> index a6fd5e3..c9f3bd1 100644
> --- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> +++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
> @@ -1,7 +1,7 @@
>
> #---------------------------------------------------------------------
> ---------
> #
> # Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> -#
> Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
> +# Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.
> #
> # This program and the accompanying materials # are licensed and
> made available under the terms and conditions of the BSD License @@
> -39,6 +39,7 @@ GCC_ASM_EXPORT (ArmCallWFE) GCC_ASM_EXPORT
> (ArmCallSEV) GCC_ASM_EXPORT (ArmReadCpuActlr) GCC_ASM_EXPORT
> (ArmWriteCpuActlr)
> +GCC_ASM_EXPORT (ArmReadSctlr)
>
>
> #---------------------------------------------------------------------
> ---------
>
> @@ -205,4 +206,13 @@ ASM_PFX(ArmWriteCpuActlr):
> isb
> ret
>
> +ASM_PFX(ArmReadSctlr):
> + EL1_OR_EL2_OR_EL3(x1)
> +1:mrs x0, sctlr_el1
> + ret
> +2:mrs x0, sctlr_el2
> + ret
> +3:mrs x0, sctlr_el3
> +4:ret
> +
> ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> --
> 2.8.0
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-01 17:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29 23:11 [PATCH] ArmPkg/Library: Add ArmReadSctlr for aarch64 Supreeth Venkatesh
-- strict thread matches above, loose matches on Subject: below --
2016-07-29 23:06 Supreeth Venkatesh
2016-08-01 12:10 ` Ard Biesheuvel
2016-08-01 17:07 ` Supreeth Venkatesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox