Re: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH] MdePkg/Protocols: New interface, EFI encodings to PCI Plat protocol

2019-07-25 Thread Javeed, Ashraf
Sure Liming!

Thanks
Ashraf

> -Original Message-
> From: Gao, Liming
> Sent: Thursday, July 25, 2019 7:15 PM
> To: devel@edk2.groups.io; Javeed, Ashraf 
> Cc: Kinney, Michael D ; Ni, Ray
> 
> Subject: RE: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH]
> MdePkg/Protocols: New interface, EFI encodings to PCI Plat protocol
> 
> Ashraf:
>   These two protocols are new added. They are not defined in current PI spec.
>   Can you update file header to remove below comments?
> 
> > +  This Protocol is defined in UEFI Platform Initialization
> > + Specification 1.2  Volume 5: Standards
> 
> Thanks
> Liming
> > -Original Message-
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Javeed, Ashraf
> > Sent: Friday, July 19, 2019 11:00 PM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D ; Gao, Liming
> > ; Ni, Ray 
> > Subject: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH]
> > MdePkg/Protocols: New interface, EFI encodings to PCI Plat protocol
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1954
> > New interface added to PCI Platform Protocol / PCI Override Protocol
> > to retrieve device-specific platform policy for the following PCI
> > standard features, like Maximum Payload Size (MPS), Maximum Read
> > Request Size (MRRS),Extended Tags, Relax Order, No-Snoop, Active State
> > Power Management (ASPM),Latency Time Reporting (LTR), AtomicOp,
> > Reference Clock Configuration, Extended SYNCH, PTM support, and
> Completion Timeout (CTO).
> > New source files added with enhanced definitions are in:
> > MdePkg/Include/Protocol/PciPlatform2.h,
> > MdePkg/Include/Protocol/PciOverride2.h
> >
> > Repository:
> > https://github.com/ashrafj/edk2-staging/tree/UEFI_PCI_ENHANCE-2
> >
> > Signed-off-by: Ashraf Javeed 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Ray Ni 
> > ---
> >  MdePkg/Include/Protocol/PciOverride2.h |  46
> > ++
> >  MdePkg/Include/Protocol/PciPlatform2.h | 396
> >
> +
> +
> >
> +
> +
> >
> +
> +
> > ++
> >  MdePkg/MdePkg.dec  |   6 ++
> >  3 files changed, 448 insertions(+)
> >
> > diff --git a/MdePkg/Include/Protocol/PciOverride2.h
> > b/MdePkg/Include/Protocol/PciOverride2.h
> > new file mode 100644
> > index 00..cf452d9f8f
> > --- /dev/null
> > +++ b/MdePkg/Include/Protocol/PciOverride2.h
> > @@ -0,0 +1,46 @@
> > +/** @file
> > +  This file declares EFI PCI Override protocol which provides the
> > +interface between
> > +  the PCI bus driver/PCI Host Bridge Resource Allocation driver and
> > +an implementation's
> > +  driver to describe the unique features of a platform.
> > +  This protocol is optional.
> > +
> > +  Copyright (c) 2019, Intel Corporation. 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.
> > +
> > +  @par Revision Reference:
> > +  This Protocol is defined in UEFI Platform Initialization
> > + Specification 1.2  Volume 5: Standards
> > +
> > +**/
> > +
> > +#ifndef _PCI_OVERRIDE2_H_
> > +#define _PCI_OVERRIDE2_H_
> > +
> > +///
> > +/// EFI_PCI_OVERRIDE_PROTOCOL has the same structure with
> > +EFI_PCI_PLATFORM_PROTOCOL /// #include 
> > +
> > +///
> > +/// Global ID for the EFI_PCI_OVERRIDE_PROTOCOL /// #define
> > +EFI_PCI_OVERRIDE2_GUID \
> > +  { \
> > +0xb9d5ea1, 0x66cb, 0x4546, {0xb0, 0xbb, 0x5c, 0x6d, 0xae, 0xd9,
> > +0x42, 0x47} \
> > +  }
> > +
> > +///
> > +/// Declaration for EFI_PCI_OVERRIDE_PROTOCOL /// typedef
> > +EFI_PCI_PLATFORM_PROTOCOL2 EFI_PCI_OVERRIDE_PROTOCOL2;
> > +
> > +
> > +exter

Re: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH] MdePkg/Protocols: New interface, EFI encodings to PCI Plat protocol

2019-07-25 Thread Liming Gao
Ashraf: 
  These two protocols are new added. They are not defined in current PI spec. 
  Can you update file header to remove below comments?

> +  This Protocol is defined in UEFI Platform Initialization Specification 1.2
> +  Volume 5: Standards

Thanks
Liming
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Javeed, 
> Ashraf
> Sent: Friday, July 19, 2019 11:00 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Gao, Liming 
> ; Ni, Ray 
> Subject: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH] 
> MdePkg/Protocols: New interface, EFI encodings to PCI Plat protocol
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1954
> New interface added to PCI Platform Protocol / PCI Override Protocol to
> retrieve device-specific platform policy for the following PCI standard
> features, like Maximum Payload Size (MPS), Maximum Read Request Size
> (MRRS),Extended Tags, Relax Order, No-Snoop, Active State Power Management
> (ASPM),Latency Time Reporting (LTR), AtomicOp, Reference Clock
> Configuration, Extended SYNCH, PTM support, and Completion Timeout (CTO).
> New source files added with enhanced definitions are in:
> MdePkg/Include/Protocol/PciPlatform2.h,
> MdePkg/Include/Protocol/PciOverride2.h
> 
> Repository: https://github.com/ashrafj/edk2-staging/tree/UEFI_PCI_ENHANCE-2
> 
> Signed-off-by: Ashraf Javeed 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Ray Ni 
> ---
>  MdePkg/Include/Protocol/PciOverride2.h |  46 
> ++
>  MdePkg/Include/Protocol/PciPlatform2.h | 396
> ++
> ++
> ++
> ++
>  MdePkg/MdePkg.dec  |   6 ++
>  3 files changed, 448 insertions(+)
> 
> diff --git a/MdePkg/Include/Protocol/PciOverride2.h 
> b/MdePkg/Include/Protocol/PciOverride2.h
> new file mode 100644
> index 00..cf452d9f8f
> --- /dev/null
> +++ b/MdePkg/Include/Protocol/PciOverride2.h
> @@ -0,0 +1,46 @@
> +/** @file
> +  This file declares EFI PCI Override protocol which provides the interface 
> between
> +  the PCI bus driver/PCI Host Bridge Resource Allocation driver and an 
> implementation's
> +  driver to describe the unique features of a platform.
> +  This protocol is optional.
> +
> +  Copyright (c) 2019, Intel Corporation. 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.
> +
> +  @par Revision Reference:
> +  This Protocol is defined in UEFI Platform Initialization Specification 1.2
> +  Volume 5: Standards
> +
> +**/
> +
> +#ifndef _PCI_OVERRIDE2_H_
> +#define _PCI_OVERRIDE2_H_
> +
> +///
> +/// EFI_PCI_OVERRIDE_PROTOCOL has the same structure with 
> EFI_PCI_PLATFORM_PROTOCOL
> +///
> +#include 
> +
> +///
> +/// Global ID for the EFI_PCI_OVERRIDE_PROTOCOL
> +///
> +#define EFI_PCI_OVERRIDE2_GUID \
> +  { \
> +0xb9d5ea1, 0x66cb, 0x4546, {0xb0, 0xbb, 0x5c, 0x6d, 0xae, 0xd9, 0x42, 
> 0x47} \
> +  }
> +
> +///
> +/// Declaration for EFI_PCI_OVERRIDE_PROTOCOL
> +///
> +typedef EFI_PCI_PLATFORM_PROTOCOL2 EFI_PCI_OVERRIDE_PROTOCOL2;
> +
> +
> +extern EFI_GUID   gEfiPciOverrideProtocol2Guid;
> +
> +#endif
> diff --git a/MdePkg/Include/Protocol/PciPlatform2.h 
> b/MdePkg/Include/Protocol/PciPlatform2.h
> new file mode 100644
> index 00..3ff41b7754
> --- /dev/null
> +++ b/MdePkg/Include/Protocol/PciPlatform2.h
> @@ -0,0 +1,396 @@
> +/** @file
> +  This file declares PCI Platform Protocol that provide the interface between
> +  the PCI bus driver/PCI Host Bridge Resource Allocation driver and a 
> platform-specific
> +  driver to describe the unique features of a platform.
> +  This protocol is optional.
> +
> +Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
> +This program and the accompanying materials are licensed and made available 
> under
> +the terms and conditions of the BSD License that accompa

[edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH] MdePkg/Protocols: New interface, EFI encodings to PCI Plat protocol

2019-07-19 Thread Javeed, Ashraf
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1954
New interface added to PCI Platform Protocol / PCI Override Protocol to
retrieve device-specific platform policy for the following PCI standard
features, like Maximum Payload Size (MPS), Maximum Read Request Size
(MRRS),Extended Tags, Relax Order, No-Snoop, Active State Power Management
(ASPM),Latency Time Reporting (LTR), AtomicOp, Reference Clock
Configuration, Extended SYNCH, PTM support, and Completion Timeout (CTO).
New source files added with enhanced definitions are in:
MdePkg/Include/Protocol/PciPlatform2.h,
MdePkg/Include/Protocol/PciOverride2.h

Repository: https://github.com/ashrafj/edk2-staging/tree/UEFI_PCI_ENHANCE-2

Signed-off-by: Ashraf Javeed 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Ray Ni 
---
 MdePkg/Include/Protocol/PciOverride2.h |  46 
++
 MdePkg/Include/Protocol/PciPlatform2.h | 396 

 MdePkg/MdePkg.dec  |   6 ++
 3 files changed, 448 insertions(+)

diff --git a/MdePkg/Include/Protocol/PciOverride2.h 
b/MdePkg/Include/Protocol/PciOverride2.h
new file mode 100644
index 00..cf452d9f8f
--- /dev/null
+++ b/MdePkg/Include/Protocol/PciOverride2.h
@@ -0,0 +1,46 @@
+/** @file
+  This file declares EFI PCI Override protocol which provides the interface 
between
+  the PCI bus driver/PCI Host Bridge Resource Allocation driver and an 
implementation's
+  driver to describe the unique features of a platform.
+  This protocol is optional.
+
+  Copyright (c) 2019, Intel Corporation. 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.
+
+  @par Revision Reference:
+  This Protocol is defined in UEFI Platform Initialization Specification 1.2
+  Volume 5: Standards
+
+**/
+
+#ifndef _PCI_OVERRIDE2_H_
+#define _PCI_OVERRIDE2_H_
+
+///
+/// EFI_PCI_OVERRIDE_PROTOCOL has the same structure with 
EFI_PCI_PLATFORM_PROTOCOL
+///
+#include 
+
+///
+/// Global ID for the EFI_PCI_OVERRIDE_PROTOCOL
+///
+#define EFI_PCI_OVERRIDE2_GUID \
+  { \
+0xb9d5ea1, 0x66cb, 0x4546, {0xb0, 0xbb, 0x5c, 0x6d, 0xae, 0xd9, 0x42, 
0x47} \
+  }
+
+///
+/// Declaration for EFI_PCI_OVERRIDE_PROTOCOL
+///
+typedef EFI_PCI_PLATFORM_PROTOCOL2 EFI_PCI_OVERRIDE_PROTOCOL2;
+
+
+extern EFI_GUID   gEfiPciOverrideProtocol2Guid;
+
+#endif
diff --git a/MdePkg/Include/Protocol/PciPlatform2.h 
b/MdePkg/Include/Protocol/PciPlatform2.h
new file mode 100644
index 00..3ff41b7754
--- /dev/null
+++ b/MdePkg/Include/Protocol/PciPlatform2.h
@@ -0,0 +1,396 @@
+/** @file
+  This file declares PCI Platform Protocol that provide the interface between
+  the PCI bus driver/PCI Host Bridge Resource Allocation driver and a 
platform-specific
+  driver to describe the unique features of a platform.
+  This protocol is optional.
+
+Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available 
under
+the terms and conditions of the BSD License that 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.
+
+  @par Revision Reference:
+  This Protocol is defined in UEFI Platform Initialization Specification 1.2
+  Volume 5: Standards
+
+**/
+
+#ifndef _PCI_PLATFORM2_H_
+#define _PCI_PLATFORM2_H_
+
+///
+/// This file must be included because the EFI_PCI_PLATFORM_PROTOCOL2 uses
+/// EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE.
+///
+#include 
+
+///
+/// Reuse the existing definition to maintain backward compatibility
+///
+#include 
+
+///
+/// Global ID for the EFI_PCI_PLATFORM_PROTOCOL2.
+///
+#define EFI_PCI_PLATFORM_PROTOCOL2_GUID \
+  { \
+0x787b0367, 0xa945, 0x4d60, {0x8d, 0x34, 0xb9, 0xd1, 0x88, 0xd2, 0xd0, 
0xb6} \
+  }
+
+///
+/// As per the present definition and specification of this protocol, the major
+/// version is 1, and minor version is 1. Any driver utilizing this protocol
+/// shall use these versions number to maintain the backward compatibility as
+/// per its specification changes in future.
+///
+enum