Message ID | 20171117160913.17292-15-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
Series | ArmVirtPkg: get rid of ArmPlatformLib | expand |
On 11/17/17 17:09, Ard Biesheuvel wrote: > Move to the new ArmVirtMemInfoLib library to retrieve DRAM information > from the platform, so that we can phase out ArmPlatformLib going forward. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > ArmVirtPkg/ArmVirtQemu.dsc | 7 ++++++- > ArmVirtPkg/ArmVirtQemu.fdf | 1 + > ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c | 4 ++-- > ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf | 3 ++- > 4 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc > index d14a0dd0d1d9..5c59f05187fa 100644 > --- a/ArmVirtPkg/ArmVirtQemu.dsc > +++ b/ArmVirtPkg/ArmVirtQemu.dsc > @@ -48,7 +48,8 @@ [LibraryClasses.common] > QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf > > - ArmPlatformLib|ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf > + ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf > + ArmVirtMemInfoLib|ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf > > TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf > NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf > @@ -233,6 +234,10 @@ [Components.common] > <LibraryClasses> > NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf > } > + ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf { > + <LibraryClasses> > + ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf > + } > > # > # DXE > diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf > index c6a22dc018f3..696dec264639 100644 > --- a/ArmVirtPkg/ArmVirtQemu.fdf > +++ b/ArmVirtPkg/ArmVirtQemu.fdf > @@ -109,6 +109,7 @@ [FV.FVMAIN_COMPACT] > INF ArmPkg/Drivers/CpuPei/CpuPei.inf > INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf > INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > + INF ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > > FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { > diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c > index 6f3e54b7afcb..05afd1282422 100644 > --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c > +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c > @@ -16,7 +16,7 @@ > #include <PiPei.h> > > #include <Library/ArmMmuLib.h> > -#include <Library/ArmPlatformLib.h> > +#include <Library/ArmVirtMemInfoLib.h> > #include <Library/DebugLib.h> > #include <Library/HobLib.h> > #include <Library/MemoryAllocationLib.h> > @@ -39,7 +39,7 @@ InitMmu ( > RETURN_STATUS Status; > > // Get Virtual Memory Map from the Platform Library > - ArmPlatformGetVirtualMemoryMap (&MemoryTable); > + ArmVirtGetMemoryMap (&MemoryTable); > > //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in > // DRAM (even at the top of DRAM as it is the first permanent memory allocation) > diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf > index 028d6fb5ac28..54879d590a8a 100644 > --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf > +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf > @@ -29,13 +29,14 @@ [Packages] > EmbeddedPkg/EmbeddedPkg.dec > ArmPkg/ArmPkg.dec > ArmPlatformPkg/ArmPlatformPkg.dec > + ArmVirtPkg/ArmVirtPkg.dec > > [LibraryClasses] > DebugLib > HobLib > ArmLib > ArmMmuLib > - ArmPlatformLib > + ArmVirtMemInfoLib > CacheMaintenanceLib > > [Guids] > This patch is the logical continuation of patch #13, so my feedback depends on your answer to my patch #13 feedback :) Thanks Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index d14a0dd0d1d9..5c59f05187fa 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -48,7 +48,8 @@ [LibraryClasses.common] QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf - ArmPlatformLib|ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf + ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf + ArmVirtMemInfoLib|ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf @@ -233,6 +234,10 @@ [Components.common] <LibraryClasses> NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf } + ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf { + <LibraryClasses> + ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf + } # # DXE diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index c6a22dc018f3..696dec264639 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -109,6 +109,7 @@ [FV.FVMAIN_COMPACT] INF ArmPkg/Drivers/CpuPei/CpuPei.inf INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf + INF ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c index 6f3e54b7afcb..05afd1282422 100644 --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c @@ -16,7 +16,7 @@ #include <PiPei.h> #include <Library/ArmMmuLib.h> -#include <Library/ArmPlatformLib.h> +#include <Library/ArmVirtMemInfoLib.h> #include <Library/DebugLib.h> #include <Library/HobLib.h> #include <Library/MemoryAllocationLib.h> @@ -39,7 +39,7 @@ InitMmu ( RETURN_STATUS Status; // Get Virtual Memory Map from the Platform Library - ArmPlatformGetVirtualMemoryMap (&MemoryTable); + ArmVirtGetMemoryMap (&MemoryTable); //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in // DRAM (even at the top of DRAM as it is the first permanent memory allocation) diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf index 028d6fb5ac28..54879d590a8a 100644 --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf @@ -29,13 +29,14 @@ [Packages] EmbeddedPkg/EmbeddedPkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec + ArmVirtPkg/ArmVirtPkg.dec [LibraryClasses] DebugLib HobLib ArmLib ArmMmuLib - ArmPlatformLib + ArmVirtMemInfoLib CacheMaintenanceLib [Guids]
Move to the new ArmVirtMemInfoLib library to retrieve DRAM information from the platform, so that we can phase out ArmPlatformLib going forward. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmVirtPkg/ArmVirtQemu.dsc | 7 ++++++- ArmVirtPkg/ArmVirtQemu.fdf | 1 + ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c | 4 ++-- ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel