Message ID | 1470212464-28071-2-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | Accepted |
Commit | f846969796d311d01e8ba7527a6f50b5a246a9e8 |
Headers | show |
On 08/03/16 10:21, Ard Biesheuvel wrote: > This library is only used by the various PrePi implementations, all of > which are of type SEC. You can actually enforce that client module type restriction, by setting LIBRARY_CLASS = MemoryAllocationLib|SEC Can you try that, in addition to the MODULE_TYPE change? Just an idea, of course. Thanks, Laszlo > So make this library SEC as well. This may affect > the build options used by the platform. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf > index 21f6eb1e14bc..ea3d0f5da9c2 100644 > --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf > +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf > @@ -15,7 +15,7 @@ [Defines] > INF_VERSION = 0x00010005 > BASE_NAME = PrePiMemoryAllocationLib > FILE_GUID = 4f14c900-51a9-11e0-afbf-0002a5d5c51b > - MODULE_TYPE = PEIM > + MODULE_TYPE = SEC > VERSION_STRING = 1.0 > LIBRARY_CLASS = MemoryAllocationLib > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 3 August 2016 at 11:56, Laszlo Ersek <lersek@redhat.com> wrote: > On 08/03/16 10:21, Ard Biesheuvel wrote: >> This library is only used by the various PrePi implementations, all of >> which are of type SEC. > > You can actually enforce that client module type restriction, by setting > > LIBRARY_CLASS = MemoryAllocationLib|SEC > > Can you try that, in addition to the MODULE_TYPE change? > > Just an idea, of course. > That is a valid point, but it is kind of orthogonal to the issue I am trying to solve. In patch #2, I override the CC flags for SEC and BASE type modules, but this static library gets build with the PEIM rules in effect, so I don't really mind if anyone uses this module elsewhere. I could perhaps simply change the type to BASE as well. _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 08/03/16 12:00, Ard Biesheuvel wrote: > On 3 August 2016 at 11:56, Laszlo Ersek <lersek@redhat.com> wrote: >> On 08/03/16 10:21, Ard Biesheuvel wrote: >>> This library is only used by the various PrePi implementations, all of >>> which are of type SEC. >> >> You can actually enforce that client module type restriction, by setting >> >> LIBRARY_CLASS = MemoryAllocationLib|SEC >> >> Can you try that, in addition to the MODULE_TYPE change? >> >> Just an idea, of course. >> > > That is a valid point, but it is kind of orthogonal to the issue I am > trying to solve. > > In patch #2, I override the CC flags for SEC and BASE type modules, > but this static library gets build with the PEIM rules in effect, so I > don't really mind if anyone uses this module elsewhere. I could > perhaps simply change the type to BASE as well. Hm, after your explanation, I think your current patch is good. Reviewed-by: Laszlo Ersek <lersek@redhat.com> _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 3 August 2016 at 13:21, Laszlo Ersek <lersek@redhat.com> wrote: > On 08/03/16 12:00, Ard Biesheuvel wrote: >> On 3 August 2016 at 11:56, Laszlo Ersek <lersek@redhat.com> wrote: >>> On 08/03/16 10:21, Ard Biesheuvel wrote: >>>> This library is only used by the various PrePi implementations, all of >>>> which are of type SEC. >>> >>> You can actually enforce that client module type restriction, by setting >>> >>> LIBRARY_CLASS = MemoryAllocationLib|SEC >>> >>> Can you try that, in addition to the MODULE_TYPE change? >>> >>> Just an idea, of course. >>> >> >> That is a valid point, but it is kind of orthogonal to the issue I am >> trying to solve. >> >> In patch #2, I override the CC flags for SEC and BASE type modules, >> but this static library gets build with the PEIM rules in effect, so I >> don't really mind if anyone uses this module elsewhere. I could >> perhaps simply change the type to BASE as well. > > Hm, after your explanation, I think your current patch is good. > > Reviewed-by: Laszlo Ersek <lersek@redhat.com> > Thanks. @Leif: any objections? I'd like to merge this right away, my Jenkins job is broken atm due to this. -- Ard. _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On Wed, Aug 03, 2016 at 02:50:59PM +0200, Ard Biesheuvel wrote: > On 3 August 2016 at 13:21, Laszlo Ersek <lersek@redhat.com> wrote: > > On 08/03/16 12:00, Ard Biesheuvel wrote: > >> On 3 August 2016 at 11:56, Laszlo Ersek <lersek@redhat.com> wrote: > >>> On 08/03/16 10:21, Ard Biesheuvel wrote: > >>>> This library is only used by the various PrePi implementations, all of > >>>> which are of type SEC. > >>> > >>> You can actually enforce that client module type restriction, by setting > >>> > >>> LIBRARY_CLASS = MemoryAllocationLib|SEC > >>> > >>> Can you try that, in addition to the MODULE_TYPE change? > >>> > >>> Just an idea, of course. > >>> > >> > >> That is a valid point, but it is kind of orthogonal to the issue I am > >> trying to solve. > >> > >> In patch #2, I override the CC flags for SEC and BASE type modules, > >> but this static library gets build with the PEIM rules in effect, so I > >> don't really mind if anyone uses this module elsewhere. I could > >> perhaps simply change the type to BASE as well. > > > > Hm, after your explanation, I think your current patch is good. > > > > Reviewed-by: Laszlo Ersek <lersek@redhat.com> > > Thanks. > > @Leif: any objections? I'd like to merge this right away, my Jenkins > job is broken atm due to this. No objection. We can always change it to BASE in future if that would appear to make sense. (for the series) Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Regards, Leif _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf index 21f6eb1e14bc..ea3d0f5da9c2 100644 --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf @@ -15,7 +15,7 @@ [Defines] INF_VERSION = 0x00010005 BASE_NAME = PrePiMemoryAllocationLib FILE_GUID = 4f14c900-51a9-11e0-afbf-0002a5d5c51b - MODULE_TYPE = PEIM + MODULE_TYPE = SEC VERSION_STRING = 1.0 LIBRARY_CLASS = MemoryAllocationLib
This library is only used by the various PrePi implementations, all of which are of type SEC. So make this library SEC as well. This may affect the build options used by the platform. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel