From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH v2 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition
Date: Tue, 5 Jun 2018 03:09:12 +0000 [thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BD248CB@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BB53315@shsmsx102.ccr.corp.intel.com>
Yes. That's intentional.
DeviceSleep and Agreesive Device Sleep are features that require enabling
every time device is powered up.
Default state is disabled.
So the code only compares the policy value against 1 to enable the features.
Thanks/Ray
> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, June 5, 2018 10:30 AM
> To: Ni, Ruiyu <ruiyu.ni@intel.com>; edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: RE: [PATCH v2 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol
> definition
>
> Ray,
>
> I could not find code to compare
> DeviceSleepEnable/AggressiveDeviceSleepEnable with value 0, is that
> expected?
>
>
> Thanks,
> Star
> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Monday, June 4, 2018 3:04 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: [PATCH v2 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 | 2 +
> 2 files changed, 61 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..12657d749e
> --- /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;
> + /// others: Ignored.
> + ///
> + UINT8 DeviceSleepEnable;
> +
> + ///
> + /// 0: Disable Aggressive Device Sleep; /// 1: Enable Aggressive
> + Device Sleep; /// others: Ignored.
> + ///
> + 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 97ec87e1cf..3802b6e0b8
> 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -606,6 +606,8 @@ [Protocols]
> ## Include/Protocol/FirmwareManagementProgress.h
> gEdkiiFirmwareManagementProgressProtocolGuid = { 0x1849bda2, 0x6952,
> 0x4e86, { 0xa1, 0xdb, 0x55, 0x9a, 0x3c, 0x47, 0x9d, 0xf1 } }
>
> + ## 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
next prev parent reply other threads:[~2018-06-05 3:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 7:03 [PATCH v2 0/4] Support PUIS and DEVSLP feature Ruiyu Ni
2018-06-04 7:03 ` [PATCH v2 1/4] MdeModulePkg/AtaAtapiPassThru: Spin up Power up in Standby devices Ruiyu Ni
2018-06-04 7:03 ` [PATCH v2 2/4] MdeModulePkg: Add AtaAtapiPolicy protocol definition Ruiyu Ni
2018-06-05 2:29 ` Zeng, Star
2018-06-05 3:09 ` Ni, Ruiyu [this message]
2018-06-05 3:34 ` Zeng, Star
2018-06-04 7:03 ` [PATCH v2 3/4] MdeModulePkg/AtaAtapiPassThru: enable/disable PUIS per policy Ruiyu Ni
2018-06-05 3:35 ` Zeng, Star
2018-06-05 3:40 ` Ni, Ruiyu
2018-06-05 5:16 ` Zeng, Star
2018-06-05 5:39 ` Ni, Ruiyu
2018-06-05 5:52 ` Zeng, Star
2018-06-04 7:03 ` [PATCH v2 4/4] MdeModulePkg/Ata/AtaAtapiPassThru: Enable/disable DEVSLP " Ruiyu Ni
2018-06-04 7:30 ` Wu, Hao A
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=734D49CCEBEEF84792F5B80ED585239D5BD248CB@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox