[edk2-devel] [PATCH 0/6] ArmPkg: eradicate and deprecate by set/way cache ops

Ard Biesheuvel posted 6 patches 4 years, 1 month ago
Failed in applying to current master (apply log)
There is a newer version of this series
ArmPkg/Include/Library/ArmLib.h               |  22 +-
ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h    |  18 +
ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S |   9 +-
ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h          |  18 +
.../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |   9 -
.../Library/ArmMmuLib/Arm/ArmMmuLibConvert.c  |  32 ++
ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c  | 468 +-----------------
.../Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c   | 435 ++++++++++++++++
ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf    |   4 +
9 files changed, 530 insertions(+), 485 deletions(-)
create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibConvert.c
create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c
[edk2-devel] [PATCH 0/6] ArmPkg: eradicate and deprecate by set/way cache ops
Posted by Ard Biesheuvel 4 years, 1 month ago
As it turns out, there were still some instances of set/way ops left in
the core code, in ArmMmuLib to be precise.

This series fixes ArmMmuLib to perform the appropriate cache invalidation
when populating page tables with the MMU and caches off, allowing us to
get rid of the cache clean/disable/enable sequences which are incorrect
and pointless at the same time.

While at it, do some mild refactoring of the ARM version of ArmMmuLib
first, and finally, deprecate the set/way ops in ArmLib.

Note that the last patch needs coordination with edk2-platforms, as
there are a couple of users there which will need to be fixed, or
drop their definition of DISABLE_NEW_DEPRECATED_INTERFACES

Ard Biesheuvel (6):
  ArmPkg/ArmMmuLib ARM: remove dummy constructor
  ArmPkg/ArmMmuLib ARM: split ArmMmuLibCore.c into core and update code
  ArmPkg/ArmMmuLib ARM: cache-invalidate initial page table entries
  ArmPkg/ArmMmuLib AARCH64: cache-invalidate initial page table entries
  ArmPkg/ArmLib: move set/way helper functions into private header
  ArmPkg/ArmLib: deprecate set/way cache maintenance routines

 ArmPkg/Include/Library/ArmLib.h               |  22 +-
 ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h    |  18 +
 ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S |   9 +-
 ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h          |  18 +
 .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |   9 -
 .../Library/ArmMmuLib/Arm/ArmMmuLibConvert.c  |  32 ++
 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c  | 468 +-----------------
 .../Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c   | 435 ++++++++++++++++
 ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf    |   4 +
 9 files changed, 530 insertions(+), 485 deletions(-)
 create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibConvert.c
 create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#54846): https://edk2.groups.io/g/devel/message/54846
Mute This Topic: https://groups.io/mt/71562844/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/6] ArmPkg: eradicate and deprecate by set/way cache ops
Posted by Laszlo Ersek 4 years, 1 month ago
On 02/26/20 11:03, Ard Biesheuvel wrote:
> As it turns out, there were still some instances of set/way ops left in
> the core code, in ArmMmuLib to be precise.
> 
> This series fixes ArmMmuLib to perform the appropriate cache invalidation
> when populating page tables with the MMU and caches off, allowing us to
> get rid of the cache clean/disable/enable sequences which are incorrect
> and pointless at the same time.
> 
> While at it, do some mild refactoring of the ARM version of ArmMmuLib
> first, and finally, deprecate the set/way ops in ArmLib.
> 
> Note that the last patch needs coordination with edk2-platforms, as
> there are a couple of users there which will need to be fixed, or
> drop their definition of DISABLE_NEW_DEPRECATED_INTERFACES
> 
> Ard Biesheuvel (6):
>   ArmPkg/ArmMmuLib ARM: remove dummy constructor
>   ArmPkg/ArmMmuLib ARM: split ArmMmuLibCore.c into core and update code
>   ArmPkg/ArmMmuLib ARM: cache-invalidate initial page table entries
>   ArmPkg/ArmMmuLib AARCH64: cache-invalidate initial page table entries
>   ArmPkg/ArmLib: move set/way helper functions into private header
>   ArmPkg/ArmLib: deprecate set/way cache maintenance routines
> 
>  ArmPkg/Include/Library/ArmLib.h               |  22 +-
>  ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h    |  18 +
>  ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S |   9 +-
>  ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h          |  18 +
>  .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |   9 -
>  .../Library/ArmMmuLib/Arm/ArmMmuLibConvert.c  |  32 ++
>  ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c  | 468 +-----------------
>  .../Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c   | 435 ++++++++++++++++
>  ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf    |   4 +
>  9 files changed, 530 insertions(+), 485 deletions(-)
>  create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibConvert.c
>  create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c
> 

I'd like to leave reviewing this to Leif :)

Thanks!
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#54863): https://edk2.groups.io/g/devel/message/54863
Mute This Topic: https://groups.io/mt/71562844/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-