Message ID | 1428578932-24079-3-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
On 13 April 2015 at 17:24, Olivier Martin <Olivier.Martin@arm.com> wrote: > Reviewed-By: Olivier Martin <Olivier.martin@arm.com> > Thanks! So, since the breakage caused by this patch has apparently been solved, are you ok to merge this? I have updated my public branch: https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/linaro-topic-virt Thanks, Ard. > -----Original Message----- > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > Sent: 09 April 2015 12:29 > To: edk2-devel@lists.sourceforge.net; lersek@redhat.com; Olivier Martin > Cc: roy.franz@linaro.org; leif.lindholm@linaro.org; Ard Biesheuvel > Subject: [PATCH v4 2/5] ArmPlatformPkg: do not fulfil MemoryInitPeiLib dependency directly via .c file > > MemoryInitPeim short-circuits its MemoryInitPeiLib dependency by including the .c file directly. This prevents us from having a special implementation for ArmVirtualizationPkg that performs additional cache maintenance before enabling the MMU. So instead, make it depend on the library class. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc | 2 ++ > ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc | 2 ++ > ArmPlatformPkg/ArmPlatformPkg.dsc | 3 +++ > ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc | 4 +++- > ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 4 +++- > ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf | 4 ++-- > ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf | 2 +- > 7 files changed, 16 insertions(+), 5 deletions(-) > > diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc > index a260286eae44..8da387895c9b 100644 > --- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc > +++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc > @@ -57,6 +57,8 @@ > PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf > PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf > PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf > + > +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] > MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > > [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER] diff --git a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc > index 9d14a3e7577d..75712cb0e4ee 100644 > --- a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc > +++ b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc > @@ -137,6 +137,8 @@ > PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf > PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf > PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf > + > +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] > MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > > [LibraryClasses.common.DXE_CORE] > diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc > index ada59bdeb869..28178d0b1f6c 100644 > --- a/ArmPlatformPkg/ArmPlatformPkg.dsc > +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc > @@ -133,6 +133,9 @@ > DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf > DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf > > +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] > + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > + > [LibraryClasses.ARM.SEC] > ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf > > diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc > index be58e6bfc399..fcd4d11e2d2e 100644 > --- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc > +++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc > @@ -125,9 +125,11 @@ > MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf > HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf > PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf > - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > !endif > > +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] > + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > + > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc > index 483e8698356d..e6637d8488d0 100644 > --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc > +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc > @@ -138,7 +138,6 @@ > HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf > PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf > PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf > - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > !endif > > # Trustzone Support > @@ -175,6 +174,9 @@ > ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.inf > PeiServicesTablePointerLib|ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf > > +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] > + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > + > [LibraryClasses.common.DXE_CORE] > HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf > MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf > diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > index 1e5b93e8a507..6d22b7c03441 100755 > --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf > @@ -15,9 +15,9 @@ > INF_VERSION = 0x00010005 > BASE_NAME = ArmMemoryInitPeiLib > FILE_GUID = 55ddb6e0-70b5-11e0-b33e-0002a5d5c51b > - MODULE_TYPE = SEC > + MODULE_TYPE = BASE > VERSION_STRING = 1.0 > - LIBRARY_CLASS = PlatformPeiLib > + LIBRARY_CLASS = MemoryInitPeiLib|SEC PEIM > > [Sources] > MemoryInitPeiLib.c > diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf > index 6374b63f8524..2c14a9c826ff 100755 > --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf > +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf > @@ -28,7 +28,6 @@ > > [Sources] > MemoryInitPeim.c > - MemoryInitPeiLib.c > > [Packages] > MdePkg/MdePkg.dec > @@ -43,6 +42,7 @@ > HobLib > ArmLib > ArmPlatformLib > + MemoryInitPeiLib > > [Guids] > gEfiMemoryTypeInformationGuid > -- > 1.8.3.2 > > > -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. > > ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 > ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 > ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc index a260286eae44..8da387895c9b 100644 --- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc +++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc @@ -57,6 +57,8 @@ PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf + +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER] diff --git a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc index 9d14a3e7577d..75712cb0e4ee 100644 --- a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc @@ -137,6 +137,8 @@ PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf + +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf [LibraryClasses.common.DXE_CORE] diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc index ada59bdeb869..28178d0b1f6c 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc @@ -133,6 +133,9 @@ DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + [LibraryClasses.ARM.SEC] ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc index be58e6bfc399..fcd4d11e2d2e 100644 --- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc +++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc @@ -125,9 +125,11 @@ MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf !endif +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + [LibraryClasses.common.PEI_CORE] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc index 483e8698356d..e6637d8488d0 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc @@ -138,7 +138,6 @@ HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf !endif # Trustzone Support @@ -175,6 +174,9 @@ ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.inf PeiServicesTablePointerLib|ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + [LibraryClasses.common.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf index 1e5b93e8a507..6d22b7c03441 100755 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf @@ -15,9 +15,9 @@ INF_VERSION = 0x00010005 BASE_NAME = ArmMemoryInitPeiLib FILE_GUID = 55ddb6e0-70b5-11e0-b33e-0002a5d5c51b - MODULE_TYPE = SEC + MODULE_TYPE = BASE VERSION_STRING = 1.0 - LIBRARY_CLASS = PlatformPeiLib + LIBRARY_CLASS = MemoryInitPeiLib|SEC PEIM [Sources] MemoryInitPeiLib.c diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf index 6374b63f8524..2c14a9c826ff 100755 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf @@ -28,7 +28,6 @@ [Sources] MemoryInitPeim.c - MemoryInitPeiLib.c [Packages] MdePkg/MdePkg.dec @@ -43,6 +42,7 @@ HobLib ArmLib ArmPlatformLib + MemoryInitPeiLib [Guids] gEfiMemoryTypeInformationGuid
MemoryInitPeim short-circuits its MemoryInitPeiLib dependency by including the .c file directly. This prevents us from having a special implementation for ArmVirtualizationPkg that performs additional cache maintenance before enabling the MMU. So instead, make it depend on the library class. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc | 2 ++ ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc | 2 ++ ArmPlatformPkg/ArmPlatformPkg.dsc | 3 +++ ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc | 4 +++- ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 4 +++- ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf | 4 ++-- ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-)