public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers
@ 2018-10-09 14:01 Ard Biesheuvel
  2018-10-09 15:07 ` Marcin Wojtas
  2018-10-10  8:08 ` Zeng, Star
  0 siblings, 2 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2018-10-09 14:01 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, mw, star.zeng, ruiyu.ni, Ard Biesheuvel

Currently, the implementation of EFI_PCI_IO_PROTOCOL::GetLocation()
in NonDiscoverablePciDeviceDxe returns the same set of dummy values
for each instance of the NON_DISCOVERABLE_DEVICE protocol that it
attaches itself to. However, this turns out to be causing problems
in cases where software (such as the ARM Compliance Test Suite [ACS])
attempts to use these values to uniquely identify controllers, since
the collisions create ambiguity in this regard.

So let's modify GetLocation() to return an arbitrary bus/device tuple
on segment 0xff instead. This is guaranteed not to clash with other
non-discoverable PCI devices, and highly unlikely to clash with real
PCIe devices.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c |  4 ++++
 MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c  | 10 +++++++---
 MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h  |  6 ++++++
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
index 3e9ff6620d8d..ed5256f3c7ea 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
@@ -18,6 +18,8 @@
 
 EFI_CPU_ARCH_PROTOCOL      *mCpu;
 
+STATIC UINTN mUniqueIdCounter;
+
 //
 // We only support the following device types
 //
@@ -167,6 +169,8 @@ NonDiscoverablePciDeviceStart (
     goto CloseProtocol;
   }
 
