public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ArmPkg/ArmLib: Fix cache-invalidate initial page tables
@ 2020-03-18 18:45 Name
  0 siblings, 0 replies; 3+ messages in thread
From: Name @ 2020-03-18 18:45 UTC (permalink / raw)
  To: devel, leif, ard.biesheuvel; +Cc: Ashish Singhal

From: Ashish Singhal <ashishsingha@nvidia.com>

Because of a bug, current EL gets passed to DC IVAC instruction instead
of the VA entry that needs to be invalidated.

Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
---
 ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
index f744cd6..ba0ec56 100644
--- a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
@@ -122,7 +122,7 @@ ASM_FUNC(ArmSetMAIR)
 ASM_FUNC(ArmUpdateTranslationTableEntry)
    dsb     nshst
    lsr     x1, x1, #12
-   EL1_OR_EL2_OR_EL3(x0)
+   EL1_OR_EL2_OR_EL3(x2)
 1: tlbi    vaae1, x1             // TLB Invalidate VA , EL1
    mrs     x2, sctlr_el1
    b       4f
-- 
2.7.4


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ArmPkg/ArmLib: Fix cache-invalidate initial page tables
@ 2020-03-19 16:37 Ashish Singhal
  2020-03-19 17:39 ` Leif Lindholm
  0 siblings, 1 reply; 3+ messages in thread
From: Ashish Singhal @ 2020-03-19 16:37 UTC (permalink / raw)
  To: devel, ard.biesheuvel, leif; +Cc: Ashish Singhal

Because of a bug, current EL gets passed to DC IVAC instruction instead
of the VA entry that needs to be invalidated.

Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
---
 ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
index f744cd6..ba0ec56 100644
--- a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
@@ -122,7 +122,7 @@ ASM_FUNC(ArmSetMAIR)
 ASM_FUNC(ArmUpdateTranslationTableEntry)
    dsb     nshst
    lsr     x1, x1, #12
-   EL1_OR_EL2_OR_EL3(x0)
+   EL1_OR_EL2_OR_EL3(x2)
 1: tlbi    vaae1, x1             // TLB Invalidate VA , EL1
    mrs     x2, sctlr_el1
    b       4f
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ArmPkg/ArmLib: Fix cache-invalidate initial page tables
  2020-03-19 16:37 [PATCH] ArmPkg/ArmLib: Fix cache-invalidate initial page tables Ashish Singhal
@ 2020-03-19 17:39 ` Leif Lindholm
  0 siblings, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2020-03-19 17:39 UTC (permalink / raw)
  To: Ashish Singhal; +Cc: devel, ard.biesheuvel

On Thu, Mar 19, 2020 at 10:37:05 -0600, Ashish Singhal wrote:
> Because of a bug, current EL gets passed to DC IVAC instruction instead
> of the VA entry that needs to be invalidated.

Oh, yeah, that's obviously a bug. What idiot reviewed that patch? Oh,
me...

OK, so I should have added a reference to the bad commit before
pushing, but by the time I remembered, the CI job had already merged
the patch.

So for the record, the offending commit was 3391e20ffa3f
("ArmPkg/ArmMmuLib AARCH64: cache-invalidate initial page table entries")

Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Pushed as 0c8ea9fe1adb.

Thanks!

> Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
> ---
>  ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
> index f744cd6..ba0ec56 100644
> --- a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
> +++ b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S
> @@ -122,7 +122,7 @@ ASM_FUNC(ArmSetMAIR)
>  ASM_FUNC(ArmUpdateTranslationTableEntry)
>     dsb     nshst
>     lsr     x1, x1, #12
> -   EL1_OR_EL2_OR_EL3(x0)
> +   EL1_OR_EL2_OR_EL3(x2)
>  1: tlbi    vaae1, x1             // TLB Invalidate VA , EL1
>     mrs     x2, sctlr_el1
>     b       4f
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-19 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-19 16:37 [PATCH] ArmPkg/ArmLib: Fix cache-invalidate initial page tables Ashish Singhal
2020-03-19 17:39 ` Leif Lindholm
  -- strict thread matches above, loose matches on Subject: below --
2020-03-18 18:45 Name

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox