[edk2] [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition

Ruiyu Ni posted 4 patches 7 years, 8 months ago
There is a newer version of this series
[edk2] [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition
Posted by Ruiyu Ni 7 years, 8 months ago
The patch adds AtaAtapiPolicy protocol which is produced by platform
and consumed by AtaAtapiPassThruDxe driver.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h | 59 ++++++++++++++++++++++++++
 MdeModulePkg/MdeModulePkg.dec                  |  3 ++
 2 files changed, 62 insertions(+)
 create mode 100644 MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h

diff --git a/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h b/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
new file mode 100644
index 0000000000..86a6213dc9
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
@@ -0,0 +1,59 @@
+/** @file
+  ATA ATAPI Policy protocol is produced by platform and consumed by AtaAtapiPassThruDxe
+  driver.
+
+  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+  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 __ATA_ATAPI_POLICY_H__
+#define __ATA_ATAPI_POLICY_H__
+
+#define EDKII_ATA_ATAPI_POLICY_PROTOCOL_GUID \
+  { \
+    0xe59cd769, 0x5083, 0x4f26,{ 0x90, 0x94, 0x6c, 0x91, 0x9f, 0x91, 0x6c, 0x4e } \
+  }
+
+typedef struct {
+  ///
+  /// Protocol version.
+  ///
+  UINT32  Version;
+
+  ///
+  /// 0: Disable Power-up in Standby;
+  /// 1: Enable Power-up in Standby;
+  /// others: Since PUIS setting is non-volatile, platform can use other value than 0/1 to keep hardware PUIS setting.
+  ///
+  UINT8   PuisEnable;
+
+  ///
+  /// 0: Disable Device Sleep;
+  /// 1: Enable Device Sleep;
+  ///
+  UINT8   DeviceSleepEnable;
+
+  ///
+  /// 0: Disable Aggressive Device Sleep;
+  /// 1: Enable Aggressive Device Sleep.
+  ///
+  UINT8   AggressiveDeviceSleepEnable;
+
+  UINT8   Reserved;
+} EDKII_ATA_ATAPI_POLICY_PROTOCOL;
+
+#define EDKII_ATA_ATAPI_POLICY_VERSION 0x00010000
+
+
+extern EFI_GUID gEdkiiAtaAtapiPolicyProtocolGuid;
+
+
+
+#endif
+
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index cc397185f7..3d8376ffdf 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -595,6 +595,9 @@ [Protocols]
   gEdkiiPlatformSpecificResetFilterProtocolGuid  = { 0x695d7835, 0x8d47, 0x4c11, { 0xab, 0x22, 0xfa, 0x8a, 0xcc, 0xe7, 0xae, 0x7a } }
   ## Include/Protocol/PlatformSpecificResetHandler.h
   gEdkiiPlatformSpecificResetHandlerProtocolGuid = { 0x2df6ba0b, 0x7092, 0x440d, { 0xbd, 0x4, 0xfb, 0x9, 0x1e, 0xc3, 0xf3, 0xc1 } }
+
+  ## Include/Protocol/AtaAtapiPolicy.h
+  gEdkiiAtaAtapiPolicyProtocolGuid = { 0xe59cd769, 0x5083, 0x4f26,{ 0x90, 0x94, 0x6c, 0x91, 0x9f, 0x91, 0x6c, 0x4e } }
 #
 # [Error.gEfiMdeModulePkgTokenSpaceGuid]
 #   0x80000001 | Invalid value provided.
-- 
2.16.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition
Posted by Zeng, Star 7 years, 8 months ago
I see below definition for PuisEnable.
+  /// others: Since PUIS setting is non-volatile, platform can use other value than 0/1 to keep hardware PUIS setting.
+  ///
+  UINT8   PuisEnable;


What will the code do for DeviceSleepEnable and AggressiveDeviceSleepEnable when their  value is other value than 0/1?
Could that information be also stated?



Thanks,
Star

-----Original Message-----
From: Ni, Ruiyu 
Sent: Friday, June 1, 2018 1:39 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>
Subject: [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition

The patch adds AtaAtapiPolicy protocol which is produced by platform and consumed by AtaAtapiPassThruDxe driver.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h | 59 ++++++++++++++++++++++++++
 MdeModulePkg/MdeModulePkg.dec                  |  3 ++
 2 files changed, 62 insertions(+)
 create mode 100644 MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h

diff --git a/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h b/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
new file mode 100644
index 0000000000..86a6213dc9
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
@@ -0,0 +1,59 @@
+/** @file
+  ATA ATAPI Policy protocol is produced by platform and consumed by 
+AtaAtapiPassThruDxe
+  driver.
+
+  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>  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 __ATA_ATAPI_POLICY_H__
+#define __ATA_ATAPI_POLICY_H__
+
+#define EDKII_ATA_ATAPI_POLICY_PROTOCOL_GUID \
+  { \
+    0xe59cd769, 0x5083, 0x4f26,{ 0x90, 0x94, 0x6c, 0x91, 0x9f, 0x91, 
+0x6c, 0x4e } \
+  }
+
+typedef struct {
+  ///
+  /// Protocol version.
+  ///
+  UINT32  Version;
+
+  ///
+  /// 0: Disable Power-up in Standby;
+  /// 1: Enable Power-up in Standby;
+  /// others: Since PUIS setting is non-volatile, platform can use other value than 0/1 to keep hardware PUIS setting.
+  ///
+  UINT8   PuisEnable;
+
+  ///
+  /// 0: Disable Device Sleep;
+  /// 1: Enable Device Sleep;
+  ///
+  UINT8   DeviceSleepEnable;
+
+  ///
+  /// 0: Disable Aggressive Device Sleep;  /// 1: Enable Aggressive 
+ Device Sleep.
+  ///
+  UINT8   AggressiveDeviceSleepEnable;
+
+  UINT8   Reserved;
+} EDKII_ATA_ATAPI_POLICY_PROTOCOL;
+
+#define EDKII_ATA_ATAPI_POLICY_VERSION 0x00010000
+
+
+extern EFI_GUID gEdkiiAtaAtapiPolicyProtocolGuid;
+
+
+
+#endif
+
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index cc397185f7..3d8376ffdf 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -595,6 +595,9 @@ [Protocols]
   gEdkiiPlatformSpecificResetFilterProtocolGuid  = { 0x695d7835, 0x8d47, 0x4c11, { 0xab, 0x22, 0xfa, 0x8a, 0xcc, 0xe7, 0xae, 0x7a } }
   ## Include/Protocol/PlatformSpecificResetHandler.h
   gEdkiiPlatformSpecificResetHandlerProtocolGuid = { 0x2df6ba0b, 0x7092, 0x440d, { 0xbd, 0x4, 0xfb, 0x9, 0x1e, 0xc3, 0xf3, 0xc1 } }
+
+  ## Include/Protocol/AtaAtapiPolicy.h
+  gEdkiiAtaAtapiPolicyProtocolGuid = { 0xe59cd769, 0x5083, 0x4f26,{ 
+ 0x90, 0x94, 0x6c, 0x91, 0x9f, 0x91, 0x6c, 0x4e } }
 #
 # [Error.gEfiMdeModulePkgTokenSpaceGuid]
 #   0x80000001 | Invalid value provided.
--
2.16.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition
Posted by Ni, Ruiyu 7 years, 8 months ago
Ok. I will update the comments.

Thanks/Ray

> -----Original Message-----
> From: Zeng, Star
> Sent: Monday, June 4, 2018 2:30 PM
> To: Ni, Ruiyu <ruiyu.ni@intel.com>; edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: RE: [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol
> definition
> 
> I see below definition for PuisEnable.
> +  /// others: Since PUIS setting is non-volatile, platform can use other value
> than 0/1 to keep hardware PUIS setting.
> +  ///
> +  UINT8   PuisEnable;
> 
> 
> What will the code do for DeviceSleepEnable and
> AggressiveDeviceSleepEnable when their  value is other value than 0/1?
> Could that information be also stated?
> 
> 
> 
> Thanks,
> Star
> 
> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Friday, June 1, 2018 1:39 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: [PATCH 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition
> 
> The patch adds AtaAtapiPolicy protocol which is produced by platform and
> consumed by AtaAtapiPassThruDxe driver.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> ---
>  MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h | 59
> ++++++++++++++++++++++++++
>  MdeModulePkg/MdeModulePkg.dec                  |  3 ++
>  2 files changed, 62 insertions(+)
>  create mode 100644 MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
> 
> diff --git a/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
> b/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
> new file mode 100644
> index 0000000000..86a6213dc9
> --- /dev/null
> +++ b/MdeModulePkg/Include/Protocol/AtaAtapiPolicy.h
> @@ -0,0 +1,59 @@
> +/** @file
> +  ATA ATAPI Policy protocol is produced by platform and consumed by
> +AtaAtapiPassThruDxe
> +  driver.
> +
> +  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>  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 __ATA_ATAPI_POLICY_H__
> +#define __ATA_ATAPI_POLICY_H__
> +
> +#define EDKII_ATA_ATAPI_POLICY_PROTOCOL_GUID \
> +  { \
> +    0xe59cd769, 0x5083, 0x4f26,{ 0x90, 0x94, 0x6c, 0x91, 0x9f, 0x91,
> +0x6c, 0x4e } \
> +  }
> +
> +typedef struct {
> +  ///
> +  /// Protocol version.
> +  ///
> +  UINT32  Version;
> +
> +  ///
> +  /// 0: Disable Power-up in Standby;
> +  /// 1: Enable Power-up in Standby;
> +  /// others: Since PUIS setting is non-volatile, platform can use other value
> than 0/1 to keep hardware PUIS setting.
> +  ///
> +  UINT8   PuisEnable;
> +
> +  ///
> +  /// 0: Disable Device Sleep;
> +  /// 1: Enable Device Sleep;
> +  ///
> +  UINT8   DeviceSleepEnable;
> +
> +  ///
> +  /// 0: Disable Aggressive Device Sleep;  /// 1: Enable Aggressive
> + Device Sleep.
> +  ///
> +  UINT8   AggressiveDeviceSleepEnable;
> +
> +  UINT8   Reserved;
> +} EDKII_ATA_ATAPI_POLICY_PROTOCOL;
> +
> +#define EDKII_ATA_ATAPI_POLICY_VERSION 0x00010000
> +
> +
> +extern EFI_GUID gEdkiiAtaAtapiPolicyProtocolGuid;
> +
> +
> +
> +#endif
> +
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec index cc397185f7..3d8376ffdf 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -595,6 +595,9 @@ [Protocols]
>    gEdkiiPlatformSpecificResetFilterProtocolGuid  = { 0x695d7835, 0x8d47,
> 0x4c11, { 0xab, 0x22, 0xfa, 0x8a, 0xcc, 0xe7, 0xae, 0x7a } }
>    ## Include/Protocol/PlatformSpecificResetHandler.h
>    gEdkiiPlatformSpecificResetHandlerProtocolGuid = { 0x2df6ba0b, 0x7092,
> 0x440d, { 0xbd, 0x4, 0xfb, 0x9, 0x1e, 0xc3, 0xf3, 0xc1 } }
> +
> +  ## Include/Protocol/AtaAtapiPolicy.h
> +  gEdkiiAtaAtapiPolicyProtocolGuid = { 0xe59cd769, 0x5083, 0x4f26,{
> + 0x90, 0x94, 0x6c, 0x91, 0x9f, 0x91, 0x6c, 0x4e } }
>  #
>  # [Error.gEfiMdeModulePkgTokenSpaceGuid]
>  #   0x80000001 | Invalid value provided.
> --
> 2.16.1.windows.1

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