+  Dev->UniqueId = mUniqueIdCounter++;
+
   return EFI_SUCCESS;
 
 CloseProtocol:
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
index 0e42ae4bf6ec..58cb5d8b1fc5 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
@@ -1181,6 +1181,8 @@ PciIoGetLocation (
   OUT  UINTN                *FunctionNumber
   )
 {
+  NON_DISCOVERABLE_PCI_DEVICE         *Dev;
+
   if (SegmentNumber == NULL ||
       BusNumber == NULL ||
       DeviceNumber == NULL ||
@@ -1188,9 +1190,11 @@ PciIoGetLocation (
     return EFI_INVALID_PARAMETER;
   }
 
-  *SegmentNumber  = 0;
-  *BusNumber      = 0xff;
-  *DeviceNumber   = 0;
+  Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
+
+  *SegmentNumber  = 0xff;
+  *BusNumber      = Dev->UniqueId >> 5;
+  *DeviceNumber   = Dev->UniqueId & 0x1f;
   *FunctionNumber = 0;
 
   return EFI_SUCCESS;
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
index e641189267ee..5b4c57fa2a8e 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
@@ -100,6 +100,12 @@ typedef struct {
   // on behalf of this device
   //
   LIST_ENTRY                UncachedAllocationList;
+  //
+  // Unique ID for this device instance: needed so that we can report unique
+  // segment/bus/device number for each device instance. Note that this number
+  // may change when disconnecting/reconnecting the driver.
+  //
+  UINTN                     UniqueId;
 } NON_DISCOVERABLE_PCI_DEVICE;
 
 /**
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers
  2018-10-09 14:01 [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers Ard Biesheuvel
@ 2018-10-09 15:07 ` Marcin Wojtas
  2018-10-10  8:08 ` Zeng, Star
  1 sibling, 0 replies; 4+ messages in thread
From: Marcin Wojtas @ 2018-10-09 15:07 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel-01, Leif Lindholm, Zeng, Star, Ni, Ruiyu

Hi Ard,

wt., 9 paź 2018 o 16:01 Ard Biesheuvel <ard.biesheuvel@linaro.org> napisał(a):
>
> Currently, the implementation of EFI_PCI_IO_PROTOCOL::GetLocation()
> in NonDiscoverablePciDeviceDxe returns the same set of dummy values
> for each instance of the NON_DISCOVERABLE_DEVICE protocol that it
> attaches itself to. However, this turns out to be causing problems
> in cases where software (such as the ARM Compliance Test Suite [ACS])
> attempts to use these values to uniquely identify controllers, since
> the collisions create ambiguity in this regard.
>
> So let's modify GetLocation() to return an arbitrary bus/device tuple
> on segment 0xff instead. This is guaranteed not to clash with other
> non-discoverable PCI devices, and highly unlikely to clash with real
> PCIe devices.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c |  4 ++++
>  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c  | 10 +++++++---
>  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h  |  6 ++++++
>  3 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
> index 3e9ff6620d8d..ed5256f3c7ea 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
> @@ -18,6 +18,8 @@
>
>  EFI_CPU_ARCH_PROTOCOL      *mCpu;
>
> +STATIC UINTN mUniqueIdCounter;
> +
>  //
>  // We only support the following device types
>  //
> @@ -167,6 +169,8 @@ NonDiscoverablePciDeviceStart (
>      goto CloseProtocol;
>    }
>
> +  Dev->UniqueId = mUniqueIdCounter++;
> +
>    return EFI_SUCCESS;
>
>  CloseProtocol:
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> index 0e42ae4bf6ec..58cb5d8b1fc5 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> @@ -1181,6 +1181,8 @@ PciIoGetLocation (
>    OUT  UINTN                *FunctionNumber
>    )
>  {
> +  NON_DISCOVERABLE_PCI_DEVICE         *Dev;
> +
>    if (SegmentNumber == NULL ||
>        BusNumber == NULL ||
>        DeviceNumber == NULL ||
> @@ -1188,9 +1190,11 @@ PciIoGetLocation (
>      return EFI_INVALID_PARAMETER;
>    }
>
> -  *SegmentNumber  = 0;
> -  *BusNumber      = 0xff;
> -  *DeviceNumber   = 0;
> +  Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
> +
> +  *SegmentNumber  = 0xff;
> +  *BusNumber      = Dev->UniqueId >> 5;
> +  *DeviceNumber   = Dev->UniqueId & 0x1f;
>    *FunctionNumber = 0;
>
>    return EFI_SUCCESS;
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
> index e641189267ee..5b4c57fa2a8e 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
> @@ -100,6 +100,12 @@ typedef struct {
>    // on behalf of this device
>    //
>    LIST_ENTRY                UncachedAllocationList;
> +  //
> +  // Unique ID for this device instance: needed so that we can report unique
> +  // segment/bus/device number for each device instance. Note that this number
> +  // may change when disconnecting/reconnecting the driver.
> +  //
> +  UINTN                     UniqueId;
>  } NON_DISCOVERABLE_PCI_DEVICE;
>

Tested-by: Marcin Wojtas <mw@semihalf.com>

Thanks,
Marcin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers
  2018-10-09 14:01 [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers Ard Biesheuvel
  2018-10-09 15:07 ` Marcin Wojtas
@ 2018-10-10  8:08 ` Zeng, Star
  2018-10-10  8:16   ` Ard Biesheuvel
  1 sibling, 1 reply; 4+ messages in thread
From: Zeng, Star @ 2018-10-10  8:08 UTC (permalink / raw)
  To: Ard Biesheuvel, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu, Zeng, Star

Two minor comments.
1. Is it better to initialize mUniqueIdCounter to 0?
2. With this patch, the Bus value returned may be > 0xFF, right? Should the code restrict the Bus value to be <= 0xFF?


Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel
Sent: Tuesday, October 9, 2018 10:01 PM
To: edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2] [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers

Currently, the implementation of EFI_PCI_IO_PROTOCOL::GetLocation()
in NonDiscoverablePciDeviceDxe returns the same set of dummy values
for each instance of the NON_DISCOVERABLE_DEVICE protocol that it
attaches itself to. However, this turns out to be causing problems
in cases where software (such as the ARM Compliance Test Suite [ACS])
attempts to use these values to uniquely identify controllers, since
the collisions create ambiguity in this regard.

So let's modify GetLocation() to return an arbitrary bus/device tuple
on segment 0xff instead. This is guaranteed not to clash with other
non-discoverable PCI devices, and highly unlikely to clash with real
PCIe devices.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c |  4 ++++
 MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c  | 10 +++++++---
 MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h  |  6 ++++++
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
index 3e9ff6620d8d..ed5256f3c7ea 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
@@ -18,6 +18,8 @@
 
 EFI_CPU_ARCH_PROTOCOL      *mCpu;
 
+STATIC UINTN mUniqueIdCounter;
+
 //
 // We only support the following device types
 //
@@ -167,6 +169,8 @@ NonDiscoverablePciDeviceStart (
     goto CloseProtocol;
   }
 
+  Dev->UniqueId = mUniqueIdCounter++;
+
   return EFI_SUCCESS;
 
 CloseProtocol:
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
index 0e42ae4bf6ec..58cb5d8b1fc5 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
@@ -1181,6 +1181,8 @@ PciIoGetLocation (
   OUT  UINTN                *FunctionNumber
   )
 {
+  NON_DISCOVERABLE_PCI_DEVICE         *Dev;
+
   if (SegmentNumber == NULL ||
       BusNumber == NULL ||
       DeviceNumber == NULL ||
@@ -1188,9 +1190,11 @@ PciIoGetLocation (
     return EFI_INVALID_PARAMETER;
   }
 
-  *SegmentNumber  = 0;
-  *BusNumber      = 0xff;
-  *DeviceNumber   = 0;
+  Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
+
+  *SegmentNumber  = 0xff;
+  *BusNumber      = Dev->UniqueId >> 5;
+  *DeviceNumber   = Dev->UniqueId & 0x1f;
   *FunctionNumber = 0;
 
   return EFI_SUCCESS;
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
index e641189267ee..5b4c57fa2a8e 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
@@ -100,6 +100,12 @@ typedef struct {
   // on behalf of this device
   //
   LIST_ENTRY                UncachedAllocationList;
+  //
+  // Unique ID for this device instance: needed so that we can report unique
+  // segment/bus/device number for each device instance. Note that this number
+  // may change when disconnecting/reconnecting the driver.
+  //
+  UINTN                     UniqueId;
 } NON_DISCOVERABLE_PCI_DEVICE;
 
 /**
-- 
2.17.1

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers
  2018-10-10  8:08 ` Zeng, Star
@ 2018-10-10  8:16   ` Ard Biesheuvel
  0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2018-10-10  8:16 UTC (permalink / raw)
  To: Zeng, Star; +Cc: edk2-devel@lists.01.org, Ni, Ruiyu

Hi Star,

On 10 October 2018 at 10:08, Zeng, Star <star.zeng@intel.com> wrote:
> Two minor comments.
> 1. Is it better to initialize mUniqueIdCounter to 0?

The C standard guarantees that it is initialized to 0 so this is unnecessary

> 2. With this patch, the Bus value returned may be > 0xFF, right? Should the code restrict the Bus value to be <= 0xFF?
>

That will happen if we register more than 32 * 256 == 8192
non-discoverable PCI devices. That is unlikely ever to occur, but it
makes sense to add an ASSERT for it and return an error, I suppose.

I will change that.

>
> Thanks,
> Star
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel
> Sent: Tuesday, October 9, 2018 10:01 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers
>
> Currently, the implementation of EFI_PCI_IO_PROTOCOL::GetLocation()
> in NonDiscoverablePciDeviceDxe returns the same set of dummy values
> for each instance of the NON_DISCOVERABLE_DEVICE protocol that it
> attaches itself to. However, this turns out to be causing problems
> in cases where software (such as the ARM Compliance Test Suite [ACS])
> attempts to use these values to uniquely identify controllers, since
> the collisions create ambiguity in this regard.
>
> So let's modify GetLocation() to return an arbitrary bus/device tuple
> on segment 0xff instead. This is guaranteed not to clash with other
> non-discoverable PCI devices, and highly unlikely to clash with real
> PCIe devices.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c |  4 ++++
>  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c  | 10 +++++++---
>  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h  |  6 ++++++
>  3 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
> index 3e9ff6620d8d..ed5256f3c7ea 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
> @@ -18,6 +18,8 @@
>
>  EFI_CPU_ARCH_PROTOCOL      *mCpu;
>
> +STATIC UINTN mUniqueIdCounter;
> +
>  //
>  // We only support the following device types
>  //
> @@ -167,6 +169,8 @@ NonDiscoverablePciDeviceStart (
>      goto CloseProtocol;
>    }
>
> +  Dev->UniqueId = mUniqueIdCounter++;
> +
>    return EFI_SUCCESS;
>
>  CloseProtocol:
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> index 0e42ae4bf6ec..58cb5d8b1fc5 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> @@ -1181,6 +1181,8 @@ PciIoGetLocation (
>    OUT  UINTN                *FunctionNumber
>    )
>  {
> +  NON_DISCOVERABLE_PCI_DEVICE         *Dev;
> +
>    if (SegmentNumber == NULL ||
>        BusNumber == NULL ||
>        DeviceNumber == NULL ||
> @@ -1188,9 +1190,11 @@ PciIoGetLocation (
>      return EFI_INVALID_PARAMETER;
>    }
>
> -  *SegmentNumber  = 0;
> -  *BusNumber      = 0xff;
> -  *DeviceNumber   = 0;
> +  Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
> +
> +  *SegmentNumber  = 0xff;
> +  *BusNumber      = Dev->UniqueId >> 5;
> +  *DeviceNumber   = Dev->UniqueId & 0x1f;
>    *FunctionNumber = 0;
>
>    return EFI_SUCCESS;
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
> index e641189267ee..5b4c57fa2a8e 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h
> @@ -100,6 +100,12 @@ typedef struct {
>    // on behalf of this device
>    //
>    LIST_ENTRY                UncachedAllocationList;
> +  //
> +  // Unique ID for this device instance: needed so that we can report unique
> +  // segment/bus/device number for each device instance. Note that this number
> +  // may change when disconnecting/reconnecting the driver.
> +  //
> +  UINTN                     UniqueId;
>  } NON_DISCOVERABLE_PCI_DEVICE;
>
>  /**
> --
> 2.17.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-10  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09 14:01 [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers Ard Biesheuvel
2018-10-09 15:07 ` Marcin Wojtas
2018-10-10  8:08 ` Zeng, Star
2018-10-10  8:16   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox