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: "Feng, Bob C" <bob.c.feng@intel.com>,
	"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 v4 7/7] MdePkg: UEFI JSON Capsule Support
Date: Sat, 9 May 2020 02:34:01 +0000	[thread overview]
Message-ID: <BN7PR11MB280492379276E83EF9B664F790A30@BN7PR11MB2804.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200508214611.70592-8-oleksiyy@ami.com>

Hi Oleksiy.

I think we all agree to remove the comment marker before the final parameter in struct.
Please see this mail https://edk2.groups.io/g/devel/message/57895
Let me know if you have any concern.

And one little suggestion. 
If you send a newer version but don't change anything, you can take the Reviewed-by in your commit message if you get one.
So, the reviewer doesn't have to review the same patch again 😊

Thanks
Zhiguang

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oleksiy
> Yakovlev
> Sent: Saturday, May 9, 2020 5:46 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Felixp@ami.com; oleksiyy@ami.com
> Subject: [edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support
> 
> Added Guids and structures, that defines the work flow to perform capsule
> update using JSON objects.
> (UEFI 2.8 mantis 1935)
> 
> Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
> ---
>  MdePkg/Include/Guid/CapsuleReport.h | 29 +++++++++++
>  MdePkg/Include/Guid/JsonCapsule.h   | 97
> +++++++++++++++++++++++++++++++++++++
>  MdePkg/Include/Uefi/UefiSpec.h      |  1 +
>  MdePkg/MdePkg.dec                   | 11 +++++
>  4 files changed, 138 insertions(+)
>  create mode 100644 MdePkg/Include/Guid/JsonCapsule.h
> 
> diff --git a/MdePkg/Include/Guid/CapsuleReport.h
> b/MdePkg/Include/Guid/CapsuleReport.h
> index 93d2bb7..ab0f552 100644
> --- a/MdePkg/Include/Guid/CapsuleReport.h
> +++ b/MdePkg/Include/Guid/CapsuleReport.h
> @@ -93,6 +93,35 @@ typedef struct {
>    ///
>  } EFI_CAPSULE_RESULT_VARIABLE_FMP;
> 
> +typedef struct {
> +
> +  ///
> +  /// Version of this structure, currently 0x00000001  ///
> +  UINT32    Version;
> +
> +  ///
> +  /// The unique identifier of the capsule whose processing result is
> recorded in this variable.
> +  /// 0x00000000 b  0xEFFFFFFF b  Implementation Reserved  ///
> + 0xF0000000 b  0xFFFFFFFF b  Specification Reserved  /// #define
> + REDFISH_DEFINED_JSON_SCHEMA 0xF000000  /// The JSON payload shall
> + conform to a Redfish-defined JSON schema, see DMTF-Redfish  ///
> + Specification.
> +  ///
> +  UINT32 CapsuleId;
> +
> +  ///
> +  /// The length of Resp in bytes.
> +  ///
> +  UINT32 RespLength;
> +
> +  ///
> +  /// Variable length buffer containing the replied JSON payload to the
> + caller who delivered JSON  /// capsule to system. The definition of
> + the JSON schema used in the replied payload is beyond  /// the scope of
> this specification.
> +  ///
> +  /// UINT8 Resp[];
> + } EFI_CAPSULE_RESULT_VARIABLE_JSON;
> 
>  extern EFI_GUID gEfiCapsuleReportGuid;
> 
> diff --git a/MdePkg/Include/Guid/JsonCapsule.h
> b/MdePkg/Include/Guid/JsonCapsule.h
> new file mode 100644
> index 0000000..721636f
> --- /dev/null
> +++ b/MdePkg/Include/Guid/JsonCapsule.h
> @@ -0,0 +1,97 @@
> +/** @file
> +Guid & data structure for tables defined for reporting firmware
> +configuration data to EFI Configuration Tables and also for processing JSON
> payload capsule.
> +
> +
> +Copyright (c) 2020, American Megatrends International LLC. All rights
> +reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _JSON_CAPSULE_GUID_H__
> +#define _JSON_CAPSULE_GUID_H__
> +
> +//
> +// The address reported in the table entry identified by
> +EFI_JSON_CAPSULE_DATA_TABLE_GUID will be // referenced as physical
> and
> +will not be fixed up when transition from preboot to runtime phase. The
> +// addresses reported in these table entries identified by
> +EFI_JSON_CONFIG_DATA_TABLE_GUID and //
> EFI_JSON_CAPSULE_RESULT_TABLE_GUID will be referenced as virtual and
> will be fixed up when // transition from preboot to runtime phase.
> +//
> +#define EFI_JSON_CONFIG_DATA_TABLE_GUID \
> +    {0x87367f87, 0x1119, 0x41ce, \
> +    {0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }} #define
> +EFI_JSON_CAPSULE_DATA_TABLE_GUID \
> +    {0x35e7a725, 0x8dd2, 0x4cac, \
> +    {0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }} #define
> +EFI_JSON_CAPSULE_RESULT_TABLE_GUID \
> +    {0xdbc461c3, 0xb3de, 0x422a,\
> +    {0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }} #define
> +EFI_JSON_CAPSULE_ID_GUID \
> +    {0x67d6f4cd, 0xd6b8,  0x4573, \
> +    {0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }}
> +
> +
> +#pragma pack(1)
> +
> +typedef struct {
> +  ///
> +  /// Version of the structure, initially 0x00000001.
> +  ///
> +  UINT32 Version;
> +
> +  ///
> +  /// The unique identifier of this capsule.
> +  ///
> +  UINT32 CapsuleId;
> +
> +  ///
> +  /// The length of the JSON payload immediately following this header, in
> bytes.
> +  ///
> +  UINT32 PayloadLength;
> +
> +  ///
> +  /// Variable length buffer containing the JSON payload that should be
> +parsed and applied to the system. The
> +  /// definition of the JSON schema used in the payload is beyond the scope
> of this specification.
> +  /// UINT8 Payload[];
> +} EFI_JSON_CAPSULE_HEADER;
> +
> +typedef struct {
> +  ///
> +  /// The length of the following ConfigData, in bytes.
> +  ///
> +  UINT32 ConfigDataLength;
> +
> +  ///
> +  /// Variable length buffer containing the JSON payload that describes
> +one group of configuration data within
> +  /// current system. The definition of the JSON schema used in this payload
> is beyond the scope of this specification.
> +  ///
> +  ///UINT8 ConfigData[ConfigDataLength]; } EFI_JSON_CONFIG_DATA_ITEM;
> +
> +typedef struct {
> +  ///
> +  /// Version of the structure, initially 0x00000001.
> +  ///
> +  UINT32 Version;
> +
> +  ///
> +  ////The total length of EFI_JSON_CAPSULE_CONFIG_DATA, in bytes.
> +  ///
> +  UINT32 TotalLength;
> +
> +  ///
> +  /// Array of configuration data groups.
> +  ///
> +  /// EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; }
> +EFI_JSON_CAPSULE_CONFIG_DATA;
> +
> +#pragma pack()
> +
> +extern EFI_GUID gEfiJsonConfigDataTableGuid; extern EFI_GUID
> +gEfiJsonCapsuleDataTableGuid; extern EFI_GUID
> +gEfiJsonCapsuleResultTableGuid; extern EFI_GUID gEfiJsonCapsuleIdGuid;
> +
> +
> +#endif
> diff --git a/MdePkg/Include/Uefi/UefiSpec.h
> b/MdePkg/Include/Uefi/UefiSpec.h index b9282cc..3547345 100644
> --- a/MdePkg/Include/Uefi/UefiSpec.h
> +++ b/MdePkg/Include/Uefi/UefiSpec.h
> @@ -1783,6 +1783,7 @@ EFI_STATUS
>  #define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED
> 0x0000000000000008
>  #define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED
> 0x0000000000000010
>  #define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY
> 0x0000000000000040
> +#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH
> 0x0000000000000080
> 
>  //
>  // EFI Runtime Services Table
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> 0b9c4bc..5dc02f2 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -645,6 +645,17 @@
>    ## Include/Guid/Btt.h
>    gEfiBttAbstractionGuid         = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9,
> 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }}
> 
> +  # GUIDs defined in UEFI2.8
> +  #
> +  ## Include/Guid/JsonCapsule.h
> +  gEfiJsonConfigDataTableGuid      = { 0x87367f87, 0x1119, 0x41ce, { 0xaa,
> 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }}
> +  gEfiJsonCapsuleDataTableGuid     = { 0x35e7a725, 0x8dd2, 0x4cac, { 0x80,
> 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }}
> +  gEfiJsonCapsuleResultTableGuid   = { 0xdbc461c3, 0xb3de, 0x422a, { 0xb9,
> 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }}
> +  gEfiJsonCapsuleIdGuid            = { 0x67d6f4cd, 0xd6b8, 0x4573, { 0xbf, 0x4a,
> 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }}
> +
> +  ## Include\Guid\HiiPlatformSetupFormset.h
> +  gEfiHiiResetStyleFormsetGuid     = { 0x790217bd, 0xbecf, 0x485b, { 0x91,
> 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
> +
>    #
>    # GUID defined in PI1.0
>    #
> --
> 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-05-09  2:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 21:46 [PATCH v4 0/7] Add definitions introduced in UEFI 2.8 Oleksiy Yakovlev
2020-05-08 21:46 ` [PATCH v4 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid Oleksiy Yakovlev
2020-05-11 14:46   ` Liming Gao
2020-05-08 21:46 ` [PATCH v4 2/7] BaseTools: REST style formset Oleksiy Yakovlev
2020-05-08 21:46 ` [PATCH v4 3/7] MdePkg: " Oleksiy Yakovlev
2020-05-08 21:46 ` [PATCH v4 4/7] BaseTools: Bootable NVDIMM namespaces Oleksiy Yakovlev
2020-05-08 21:46 ` [PATCH v4 5/7] MdePkg: " Oleksiy Yakovlev
2020-05-08 21:46 ` [PATCH v4 6/7] MdePkg: Add UEFI Spec Revision 2.8 Oleksiy Yakovlev
2020-05-08 21:46 ` [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support Oleksiy Yakovlev
2020-05-09  2:34   ` Zhiguang Liu [this message]
2020-05-11 14:14     ` [edk2-devel] " Liming Gao
     [not found]     ` <160DFEDDA3DFE660.21511@groups.io>
2020-05-11 14:48       ` Liming Gao
2020-05-11 15:04         ` Oleksiy Yakovlev
2020-05-11 15:10           ` Liming Gao
2020-05-11 14:52 ` [PATCH v4 0/7] Add definitions introduced in UEFI 2.8 Liming Gao

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=BN7PR11MB280492379276E83EF9B664F790A30@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