Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-14 Thread Vijayenthiran Subramaniam
On Fri, Dec 14, 2018 at 8:26 PM Ard Biesheuvel
 wrote:
>
> On Tue, 11 Dec 2018 at 10:08, Vijayenthiran Subramaniam
>  wrote:
> >
> > On Fri, Dec 7, 2018 at 5:49 AM Vijayenthiran Subramaniam
> >  wrote:
> > >
> > > On Thu, Dec 6, 2018 at 5:18 PM Ard Biesheuvel  
> > > wrote:
> > > >
> > > > On Wed, 5 Dec 2018 at 07:10, Vijayenthiran Subramaniam
> > > >  wrote:
> > > > >
> > > > > Hi Ard,
> > > > >
> > > > > The virtio block device and virtio network device are available in 
> > > > > software model only. As of now, it exposes only one instance of each 
> > > > > device.
> > > > >
> > > >
> > > > Are the virtio devices described by the device tree obtained from the
> > > > secure firmware?
> > >
> > > No. The device tree from secure firmware does not carry any devices
> > > information other than platform/config id.
> > >
> >
> > Please let me know if there are any further comments on this patch
> > series. Otherwise, requesting to review the series and merge.
> >
>
> Please rebase the series against latest edk2-platforms, and I will do
> the final review (and merge)

Sure. Will post the series as v2 after rebasing.

Thanks,
Vijayenthiran.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-14 Thread Ard Biesheuvel
On Tue, 11 Dec 2018 at 10:08, Vijayenthiran Subramaniam
 wrote:
>
> On Fri, Dec 7, 2018 at 5:49 AM Vijayenthiran Subramaniam
>  wrote:
> >
> > On Thu, Dec 6, 2018 at 5:18 PM Ard Biesheuvel  
> > wrote:
> > >
> > > On Wed, 5 Dec 2018 at 07:10, Vijayenthiran Subramaniam
> > >  wrote:
> > > >
> > > > Hi Ard,
> > > >
> > > > The virtio block device and virtio network device are available in 
> > > > software model only. As of now, it exposes only one instance of each 
> > > > device.
> > > >
> > >
> > > Are the virtio devices described by the device tree obtained from the
> > > secure firmware?
> >
> > No. The device tree from secure firmware does not carry any devices
> > information other than platform/config id.
> >
>
> Please let me know if there are any further comments on this patch
> series. Otherwise, requesting to review the series and merge.
>

Please rebase the series against latest edk2-platforms, and I will do
the final review (and merge)

> > >
> > > > On Tue, Dec 4, 2018 at 8:16 PM Ard Biesheuvel 
> > > >  wrote:
> > > >>
> > > >> On Tue, 4 Dec 2018 at 10:12, Vijayenthiran Subramaniam
> > > >>  wrote:
> > > >> >
> > > >> > From: Daniil Egranov 
> > > >> >
> > > >> > SGI platforms support multiple virtio devices. So the existing code, 
> > > >> > that
> > > >> > supports registration of only the virtio disk, is restructured to
> > > >> > accommodate the registration of additional virtio devices.
> > > >> >
> > > >> > In addition to this, PCDs to represent the virtio controller base and
> > > >> > address space size are introduced.
> > > >> >
> > > >> > Contributed-under: TianoCore Contribution Agreement 1.1
> > > >> > Signed-off-by: Daniil Egranov 
> > > >> > ---
> > > >> >  Platform/ARM/SgiPkg/SgiPlatform.dec 
> > > >> >  |  8 ++-
> > > >> >  Platform/ARM/SgiPkg/SgiPlatform.dsc 
> > > >> >  |  7 +-
> > > >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
> > > >> >  |  8 ++-
> > > >> >  Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h  
> > > >> >  | 21 ++
> > > >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   
> > > >> >  | 14 +---
> > > >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c => 
> > > >> > VirtioDevices.c} | 67 
> > > >> >  6 files changed, 81 insertions(+), 44 deletions(-)
> > > >> >
> > > >>
> > > >> Can these platforms only ever expose a single block device and a
> > > >> single network device?
> > > >>
> > > >> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
> > > >> > b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > > >> > index f6e0ba1e927a..ed29a4d5d91f 100644
> > > >> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> > > >> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > > >> > @@ -37,12 +37,16 @@ [Guids.common]
> > > >> >gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, 
> > > >> > { 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
> > > >> >
> > > >> >  [PcdsFeatureFlag.common]
> > > >> > -  # Set this PCD to TRUE to enable virtio support.
> > > >> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
> > > >> > +  
> > > >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
> > > >> >
> > > >> >  [PcdsFixedAtBuild]
> > > >> >gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
> > > >> >gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
> > > >> >
> > > >> > +  # Virtio Block device
> > > >> > +  
> > > >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
> > > >> > +  
> > > >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
> > > >> > +  
> > > >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
> > > >> > +
> > > >> >  [Ppis]
> > > >> >gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 
> > > >> > 0xa8, 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
> > > >> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
> > > >> > b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > >> > index b3f76d2d9720..ada72be72f8a 100644
> > > >> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > >> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > > >> > @@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER, 
> > > >> > LibraryClasses.common.UEFI_APPLICATION, Libr
> > > >> >  
> > > >> > 
> > > >> >
> > > >> >  [PcdsFeatureFlag.common]
> > > >> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
> > > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
> > > >> >
> > > >> >  [PcdsFixedAtBuild.common]
> > > >> >gArmTokenSpaceGuid.PcdVFPEnabled|1
> > > >> > @@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
> > > >> ># Ethernet
> > > >> >gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
> > > >> >
> > > >> > +  # Virtio Disk
> > > >> > +  

Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-11 Thread Vijayenthiran Subramaniam
On Fri, Dec 7, 2018 at 5:49 AM Vijayenthiran Subramaniam
 wrote:
>
> On Thu, Dec 6, 2018 at 5:18 PM Ard Biesheuvel  
> wrote:
> >
> > On Wed, 5 Dec 2018 at 07:10, Vijayenthiran Subramaniam
> >  wrote:
> > >
> > > Hi Ard,
> > >
> > > The virtio block device and virtio network device are available in 
> > > software model only. As of now, it exposes only one instance of each 
> > > device.
> > >
> >
> > Are the virtio devices described by the device tree obtained from the
> > secure firmware?
>
> No. The device tree from secure firmware does not carry any devices
> information other than platform/config id.
>

Please let me know if there are any further comments on this patch
series. Otherwise, requesting to review the series and merge.

> >
> > > On Tue, Dec 4, 2018 at 8:16 PM Ard Biesheuvel  
> > > wrote:
> > >>
> > >> On Tue, 4 Dec 2018 at 10:12, Vijayenthiran Subramaniam
> > >>  wrote:
> > >> >
> > >> > From: Daniil Egranov 
> > >> >
> > >> > SGI platforms support multiple virtio devices. So the existing code, 
> > >> > that
> > >> > supports registration of only the virtio disk, is restructured to
> > >> > accommodate the registration of additional virtio devices.
> > >> >
> > >> > In addition to this, PCDs to represent the virtio controller base and
> > >> > address space size are introduced.
> > >> >
> > >> > Contributed-under: TianoCore Contribution Agreement 1.1
> > >> > Signed-off-by: Daniil Egranov 
> > >> > ---
> > >> >  Platform/ARM/SgiPkg/SgiPlatform.dec   
> > >> >|  8 ++-
> > >> >  Platform/ARM/SgiPkg/SgiPlatform.dsc   
> > >> >|  7 +-
> > >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf   
> > >> >|  8 ++-
> > >> >  Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
> > >> >| 21 ++
> > >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c 
> > >> >| 14 +---
> > >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c => 
> > >> > VirtioDevices.c} | 67 
> > >> >  6 files changed, 81 insertions(+), 44 deletions(-)
> > >> >
> > >>
> > >> Can these platforms only ever expose a single block device and a
> > >> single network device?
> > >>
> > >> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
> > >> > b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > >> > index f6e0ba1e927a..ed29a4d5d91f 100644
> > >> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> > >> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > >> > @@ -37,12 +37,16 @@ [Guids.common]
> > >> >gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 
> > >> > 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
> > >> >
> > >> >  [PcdsFeatureFlag.common]
> > >> > -  # Set this PCD to TRUE to enable virtio support.
> > >> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
> > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
> > >> >
> > >> >  [PcdsFixedAtBuild]
> > >> >gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
> > >> >gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
> > >> >
> > >> > +  # Virtio Block device
> > >> > +  
> > >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
> > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
> > >> > +  
> > >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
> > >> > +
> > >> >  [Ppis]
> > >> >gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 
> > >> > 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
> > >> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
> > >> > b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > >> > index b3f76d2d9720..ada72be72f8a 100644
> > >> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > >> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > >> > @@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER, 
> > >> > LibraryClasses.common.UEFI_APPLICATION, Libr
> > >> >  
> > >> > 
> > >> >
> > >> >  [PcdsFeatureFlag.common]
> > >> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
> > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
> > >> >
> > >> >  [PcdsFixedAtBuild.common]
> > >> >gArmTokenSpaceGuid.PcdVFPEnabled|1
> > >> > @@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
> > >> ># Ethernet
> > >> >gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
> > >> >
> > >> > +  # Virtio Disk
> > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c13
> > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x1
> > >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
> > >> > +
> > >> >  
> > >> > 
> > >> >  #
> > >> >  # Components Section - list of all EDK II Modules needed by this 
> > >> > Platform
> > >> > diff --git 

Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-06 Thread Vijayenthiran Subramaniam
On Thu, Dec 6, 2018 at 5:18 PM Ard Biesheuvel  wrote:
>
> On Wed, 5 Dec 2018 at 07:10, Vijayenthiran Subramaniam
>  wrote:
> >
> > Hi Ard,
> >
> > The virtio block device and virtio network device are available in software 
> > model only. As of now, it exposes only one instance of each device.
> >
>
> Are the virtio devices described by the device tree obtained from the
> secure firmware?

No. The device tree from secure firmware does not carry any devices
information other than platform/config id.

>
> > On Tue, Dec 4, 2018 at 8:16 PM Ard Biesheuvel  
> > wrote:
> >>
> >> On Tue, 4 Dec 2018 at 10:12, Vijayenthiran Subramaniam
> >>  wrote:
> >> >
> >> > From: Daniil Egranov 
> >> >
> >> > SGI platforms support multiple virtio devices. So the existing code, that
> >> > supports registration of only the virtio disk, is restructured to
> >> > accommodate the registration of additional virtio devices.
> >> >
> >> > In addition to this, PCDs to represent the virtio controller base and
> >> > address space size are introduced.
> >> >
> >> > Contributed-under: TianoCore Contribution Agreement 1.1
> >> > Signed-off-by: Daniil Egranov 
> >> > ---
> >> >  Platform/ARM/SgiPkg/SgiPlatform.dec 
> >> >  |  8 ++-
> >> >  Platform/ARM/SgiPkg/SgiPlatform.dsc 
> >> >  |  7 +-
> >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
> >> >  |  8 ++-
> >> >  Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h  
> >> >  | 21 ++
> >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   
> >> >  | 14 +---
> >> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c => 
> >> > VirtioDevices.c} | 67 
> >> >  6 files changed, 81 insertions(+), 44 deletions(-)
> >> >
> >>
> >> Can these platforms only ever expose a single block device and a
> >> single network device?
> >>
> >> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
> >> > b/Platform/ARM/SgiPkg/SgiPlatform.dec
> >> > index f6e0ba1e927a..ed29a4d5d91f 100644
> >> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> >> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> >> > @@ -37,12 +37,16 @@ [Guids.common]
> >> >gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 
> >> > 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
> >> >
> >> >  [PcdsFeatureFlag.common]
> >> > -  # Set this PCD to TRUE to enable virtio support.
> >> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
> >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
> >> >
> >> >  [PcdsFixedAtBuild]
> >> >gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
> >> >gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
> >> >
> >> > +  # Virtio Block device
> >> > +  
> >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
> >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
> >> > +  
> >> > gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
> >> > +
> >> >  [Ppis]
> >> >gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 
> >> > 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
> >> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
> >> > b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> >> > index b3f76d2d9720..ada72be72f8a 100644
> >> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> >> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> >> > @@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER, 
> >> > LibraryClasses.common.UEFI_APPLICATION, Libr
> >> >  
> >> > 
> >> >
> >> >  [PcdsFeatureFlag.common]
> >> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
> >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
> >> >
> >> >  [PcdsFixedAtBuild.common]
> >> >gArmTokenSpaceGuid.PcdVFPEnabled|1
> >> > @@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
> >> ># Ethernet
> >> >gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
> >> >
> >> > +  # Virtio Disk
> >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c13
> >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x1
> >> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
> >> > +
> >> >  
> >> > 
> >> >  #
> >> >  # Components Section - list of all EDK II Modules needed by this 
> >> > Platform
> >> > diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
> >> > b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> >> > index d903ed8d3375..f920f6ecafb8 100644
> >> > --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> >> > +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> >> > @@ -20,7 +20,7 @@ [Defines]
> >> >
> >> >  [Sources.common]
> >> >PlatformDxe.c
> >> > -  VirtioBlockIo.c
> >> > +  

Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-06 Thread Ard Biesheuvel
On Wed, 5 Dec 2018 at 07:10, Vijayenthiran Subramaniam
 wrote:
