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
"""