public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhiguang Liu" <zhiguang.liu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"oleksiyy@ami.com" <oleksiyy@ami.com>
Cc: "Gao, Liming" <liming.gao@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Felixp@ami.com" <Felixp@ami.com>
Subject: Re: [edk2-devel] [PATCH 3/4] MdePkg: Add EFI_PROPERTIES_TABLE
Date: Mon, 27 Apr 2020 09:04:03 +0000	[thread overview]
Message-ID: <BN7PR11MB28041D5D90BBBCB3DEB121D090AF0@BN7PR11MB2804.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200410195803.19972-4-oleksiyy@ami.com>

Hi Oleksiy,
I have added my comment inline.
And as I mentioned before, please use ECC check tool or PatchCheck.py to make sure your patch is align with edk2 coding style. Thanks
You can also refer to https://github.com/tianocore/tianocore.github.io/wiki/Code-Style-C to check edk2 C code style.

Thanks
Zhiguang

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oleksiy
> Yakovlev
> Sent: Saturday, April 11, 2020 3:58 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Felixp@ami.com; oleksiyy@ami.com
> Subject: [edk2-devel] [PATCH 3/4] MdePkg: Add EFI_PROPERTIES_TABLE
> 
> Define Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be

The space in "EFI_RT _PROPERTIES_TABLE" is unnecessary.

> published by a
> platform if it no longer  supports all EFI runtime services once
> ExitBootServices()
> has been called by the OS.
> (UEFI 2.8 errata a, mantis 2049)
> 
> Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
> ---
>  MdePkg/Include/Guid/RtPropertiesTable.h | 71
> +++++++++++++++++++++++++++++++++
>  MdePkg/MdePkg.dec                       |  6 +++
>  2 files changed, 77 insertions(+)
>  create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h
> 
> diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h
> b/MdePkg/Include/Guid/RtPropertiesTable.h
> new file mode 100644
> index 0000000..a5b6c14
> --- /dev/null
> +++ b/MdePkg/Include/Guid/RtPropertiesTable.h
> @@ -0,0 +1,71 @@
> +/** @file
> +Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be

The space in "EFI_RT _PROPERTIES_TABLE" is unnecessary.

> published by a
> +platform if it no longer  supports all EFI runtime services once
> ExitBootServices()
> +has been called by the OS.
> +
> +
> +Copyright (c) 2020, American Megatrends International LLC. All rights
> reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _RT _PROPERTIES_TABLE_GUID_H__
> +#define _RT _PROPERTIES_TABLE_GUID_H__
> +
> +//
> +// Table, defined here, should be published by a platform if it no longer
> supports all EFI runtime
> +// services once ExitBootServices() has been called by the OS. Note that this
> is merely a hint
> +// to the OS, which it is free to ignore, and so the platform is still required to
> provide callable
> +// implementations of unsupported runtime services that simply return
> EFI_UNSUPPORTED.
> +//
> +#define EFI_RT_PROPERTIES_TABLE_GUID \
> +    { 0xeb66918a, 0x7eef, 0x402a, \
> +    { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
> +
> +
> +
> +
> +#pragma pack(1)
> +
> +typedef struct {
> +  ///
> +  /// Version of the structure, must be 0x1.
> +  ///
> +  UINT16 Version;
> +
> +  ///
> +  /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8.
> +  ///
> +  UINT16 Length;
> +
> +  ///
> +  /// The length of the JSON payload immediately following this header, in
> bytes.
> +  ///

The upper comments is incorrect.

> +  UINT32 RuntimeServicesSupported;
> +
> +  ///
> +  /// Bitmask of which calls are or are not supported, where a bit set to 1
> indicates
> +  /// that the call is supported, and 0 indicates that it is not.
> +  ///

Move the comment up to describe RuntimeServicesSupported

> +} EFI_RT_PROPERTIES_TABLE;
> +
> +#pragma pack()
> +

I think " #define EFI_RT_PROPERTIES_TABLE_VERSION 0x1" should be added

> +#define EFI_RT_SUPPORTED_GET_TIME                       0x0001
> +#define EFI_RT_SUPPORTED_SET_TIME                       0x0002
> +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME                0x0004
> +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME                0x0008
> +#define EFI_RT_SUPPORTED_GET_VARIABLE                   0x0010
> +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME         0x0020
> +#define EFI_RT_SUPPORTED_SET_VARIABLE                   0x0040
> +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP        0x0080
> +#define EFI_RT_SUPPORTED_CONVERT_POINTER                0x0100
> +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT
> 0x0200
> +#define EFI_RT_SUPPORTED_RESET_SYSTEM                   0x0400
> +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE                 0x0800
> +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES     0x1000
> +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO            0x2000
> +
> +extern EFI_GUID gEfiRtPropertiesTableGuid;
> +
> +#endif
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index 99e75f7..d5340c5 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -655,6 +655,12 @@
>    gEfiBttAbstractionGuid         = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9,
> 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }}
> 
>    #
> +  # GUIDs defined in UEFI2.8a
> +  #
> +  ## Include/Guid/RtPropertiesTable.h
> +  gEfiRtPropertiesTableGuid      = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e,
> 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
> +
> +  #
>    # GUID defined in PI1.0
>    #
>    ## Include/Guid/AprioriFileName.h
> --
> 2.9.0.windows.1
> 
> 
> Please consider the environment before printing this email.
> 
> The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI).  This communication is intended
> to be read only by the individual or entity to whom it is addressed or by their
> designee. If the reader of this message is not the intended recipient, you are
> on notice that any distribution of this message, in any form, is strictly
> prohibited.  Please promptly notify the sender by reply e-mail or by
> telephone at 770-246-8600, and then delete or destroy all copies of the
> transmission.
> 
> 


  reply	other threads:[~2020-04-27  9:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 19:57 [PATCH 0/4] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
2020-04-10 19:58 ` [PATCH 1/4] MdePkg: Add new CPER Notification types Oleksiy Yakovlev
2020-04-10 23:53   ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-05-06 20:13     ` Oleksiy Yakovlev
2020-04-10 19:58 ` [PATCH 2/4] MdePkg: Fix OUT parameters marked as IN OUT Oleksiy Yakovlev
2020-04-10 19:58 ` [PATCH 3/4] MdePkg: Add EFI_PROPERTIES_TABLE Oleksiy Yakovlev
2020-04-27  9:04   ` Zhiguang Liu [this message]
2020-04-10 19:58 ` [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension Oleksiy Yakovlev
2020-04-10 23:55   ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-05-11  6:14   ` Zhiguang Liu
2020-05-11 16:04     ` Xu, Wei6
2020-04-27  9:11 ` [edk2-devel] [PATCH 0/4] Add definitions introduced in UEFI 2.8a Zhiguang Liu

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=BN7PR11MB28041D5D90BBBCB3DEB121D090AF0@BN7PR11MB2804.namprd11.prod.outlook.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