>
> Hi Ard,
>
> The virtio block device and virtio network device are available in software 
> model only. As of now, it exposes only one instance of each device.
>

Are the virtio devices described by the device tree obtained from the
secure firmware?

> On Tue, Dec 4, 2018 at 8:16 PM Ard Biesheuvel  
> wrote:
>>
>> On Tue, 4 Dec 2018 at 10:12, Vijayenthiran Subramaniam
>>  wrote:
>> >
>> > From: Daniil Egranov 
>> >
>> > SGI platforms support multiple virtio devices. So the existing code, that
>> > supports registration of only the virtio disk, is restructured to
>> > accommodate the registration of additional virtio devices.
>> >
>> > In addition to this, PCDs to represent the virtio controller base and
>> > address space size are introduced.
>> >
>> > Contributed-under: TianoCore Contribution Agreement 1.1
>> > Signed-off-by: Daniil Egranov 
>> > ---
>> >  Platform/ARM/SgiPkg/SgiPlatform.dec   
>> >|  8 ++-
>> >  Platform/ARM/SgiPkg/SgiPlatform.dsc   
>> >|  7 +-
>> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf   
>> >|  8 ++-
>> >  Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
>> >| 21 ++
>> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c 
>> >| 14 +---
>> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c => 
>> > VirtioDevices.c} | 67 
>> >  6 files changed, 81 insertions(+), 44 deletions(-)
>> >
>>
>> Can these platforms only ever expose a single block device and a
>> single network device?
>>
>> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
>> > b/Platform/ARM/SgiPkg/SgiPlatform.dec
>> > index f6e0ba1e927a..ed29a4d5d91f 100644
>> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
>> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
>> > @@ -37,12 +37,16 @@ [Guids.common]
>> >gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 
>> > 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
>> >
>> >  [PcdsFeatureFlag.common]
>> > -  # Set this PCD to TRUE to enable virtio support.
>> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
>> >
>> >  [PcdsFixedAtBuild]
>> >gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
>> >gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
>> >
>> > +  # Virtio Block device
>> > +  
>> > gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
>> > +
>> >  [Ppis]
>> >gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 
>> > 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
>> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
>> > b/Platform/ARM/SgiPkg/SgiPlatform.dsc
>> > index b3f76d2d9720..ada72be72f8a 100644
>> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
>> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
>> > @@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER, 
>> > LibraryClasses.common.UEFI_APPLICATION, Libr
>> >  
>> > 
>> >
>> >  [PcdsFeatureFlag.common]
>> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
>> >
>> >  [PcdsFixedAtBuild.common]
>> >gArmTokenSpaceGuid.PcdVFPEnabled|1
>> > @@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
>> ># Ethernet
>> >gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
>> >
>> > +  # Virtio Disk
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c13
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x1
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
>> > +
>> >  
>> > 
>> >  #
>> >  # Components Section - list of all EDK II Modules needed by this Platform
>> > diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
>> > b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> > index d903ed8d3375..f920f6ecafb8 100644
>> > --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> > +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> > @@ -20,7 +20,7 @@ [Defines]
>> >
>> >  [Sources.common]
>> >PlatformDxe.c
>> > -  VirtioBlockIo.c
>> > +  VirtioDevices.c
>> >
>> >  [Packages]
>> >EmbeddedPkg/EmbeddedPkg.dec
>> > @@ -41,7 +41,11 @@ [Guids]
>> >gSgiClarkHeliosAcpiTablesFileGuid
>> >
>> >  [FeaturePcd]
>> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
>> > +
>> > +[FixedPcd]
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
>> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
>> >
>> >  [Depex]
>> >

Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-04 Thread Vijayenthiran Subramaniam
Hi Ard,

The virtio block device and virtio network device are available in software
model only. As of now, it exposes only one instance of each device.

On Tue, Dec 4, 2018 at 8:16 PM Ard Biesheuvel 
wrote:

> On Tue, 4 Dec 2018 at 10:12, Vijayenthiran Subramaniam
>  wrote:
> >
> > From: Daniil Egranov 
> >
> > SGI platforms support multiple virtio devices. So the existing code, that
> > supports registration of only the virtio disk, is restructured to
> > accommodate the registration of additional virtio devices.
> >
> > In addition to this, PCDs to represent the virtio controller base and
> > address space size are introduced.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Daniil Egranov 
> > ---
> >  Platform/ARM/SgiPkg/SgiPlatform.dec
>   |  8 ++-
> >  Platform/ARM/SgiPkg/SgiPlatform.dsc
>   |  7 +-
> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>   |  8 ++-
> >  Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
>  | 21 ++
> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
>   | 14 +---
> >  Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c =>
> VirtioDevices.c} | 67 
> >  6 files changed, 81 insertions(+), 44 deletions(-)
> >
>
> Can these platforms only ever expose a single block device and a
> single network device?
>
> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec
> b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > index f6e0ba1e927a..ed29a4d5d91f 100644
> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> > @@ -37,12 +37,16 @@ [Guids.common]
> >gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, {
> 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
> >
> >  [PcdsFeatureFlag.common]
> > -  # Set this PCD to TRUE to enable virtio support.
> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
> >
> >  [PcdsFixedAtBuild]
> >gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
> >gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
> >
> > +  # Virtio Block device
> > +
> gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
> > +
> gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
> > +
> >  [Ppis]
> >gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8,
> 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
> > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > index b3f76d2d9720..ada72be72f8a 100644
> > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> > @@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER,
> LibraryClasses.common.UEFI_APPLICATION, Libr
> >
> 
> >
> >  [PcdsFeatureFlag.common]
> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
> >
> >  [PcdsFixedAtBuild.common]
> >gArmTokenSpaceGuid.PcdVFPEnabled|1
> > @@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
> ># Ethernet
> >gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
> >
> > +  # Virtio Disk
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c13
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x1
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
> > +
> >
> 
> >  #
> >  # Components Section - list of all EDK II Modules needed by this
> Platform
> > diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> > index d903ed8d3375..f920f6ecafb8 100644
> > --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> > +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> > @@ -20,7 +20,7 @@ [Defines]
> >
> >  [Sources.common]
> >PlatformDxe.c
> > -  VirtioBlockIo.c
> > +  VirtioDevices.c
> >
> >  [Packages]
> >EmbeddedPkg/EmbeddedPkg.dec
> > @@ -41,7 +41,11 @@ [Guids]
> >gSgiClarkHeliosAcpiTablesFileGuid
> >
> >  [FeaturePcd]
> > -  gArmSgiTokenSpaceGuid.PcdVirtioSupported
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
> > +
> > +[FixedPcd]
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
> > +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
> >
> >  [Depex]
> >TRUE
> > diff --git a/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
> b/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
> > new file mode 100644
> > index ..80d3e3ae4f91
> > --- /dev/null
> > +++ b/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
> > @@ -0,0 +1,21 @@
> > +/** @file
> > +*
> > +*  Copyright (c) 2018, ARM Limited. All rights reserved.
> > +*
> > +*  This program and the 

Re: [edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-04 Thread Ard Biesheuvel
On Tue, 4 Dec 2018 at 10:12, Vijayenthiran Subramaniam
 wrote:
>
> From: Daniil Egranov 
>
> SGI platforms support multiple virtio devices. So the existing code, that
> supports registration of only the virtio disk, is restructured to
> accommodate the registration of additional virtio devices.
>
> In addition to this, PCDs to represent the virtio controller base and
> address space size are introduced.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Daniil Egranov 
> ---
>  Platform/ARM/SgiPkg/SgiPlatform.dec  
> |  8 ++-
>  Platform/ARM/SgiPkg/SgiPlatform.dsc  
> |  7 +-
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf  
> |  8 ++-
>  Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h   
> | 21 ++
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
> | 14 +---
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c => VirtioDevices.c} 
> | 67 
>  6 files changed, 81 insertions(+), 44 deletions(-)
>

Can these platforms only ever expose a single block device and a
single network device?

> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
> b/Platform/ARM/SgiPkg/SgiPlatform.dec
> index f6e0ba1e927a..ed29a4d5d91f 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
> @@ -37,12 +37,16 @@ [Guids.common]
>gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 
> 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
>
>  [PcdsFeatureFlag.common]
> -  # Set this PCD to TRUE to enable virtio support.
> -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
>
>  [PcdsFixedAtBuild]
>gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
>gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
>
> +  # Virtio Block device
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
> +
>  [Ppis]
>gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0x9b, 
> 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
> diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
> b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> index b3f76d2d9720..ada72be72f8a 100644
> --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
> +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
> @@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER, 
> LibraryClasses.common.UEFI_APPLICATION, Libr
>  
> 
>
>  [PcdsFeatureFlag.common]
> -  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
>
>  [PcdsFixedAtBuild.common]
>gArmTokenSpaceGuid.PcdVFPEnabled|1
> @@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
># Ethernet
>gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
>
> +  # Virtio Disk
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c13
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x1
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
> +
>  
> 
>  #
>  # Components Section - list of all EDK II Modules needed by this Platform
> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
> b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> index d903ed8d3375..f920f6ecafb8 100644
> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
> @@ -20,7 +20,7 @@ [Defines]
>
>  [Sources.common]
>PlatformDxe.c
> -  VirtioBlockIo.c
> +  VirtioDevices.c
>
>  [Packages]
>EmbeddedPkg/EmbeddedPkg.dec
> @@ -41,7 +41,11 @@ [Guids]
>gSgiClarkHeliosAcpiTablesFileGuid
>
>  [FeaturePcd]
> -  gArmSgiTokenSpaceGuid.PcdVirtioSupported
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
> +
> +[FixedPcd]
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
> +  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
>
>  [Depex]
>TRUE
> diff --git a/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h 
> b/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
> new file mode 100644
> index ..80d3e3ae4f91
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
> @@ -0,0 +1,21 @@
> +/** @file
> +*
> +*  Copyright (c) 2018, ARM Limited. All rights reserved.
> +*
> +*  This program and the accompanying materials are licensed and made 
> available
> +*  under the terms and conditions of the BSD License which accompanies this
> +*  distribution. The full text of the license may be found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE 

[edk2] [PATCH v1 edk2-platforms 1/8] Platform/ARM/SgiPkg: Restructure virtio device registration

2018-12-04 Thread Vijayenthiran Subramaniam
From: Daniil Egranov 

SGI platforms support multiple virtio devices. So the existing code, that
supports registration of only the virtio disk, is restructured to
accommodate the registration of additional virtio devices.

In addition to this, PCDs to represent the virtio controller base and
address space size are introduced.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Daniil Egranov 
---
 Platform/ARM/SgiPkg/SgiPlatform.dec  | 
 8 ++-
 Platform/ARM/SgiPkg/SgiPlatform.dsc  | 
 7 +-
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf  | 
 8 ++-
 Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h   | 
21 ++
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c| 
14 +---
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/{VirtioBlockIo.c => VirtioDevices.c} | 
67 
 6 files changed, 81 insertions(+), 44 deletions(-)

diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec 
b/Platform/ARM/SgiPkg/SgiPlatform.dec
index f6e0ba1e927a..ed29a4d5d91f 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -37,12 +37,16 @@ [Guids.common]
   gSgiClarkHeliosAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 
0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
 
 [PcdsFeatureFlag.common]
-  # Set this PCD to TRUE to enable virtio support.
-  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x0001
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x0001
 
 [PcdsFixedAtBuild]
   gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x0002
   gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x0003
 
+  # Virtio Block device
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x|UINT32|0x0004
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x|UINT32|0x0005
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|0x|UINT32|0x0006
+
 [Ppis]
   gHwConfigDtInfoPpiGuid = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0x9b, 
0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc 
b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index b3f76d2d9720..ada72be72f8a 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -98,7 +98,7 @@ [LibraryClasses.common.UEFI_DRIVER, 
LibraryClasses.common.UEFI_APPLICATION, Libr
 

 
 [PcdsFeatureFlag.common]
-  gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE
 
 [PcdsFixedAtBuild.common]
   gArmTokenSpaceGuid.PcdVFPEnabled|1
@@ -180,6 +180,11 @@ [PcdsFixedAtBuild.common]
   # Ethernet
   gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1800
 
+  # Virtio Disk
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c13
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x1
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
+
 

 #
 # Components Section - list of all EDK II Modules needed by this Platform
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
index d903ed8d3375..f920f6ecafb8 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
@@ -20,7 +20,7 @@ [Defines]
 
 [Sources.common]
   PlatformDxe.c
-  VirtioBlockIo.c
+  VirtioDevices.c
 
 [Packages]
   EmbeddedPkg/EmbeddedPkg.dec
@@ -41,7 +41,11 @@ [Guids]
   gSgiClarkHeliosAcpiTablesFileGuid
 
 [FeaturePcd]
-  gArmSgiTokenSpaceGuid.PcdVirtioSupported
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
+
+[FixedPcd]
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
 
 [Depex]
   TRUE
diff --git a/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h 
b/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
new file mode 100644
index ..80d3e3ae4f91
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Include/Guid/SgiVirtioDevicesFormSet.h
@@ -0,0 +1,21 @@
+/** @file
+*
+*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution. The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
+**/
+
+#ifndef  __SGI_VIRTIO_DEVICES_FORMSET_H__
+#define  __SGI_VIRTIO_DEVICES_FORMSET_H__
+
+#define SGI_VIRTIO_BLOCK_GUID  \
+  { 0x5a96cdcd, 0x6116, 0x4929, { 0xb7, 0x01, 0x3a, 0xc2, 0xfb, 0x1c, 0xe2, 
0x28 } }
+
+#endif
diff --git