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 --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
On 6 July 2016 at 15:48, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
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.
Actually, similar to the ArmMmuLib 3/4 patch, this requires some minor additional tweaks for Cello/Overdrive and Beagle, which I didn't spot until right after hitting 'send'
""" diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c index 13388c175e4b..5fb63349864e 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c @@ -20,6 +20,7 @@
#include <PiPei.h>
+#include <Library/ArmMmuLib.h> #include <Library/ArmPlatformLib.h> #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf index 42f755b74b41..1ae0b70ee3eb 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf @@ -40,7 +40,7 @@ [LibraryClasses] DebugLib HobLib - ArmLib + ArmMmuLib ArmPlatformLib PcdLib
diff --git a/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c b/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c index 7399eef5be7c..155043e5dd01 100644 --- a/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c +++ b/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c @@ -15,6 +15,7 @@ #include <PiPei.h>
#include <Library/ArmLib.h> +#include <Library/ArmMmuLib.h> #include <Library/PrePiLib.h> #include <Library/PcdLib.h>
diff --git a/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf b/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf index 82fc2aafd157..5f207d0eef24 100644 --- a/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf +++ b/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf @@ -43,6 +43,7 @@ BaseLib DebugLib ArmLib + ArmMmuLib IoLib ExtractGuidedSectionLib LzmaDecompressLib """
On Wed, Jul 06, 2016 at 03:59:34PM +0200, Ard Biesheuvel wrote:
On 6 July 2016 at 15:48, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
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.
Actually, similar to the ArmMmuLib 3/4 patch, this requires some minor additional tweaks for Cello/Overdrive and Beagle, which I didn't spot until right after hitting 'send'
""" diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c index 13388c175e4b..5fb63349864e 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c @@ -20,6 +20,7 @@
#include <PiPei.h>
+#include <Library/ArmMmuLib.h> #include <Library/ArmPlatformLib.h> #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf index 42f755b74b41..1ae0b70ee3eb 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf @@ -40,7 +40,7 @@ [LibraryClasses] DebugLib HobLib
- ArmLib
- ArmMmuLib ArmPlatformLib PcdLib
diff --git a/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c b/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c index 7399eef5be7c..155043e5dd01 100644 --- a/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c +++ b/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c @@ -15,6 +15,7 @@ #include <PiPei.h>
#include <Library/ArmLib.h> +#include <Library/ArmMmuLib.h> #include <Library/PrePiLib.h> #include <Library/PcdLib.h>
diff --git a/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf b/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf index 82fc2aafd157..5f207d0eef24 100644 --- a/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf +++ b/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf @@ -43,6 +43,7 @@ BaseLib DebugLib ArmLib
- ArmMmuLib IoLib ExtractGuidedSectionLib LzmaDecompressLib
"""
Sure, with those additions: Reviewed-by: Leif Lindholm leif.lindholm@linaro.org
Thanks Ard for your help :)
Heyi
On 07/06/2016 09:59 PM, Ard Biesheuvel wrote:
On 6 July 2016 at 15:48, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
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.
Actually, similar to the ArmMmuLib 3/4 patch, this requires some minor additional tweaks for Cello/Overdrive and Beagle, which I didn't spot until right after hitting 'send'
""" diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c index 13388c175e4b..5fb63349864e 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c @@ -20,6 +20,7 @@
#include <PiPei.h>
+#include <Library/ArmMmuLib.h> #include <Library/ArmPlatformLib.h> #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf index 42f755b74b41..1ae0b70ee3eb 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf @@ -40,7 +40,7 @@ [LibraryClasses] DebugLib HobLib
- ArmLib
- ArmMmuLib ArmPlatformLib PcdLib
diff --git a/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c b/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c index 7399eef5be7c..155043e5dd01 100644 --- a/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c +++ b/Platforms/TexasInstruments/BeagleBoard/Sec/Cache.c @@ -15,6 +15,7 @@ #include <PiPei.h>
#include <Library/ArmLib.h> +#include <Library/ArmMmuLib.h> #include <Library/PrePiLib.h> #include <Library/PcdLib.h>
diff --git a/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf b/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf index 82fc2aafd157..5f207d0eef24 100644 --- a/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf +++ b/Platforms/TexasInstruments/BeagleBoard/Sec/Sec.inf @@ -43,6 +43,7 @@ BaseLib DebugLib ArmLib
- ArmMmuLib IoLib ExtractGuidedSectionLib LzmaDecompressLib
"""