diff mbox

[Linaro-uefi] Platforms: add resolution for new library class 'ArmMmuLib'

Message ID 1467812922-24584-1-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel July 6, 2016, 1:48 p.m. UTC
Now that the page table manipulation code has been split off from ArmLib
into ArmMmuLib, we need a resolution for this new library class in all
platforms. For most platforms, this is simply a matter of adding a new
line

  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf

to a common [LibraryClass] section.

For D02/D03, which were users of the special PEI_CORE/PEIM implementation
of ArmLib, we drop the reference to this special version from the
[LibraryClasses.PEI_CORE] section (since PEI core does use ArmLib but does
not use the MMU code), and replace the one in [LibraryClasses.PEIM] with
the new ArmMmuPeiLib.inf implementation, which is the new version that
takes care not to issue cache maintenance ops on NOR flash.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
This change will be needed as soon as I commit the series 'ArmPkg: refactor
MMU handling routines into separate ArmMmuLib', which is good to go from
review perspective. If people are ok with this patch, I will merge it at
the same time as the series (unless there are other reasons to wait)

Since this change is not bisectable anyway (since the EDK2 change and the
OPP change both need to occur at the same time), I saw little point in
splitting this into several patches.

 Chips/Hisilicon/Pv660/Pv660.dsc.inc                       | 4 ++--
 Chips/TexasInstruments/Omap35xx/Omap35xxPkg.dsc           | 1 +
 Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc              | 1 +
 Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc      | 1 +
 Platforms/ARM/Juno/ArmJuno.dsc                            | 1 +
 Platforms/ARM/VExpress/ArmVExpress-CTA15-A7.dsc           | 1 +
 Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc        | 1 +
 Platforms/TexasInstruments/BeagleBoard/BeagleBoardPkg.dsc | 1 +
 8 files changed, 9 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/Chips/Hisilicon/Pv660/Pv660.dsc.inc b/Chips/Hisilicon/Pv660/Pv660.dsc.inc
index 2a0ffac9c72d..029608ceeb78 100644
--- a/Chips/Hisilicon/Pv660/Pv660.dsc.inc
+++ b/Chips/Hisilicon/Pv660/Pv660.dsc.inc
@@ -65,6 +65,7 @@ 
   ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
   ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
   ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
 
   # Versatile Express Specific Libraries
   ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf
@@ -166,7 +167,6 @@ 
 
   PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf
 
 [LibraryClasses.common.PEIM]
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -186,7 +186,7 @@ 
   ## Fixed compile error after upgrade to 14.10
   PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf
 
 [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
diff --git a/Chips/TexasInstruments/Omap35xx/Omap35xxPkg.dsc b/Chips/TexasInstruments/Omap35xx/Omap35xxPkg.dsc
index f6606cafb849..2b15d7f5667b 100644
--- a/Chips/TexasInstruments/Omap35xx/Omap35xxPkg.dsc
+++ b/Chips/TexasInstruments/Omap35xx/Omap35xxPkg.dsc
@@ -34,6 +34,7 @@ 
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
 
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
index 437286876a31..6b9446a1387d 100644
--- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
+++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
@@ -101,6 +101,7 @@  DEFINE DO_KCS    = 0
 
   ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
   ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA5xLib/ArmCortexA5xLib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   ArmPlatformLib|OpenPlatformPkg/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf
   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
index c73bd55c1558..0f8dd814ad15 100644
--- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
@@ -104,6 +104,7 @@  DEFINE DO_KCS       = 1
 
   ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
   ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA5xLib/ArmCortexA5xLib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   ArmPlatformLib|OpenPlatformPkg/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf
   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
index 490e08eb9248..4f41fb159f19 100644
--- a/Platforms/ARM/Juno/ArmJuno.dsc
+++ b/Platforms/ARM/Juno/ArmJuno.dsc
@@ -34,6 +34,7 @@ 
 !include OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
 
 [LibraryClasses.common]
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   ArmPlatformLib|ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoLib.inf
   ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
 
diff --git a/Platforms/ARM/VExpress/ArmVExpress-CTA15-A7.dsc b/Platforms/ARM/VExpress/ArmVExpress-CTA15-A7.dsc
index 9daf3c8ff512..ef8fd971e66b 100644
--- a/Platforms/ARM/VExpress/ArmVExpress-CTA15-A7.dsc
+++ b/Platforms/ARM/VExpress/ArmVExpress-CTA15-A7.dsc
@@ -39,6 +39,7 @@ 
 
 [LibraryClasses.common]
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/ArmVExpressLib.inf
 
   ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc
index 1e871b541c6e..65b14eb793a8 100644
--- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc
+++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc
@@ -42,6 +42,7 @@ 
   ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
   ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf
   ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
 
   ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf
   NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf
diff --git a/Platforms/TexasInstruments/BeagleBoard/BeagleBoardPkg.dsc b/Platforms/TexasInstruments/BeagleBoard/BeagleBoardPkg.dsc
index e24df3b7a8df..3c2b767552fa 100644
--- a/Platforms/TexasInstruments/BeagleBoard/BeagleBoardPkg.dsc
+++ b/Platforms/TexasInstruments/BeagleBoard/BeagleBoardPkg.dsc
@@ -32,6 +32,7 @@ 
 
 [LibraryClasses.common]
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
   ArmPlatformLib|OpenPlatformPkg/Platforms/TexasInstruments/BeagleBoard/Library/BeagleBoardLib/BeagleBoardLib.inf
   ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA8Lib/ArmCortexA8Lib.inf
   ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf