On 21 March 2016 at 10:44, Laszlo Ersek <ler...@redhat.com> wrote:
> On 03/21/16 10:33, Ard Biesheuvel wrote:
>> On 14 March 2016 at 13:52, Laszlo Ersek <ler...@redhat.com> wrote:
>>> The explanation is in the patch titled
>>>
>>>   OvmfPkg: introduce gRootBusesConnectedProtocolGuid
>>>
>>> At this point, this protocol doesn't do anything yet.
>>>
>>> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
>>> Cc: Gerd Hoffmann <kra...@redhat.com>
>>> Cc: Jordan Justen <jordan.l.jus...@intel.com>
>>> Cc: Marcel Apfelbaum <mar...@redhat.com>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Laszlo Ersek <ler...@redhat.com>
>>> ---
>>>  ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf |  1 +
>>>  ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c      | 11 
>>> +++++++++++
>>>  2 files changed, 12 insertions(+)
>>>
>>> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf 
>>> b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
>>> index 79ba7b2afbf7..bc0eab100319 100644
>>> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
>>> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
>>> @@ -74,7 +74,8 @@ [Guids]
>>>
>>>  [Protocols]
>>>    gEfiDevicePathProtocolGuid
>>>    gEfiGraphicsOutputProtocolGuid
>>>    gEfiLoadedImageProtocolGuid
>>>    gEfiPciRootBridgeIoProtocolGuid
>>>    gEfiSimpleFileSystemProtocolGuid
>>> +  gRootBusesConnectedProtocolGuid
>>> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c 
>>> b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
>>> index b242a293a103..c8acfb1e86a6 100644
>>> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
>>> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
>>> @@ -21,14 +21,15 @@
>>>  #include <Library/PlatformBdsLib.h>
>>>  #include <Library/QemuBootOrderLib.h>
>>>  #include <Protocol/DevicePath.h>
>>>  #include <Protocol/GraphicsOutput.h>
>>>  #include <Protocol/PciIo.h>
>>>  #include <Protocol/PciRootBridgeIo.h>
>>>  #include <Guid/EventGroup.h>
>>> +#include <Protocol/RootBusesConnected.h>
>>
>> As noted in response to 1/5, if you only ever refer to the guid by its
>> name 'gEfiPciRootBridgeIoProtocolGuid', I don't think this header is
>> necessary.
>
> I think the argument you cited for 1/5 is not correct.
>
> Even if it was, it would break away from existing practice. So I'd like
> to see a reference to that argument (and to the agreement that edk2 in
> general will adopt that pattern going forward).
>

I don't care deeply about this, so I am not going to debate this any
further. IIRC it was mentioned to me in a session between some ARM
engineers, myself and Eugene Cohem, whom I think was the person
mentioning this (I could be wrong, though)

In general, including the file allows you to get away with using these
GUIDs without declaring your dependency upon them in the .INF. As to
your point regarding static initializers, I suppose that indeed still
required a header file of the sort you are introducing here. So my
point pertains to the extern symbol declaration only, which is
arguably redundant under EDK2.

But by all means, let's decouple this from the review of this series.

-- 
Ard.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to