* [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. @ 2018-05-17 12:43 Marvin Häuser 2018-05-24 20:36 ` Jordan Justen 0 siblings, 1 reply; 6+ messages in thread From: Marvin Häuser @ 2018-05-17 12:43 UTC (permalink / raw) To: edk2-devel@lists.01.org; +Cc: jordan.l.justen@intel.com, afish@apple.com Currently, SmbiosLib declares the PcdLib library class. Update the declaration to declare SmbiosLib. V2: - Do not change the copyright date as requested. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> --- EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf index adcd7ef08e20..36d5c350f51a 100644 --- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf +++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf @@ -20,7 +20,7 @@ [Defines] FILE_GUID = 881863A2-09FD-3E44-8D62-7AE038D03747 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER + LIBRARY_CLASS = SmbiosLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER CONSTRUCTOR = SmbiosLibConstructor -- 2.17.0.windows.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. 2018-05-17 12:43 [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class Marvin Häuser @ 2018-05-24 20:36 ` Jordan Justen 2018-05-24 20:51 ` Laszlo Ersek 0 siblings, 1 reply; 6+ messages in thread From: Jordan Justen @ 2018-05-24 20:36 UTC (permalink / raw) To: edk2-devel@lists.01.org, Marvin Häuser; +Cc: afish@apple.com Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Pushed as 7dc7c7435e. On 2018-05-17 05:43:30, Marvin Häuser wrote: > Currently, SmbiosLib declares the PcdLib library class. Update the > declaration to declare SmbiosLib. > > V2: > - Do not change the copyright date as requested. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> > --- > EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > index adcd7ef08e20..36d5c350f51a 100644 > --- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > +++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > @@ -20,7 +20,7 @@ [Defines] > FILE_GUID = 881863A2-09FD-3E44-8D62-7AE038D03747 > MODULE_TYPE = DXE_DRIVER > VERSION_STRING = 1.0 > - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER > + LIBRARY_CLASS = SmbiosLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER > > CONSTRUCTOR = SmbiosLibConstructor > > -- > 2.17.0.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. 2018-05-24 20:36 ` Jordan Justen @ 2018-05-24 20:51 ` Laszlo Ersek 2018-05-24 20:56 ` Marvin Häuser 0 siblings, 1 reply; 6+ messages in thread From: Laszlo Ersek @ 2018-05-24 20:51 UTC (permalink / raw) To: Jordan Justen, edk2-devel@lists.01.org, Marvin Häuser Cc: afish@apple.com On 05/24/18 22:36, Jordan Justen wrote: > Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> > > Pushed as 7dc7c7435e. > > On 2018-05-17 05:43:30, Marvin Häuser wrote: >> Currently, SmbiosLib declares the PcdLib library class. Update the >> declaration to declare SmbiosLib. >> >> V2: >> - Do not change the copyright date as requested. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> >> --- >> EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf >> index adcd7ef08e20..36d5c350f51a 100644 >> --- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf >> +++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf >> @@ -20,7 +20,7 @@ [Defines] >> FILE_GUID = 881863A2-09FD-3E44-8D62-7AE038D03747 >> MODULE_TYPE = DXE_DRIVER >> VERSION_STRING = 1.0 >> - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER >> + LIBRARY_CLASS = SmbiosLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER >> >> CONSTRUCTOR = SmbiosLibConstructor (Just because I pondered the question a few days ago, independently, I'll voice it here:) Should BaseTools catch this? "EmulatorPkg/EmulatorPkg.dsc" contains the following library resolution: SmbiosLib|EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf I think it should be possible to flag that the class of the lib instance doesn't match the lib class that the platform DSC is resolving. (Or is Marvin's patch the result of such an error message already?) Thanks! Laszlo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. 2018-05-24 20:51 ` Laszlo Ersek @ 2018-05-24 20:56 ` Marvin Häuser 2018-05-25 14:19 ` Carsey, Jaben 0 siblings, 1 reply; 6+ messages in thread From: Marvin Häuser @ 2018-05-24 20:56 UTC (permalink / raw) To: edk2-devel@lists.01.org, Laszlo Ersek Cc: afish@apple.com, jordan.l.justen@intel.com > -----Original Message----- > From: Laszlo Ersek <lersek@redhat.com> > Sent: Thursday, May 24, 2018 10:51 PM > To: Jordan Justen <jordan.l.justen@intel.com>; edk2-devel@lists.01.org; > Marvin Häuser <Marvin.Haeuser@outlook.com> > Cc: afish@apple.com > Subject: Re: [edk2] [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct > library class. > > On 05/24/18 22:36, Jordan Justen wrote: > > Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> > > > > Pushed as 7dc7c7435e. > > > > On 2018-05-17 05:43:30, Marvin Häuser wrote: > >> Currently, SmbiosLib declares the PcdLib library class. Update the > >> declaration to declare SmbiosLib. > >> > >> V2: > >> - Do not change the copyright date as requested. > >> > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> > >> --- > >> EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > >> b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > >> index adcd7ef08e20..36d5c350f51a 100644 > >> --- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > >> +++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > >> @@ -20,7 +20,7 @@ [Defines] > >> FILE_GUID = 881863A2-09FD-3E44-8D62-7AE038D03747 > >> MODULE_TYPE = DXE_DRIVER > >> VERSION_STRING = 1.0 > >> - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER > DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE > UEFI_APPLICATION UEFI_DRIVER > >> + LIBRARY_CLASS = SmbiosLib|DXE_CORE DXE_DRIVER > DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE > UEFI_APPLICATION UEFI_DRIVER > >> > >> CONSTRUCTOR = SmbiosLibConstructor > > (Just because I pondered the question a few days ago, independently, I'll > voice it here:) > > Should BaseTools catch this? "EmulatorPkg/EmulatorPkg.dsc" contains the > following library resolution: > > SmbiosLib|EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > I think it should be possible to flag that the class of the lib instance doesn't > match the lib class that the platform DSC is resolving. I think it definitely should, there is no case (known to me) where those two values diverging would be a supported or making any sense. > > (Or is Marvin's patch the result of such an error message already?) No, I was just checking the library for reference and noticed the mistake. I did not actually build EmulatorPkg though. Regards, Marvin > > Thanks! > Laszlo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. 2018-05-24 20:56 ` Marvin Häuser @ 2018-05-25 14:19 ` Carsey, Jaben 2018-05-25 15:00 ` Gao, Liming 0 siblings, 1 reply; 6+ messages in thread From: Carsey, Jaben @ 2018-05-25 14:19 UTC (permalink / raw) To: Marvin Häuser, edk2-devel@lists.01.org, Laszlo Ersek Cc: Justen, Jordan L, afish@apple.com > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Marvin Häuser > Sent: Thursday, May 24, 2018 1:57 PM > To: edk2-devel@lists.01.org; Laszlo Ersek <lersek@redhat.com> > Cc: Justen, Jordan L <jordan.l.justen@intel.com>; afish@apple.com > Subject: Re: [edk2] [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct > library class. > > > -----Original Message----- > > From: Laszlo Ersek <lersek@redhat.com> > > Sent: Thursday, May 24, 2018 10:51 PM > > To: Jordan Justen <jordan.l.justen@intel.com>; edk2-devel@lists.01.org; > > Marvin Häuser <Marvin.Haeuser@outlook.com> > > Cc: afish@apple.com > > Subject: Re: [edk2] [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct > > library class. > > > > On 05/24/18 22:36, Jordan Justen wrote: > > > Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> > > > > > > Pushed as 7dc7c7435e. > > > > > > On 2018-05-17 05:43:30, Marvin Häuser wrote: > > >> Currently, SmbiosLib declares the PcdLib library class. Update the > > >> declaration to declare SmbiosLib. > > >> > > >> V2: > > >> - Do not change the copyright date as requested. > > >> > > >> Contributed-under: TianoCore Contribution Agreement 1.1 > > >> Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> > > >> --- > > >> EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > >> b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > >> index adcd7ef08e20..36d5c350f51a 100644 > > >> --- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > >> +++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > >> @@ -20,7 +20,7 @@ [Defines] > > >> FILE_GUID = 881863A2-09FD-3E44-8D62-7AE038D03747 > > >> MODULE_TYPE = DXE_DRIVER > > >> VERSION_STRING = 1.0 > > >> - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER > > DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE > > UEFI_APPLICATION UEFI_DRIVER > > >> + LIBRARY_CLASS = SmbiosLib|DXE_CORE DXE_DRIVER > > DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE > > UEFI_APPLICATION UEFI_DRIVER > > >> > > >> CONSTRUCTOR = SmbiosLibConstructor > > > > (Just because I pondered the question a few days ago, independently, I'll > > voice it here:) > > > > Should BaseTools catch this? "EmulatorPkg/EmulatorPkg.dsc" contains the > > following library resolution: > > > > SmbiosLib|EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > > > I think it should be possible to flag that the class of the lib instance doesn't > > match the lib class that the platform DSC is resolving. > > I think it definitely should, there is no case (known to me) where those two > values diverging would be a supported or making any sense. There is a corner case: A single module with a single INF may satisfy 2 library class definitions and as such may have 2 lines. As long as we flag instances where no LIBRARY_CLASS line in the INF matches the library class in the DSC, I think a warning or error would be valid. > > > > > (Or is Marvin's patch the result of such an error message already?) > > No, I was just checking the library for reference and noticed the mistake. I > did not actually build EmulatorPkg though. > > Regards, > Marvin > > > > > Thanks! > > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. 2018-05-25 14:19 ` Carsey, Jaben @ 2018-05-25 15:00 ` Gao, Liming 0 siblings, 0 replies; 6+ messages in thread From: Gao, Liming @ 2018-05-25 15:00 UTC (permalink / raw) To: Carsey, Jaben, Marvin H?user, edk2-devel@lists.01.org, Laszlo Ersek Cc: Justen, Jordan L, afish@apple.com BaseTools has no such check before. To avoid build break, I suggest to report the warning message if library class in DSC doesn't match one in library INF [Defines] section. > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Carsey, Jaben > Sent: Friday, May 25, 2018 10:19 PM > To: Marvin Häuser <Marvin.Haeuser@outlook.com>; edk2-devel@lists.01.org; Laszlo Ersek <lersek@redhat.com> > Cc: Justen, Jordan L <jordan.l.justen@intel.com>; afish@apple.com > Subject: Re: [edk2] [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class. > > > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > Marvin Häuser > > Sent: Thursday, May 24, 2018 1:57 PM > > To: edk2-devel@lists.01.org; Laszlo Ersek <lersek@redhat.com> > > Cc: Justen, Jordan L <jordan.l.justen@intel.com>; afish@apple.com > > Subject: Re: [edk2] [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct > > library class. > > > > > -----Original Message----- > > > From: Laszlo Ersek <lersek@redhat.com> > > > Sent: Thursday, May 24, 2018 10:51 PM > > > To: Jordan Justen <jordan.l.justen@intel.com>; edk2-devel@lists.01.org; > > > Marvin Häuser <Marvin.Haeuser@outlook.com> > > > Cc: afish@apple.com > > > Subject: Re: [edk2] [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct > > > library class. > > > > > > On 05/24/18 22:36, Jordan Justen wrote: > > > > Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> > > > > > > > > Pushed as 7dc7c7435e. > > > > > > > > On 2018-05-17 05:43:30, Marvin Häuser wrote: > > > >> Currently, SmbiosLib declares the PcdLib library class. Update the > > > >> declaration to declare SmbiosLib. > > > >> > > > >> V2: > > > >> - Do not change the copyright date as requested. > > > >> > > > >> Contributed-under: TianoCore Contribution Agreement 1.1 > > > >> Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> > > > >> --- > > > >> EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf | 2 +- > > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > > >> > > > >> diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > > >> b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > > >> index adcd7ef08e20..36d5c350f51a 100644 > > > >> --- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > > >> +++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > > >> @@ -20,7 +20,7 @@ [Defines] > > > >> FILE_GUID = 881863A2-09FD-3E44-8D62-7AE038D03747 > > > >> MODULE_TYPE = DXE_DRIVER > > > >> VERSION_STRING = 1.0 > > > >> - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER > > > DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE > > > UEFI_APPLICATION UEFI_DRIVER > > > >> + LIBRARY_CLASS = SmbiosLib|DXE_CORE DXE_DRIVER > > > DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE > > > UEFI_APPLICATION UEFI_DRIVER > > > >> > > > >> CONSTRUCTOR = SmbiosLibConstructor > > > > > > (Just because I pondered the question a few days ago, independently, I'll > > > voice it here:) > > > > > > Should BaseTools catch this? "EmulatorPkg/EmulatorPkg.dsc" contains the > > > following library resolution: > > > > > > SmbiosLib|EmulatorPkg/Library/SmbiosLib/SmbiosLib.inf > > > > > > I think it should be possible to flag that the class of the lib instance doesn't > > > match the lib class that the platform DSC is resolving. > > > > I think it definitely should, there is no case (known to me) where those two > > values diverging would be a supported or making any sense. > > There is a corner case: A single module with a single INF may satisfy 2 library class definitions and as such may have 2 lines. As long as > we flag instances where no LIBRARY_CLASS line in the INF matches the library class in the DSC, I think a warning or error would be > valid. > > > > > > > > > (Or is Marvin's patch the result of such an error message already?) > > > > No, I was just checking the library for reference and noticed the mistake. I > > did not actually build EmulatorPkg though. > > > > Regards, > > Marvin > > > > > > > > Thanks! > > > Laszlo > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-25 15:01 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-05-17 12:43 [PATCH v2] EmulatorPkg/SmbiosLib: Declare the correct library class Marvin Häuser 2018-05-24 20:36 ` Jordan Justen 2018-05-24 20:51 ` Laszlo Ersek 2018-05-24 20:56 ` Marvin Häuser 2018-05-25 14:19 ` Carsey, Jaben 2018-05-25 15:00 ` Gao, Liming
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox