From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.586.1589387256742674787 for ; Wed, 13 May 2020 09:27:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=azPwra+/; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: liming.gao@intel.com) IronPort-SDR: AO6DaP4rAn2WreiLDOsbAxfJKbmmKwum2qo6Z+ttVCpaNZKKGeg+XIMEnYLEir7/Ffg20sgD+9 bOSED9ruIHIA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 09:27:36 -0700 IronPort-SDR: 1VsY5T5yn7lznqx5CSMo97OqwtFQMHomCZ2gLqQJu2HvJb4Z6cgJh+quEBGHS88RoCyWlU38pM iYuHwulWa1WA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,388,1583222400"; d="scan'208";a="341308659" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 13 May 2020 09:27:34 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 09:27:34 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 09:27:33 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.54) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 09:27:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XGECxSj2e7n9LltDlwHGdw6fsySXKooRExFU0zQgmDiATurF6HnIBAP8lrBMvmY0dcxII58p4KibP5krcawyE+dqWJr3YpW3hubfHTO10OwIyxGcEiHJqfbNoQXXoozAsxZnVda5VwYsa3403R0uSH/LP+nzU6aoWFye01rNRTDdKZK/ZuO91Fu2C//ERdHA2mAroChNXfoh6u7d8DOp7Z8lh2HJHV2goTdK+alKbHG4dt4WN8Psfw2/1Rk5xj7iCNZeTVN5AIk2qBnFK5emfrwMClrro6tAntGxs7xvV0W9pgQJxl2u1ZhGV8C02CLc5FnubVBXDUungDnpIRqnsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hBfFarVpZQbHc2awCAmLNUmwp1E6Xsvgi40+GqJ7tDk=; b=GvyH4MybUKJXEfE8eZ7gAjS1ZIkS4yydCHawz9ayZH8x7WCN1OqDnpCb0e1LgY9D7cJhvRQu7DV1qMxAY6cGqVfGxAGCT2tngsBPkv6nyD+zFhejLj3njT8PzbjcYHIh4SDcJGXIV3KTQadzuxI1ywICYmAwsbaLjckRu0N4hZWdQfwA3AGbaBt2pum+jPoTot2/2GrtGI46CgkxMnoy5/9d+/w0JHN6VXmKNHJEW+G/Zs3Oqj8nBAEv5VJUylqiJZr6Hh2WR5i8VpPy2RKgJAeZLBHnPomf14lNiQolsIletp0025G9c7Dy4IRwLAPcMhvH8cfeWDw2yVevrAYfGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hBfFarVpZQbHc2awCAmLNUmwp1E6Xsvgi40+GqJ7tDk=; b=azPwra+/m5GJ5zbHI5/TP8Ume3ibik/3uiQqKYEFHpO5Kd9bs8jBvukDbkhJDO29gWr3FDS+LwP4oIzgcKeK9UIIpdXeJp878hNFunZVyGvlABF22Kqm4BXnlCcft2vTIFWhZYBAqSnb3RFM6N7LTsXwTFj5aMAFNWdEV2Fs7VA= Received: from BN6PR11MB3972.namprd11.prod.outlook.com (2603:10b6:405:7f::11) by BN6PR11MB3955.namprd11.prod.outlook.com (2603:10b6:405:82::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Wed, 13 May 2020 16:27:32 +0000 Received: from BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::3c03:da06:5345:bfa0]) by BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::3c03:da06:5345:bfa0%7]) with mapi id 15.20.2979.033; Wed, 13 May 2020 16:27:31 +0000 From: "Liming Gao" To: Oleksiy Yakovlev , "devel@edk2.groups.io" CC: "Feng, Bob C" , "Kinney, Michael D" , "Felixp@ami.com" Subject: Re: [PATCH v6 7/7] MdePkg: UEFI JSON Capsule Support Thread-Topic: [PATCH v6 7/7] MdePkg: UEFI JSON Capsule Support Thread-Index: AQHWKJ7Rft1zmWrhtUyz+9qpNvxIn6imNYeQ Date: Wed, 13 May 2020 16:27:31 +0000 Message-ID: References: <20200512204756.25980-1-oleksiyy@ami.com> <20200512204756.25980-8-oleksiyy@ami.com> In-Reply-To: <20200512204756.25980-8-oleksiyy@ami.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: ami.com; dkim=none (message not signed) header.d=none;ami.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.200] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cc71636a-1749-4117-0d95-08d7f75a894e x-ms-traffictypediagnostic: BN6PR11MB3955: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3383; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: W8LtbGPpbpZzwxsgGrMUfTrCWcOqTGAL+xBbc1h8IY3PPjNwtGaqyYmAOoYMEDLfBszPfoCsQa0UeYJsgalxL++py/wFT7UdbdrwSaSVIaW+cOpKz6/2Nf/p1pZB4vxUg8RAt8BVETx3QFrrXo96VjSjTTjwUspB+is+6uLRKpS+7cavkiit8fomOf+vN2ETV6badZ6KqyAPb4quOa1zuJQ/0T8vFcTnKLxntt25aJUlpsmzf2YmVY4BuxQuPL3RZadUuYe3Ry4YYfdnTCdC2z3nBzpOpkHuNslbLFghW+4FDvnUqJgeqdNWX5U4hc8iDCz9zuvFeJAN/2B6fnlYrUyF3GXAK29XgNvPyYj9IPXINPzYsC8B1dRzS/kzInnykKfYPuPzUoWp2qDXGfAxTsMKrZthmSEpuJasesW9WWFrCnK8w3aLhuj4jq4+TYVtW7xsBZBdutHewxCfwTk4oWkBBdkaiyFfERFlC6XUWN5js+Go96P7DeSIIawofso6EgM3XN88nZ30POBCTsosTw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB3972.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(39860400002)(346002)(136003)(396003)(376002)(33430700001)(52536014)(8676002)(66946007)(86362001)(316002)(66476007)(64756008)(33440700001)(66446008)(110136005)(55016002)(66556008)(76116006)(7696005)(5660300002)(26005)(8936002)(4326008)(6506007)(2906002)(478600001)(186003)(54906003)(9686003)(33656002)(53546011)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: azT5SJnUkMngQyHmbBd3TqCDqrUDv7ZSysXjqeeF9B96C84owwtvM7YTmvG1W5SHSBiRfqbw/8gnJV2h6fj770p7kZIOLhyFpKi9pISMb+ALFUUUSe4Gn4KNg32RBH4hX/dQ0u5XOVhUui4SYF6Jq762MHokci+oSOFoIA0aPcxMonmdN0mgOfYVOdsdVL52mSMxCb+MkIPYUJrRgX9dhafjlln4/4UJ2485hkaEzO5Mg7yN+Jbeam+lL3YB6C9rYkujBtPCGY1Hs4CxBjXP5N0MvPeAaMg0dzIJM/iplcvcR64tvvTRTAzP4MyxhODBhwqVaDp/qSGdVy2H4MIo3i4rnMMcpB+P8m3d1d1121AkD78owNFtwIEvDrggVTVJzx42Ci+wippHZJotJdF/ObUItV5wR7+HAuwSr07KuUQ5fea0HcEEYs/c8zIIrwQ+SNp1GxVEm3EoGXcXwPgNC7WLXzzHYgkdc9YFhHPUVdtMIg9QryCEAMQyxR6shxMI MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: cc71636a-1749-4117-0d95-08d7f75a894e X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 16:27:31.6617 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qdGbbgzPkimK8h10m5DFijxE6LffMF1kviwRXStW5dT18O14fa574IMrgfeM3oP4mUlTPCCmgzBZUhq2O2t/ZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3955 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Oleksiy Yakovlev > Sent: Wednesday, May 13, 2020 4:48 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming ; Kinney, Michael D ; > Felixp@ami.com; oleksiyy@ami.com > Subject: [PATCH v6 7/7] MdePkg: UEFI JSON Capsule Support >=20 > Added Guids and structures, that defines the work flow to perform > capsule update using JSON objects. > (UEFI 2.8 mantis 1935) >=20 > Signed-off-by: Oleksiy Yakovlev > --- > MdePkg/Include/Guid/CapsuleReport.h | 29 +++++++++++ > MdePkg/Include/Guid/JsonCapsule.h | 98 +++++++++++++++++++++++++++++++= ++++++ > MdePkg/Include/Uefi/UefiSpec.h | 1 + > MdePkg/MdePkg.dec | 6 +++ > 4 files changed, 134 insertions(+) > create mode 100644 MdePkg/Include/Guid/JsonCapsule.h >=20 > diff --git a/MdePkg/Include/Guid/CapsuleReport.h b/MdePkg/Include/Guid/Ca= psuleReport.h > index 93d2bb7..53720e0 100644 > --- a/MdePkg/Include/Guid/CapsuleReport.h > +++ b/MdePkg/Include/Guid/CapsuleReport.h > @@ -93,6 +93,35 @@ typedef struct { > /// > } EFI_CAPSULE_RESULT_VARIABLE_FMP; >=20 > +typedef struct { > + > + /// > + /// Version of this structure, currently 0x00000001 > + /// > + UINT32 Version; > + > + /// > + /// The unique identifier of the capsule whose processing result is re= corded in this variable. > + /// 0x00000000 =16 0xEFFFFFFF =16 Implementation Reserved > + /// 0xF0000000 =16 0xFFFFFFFF =16 Specification Reserved > + /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF000000 > + /// The JSON payload shall conform to a Redfish-defined JSON schema, s= ee 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 r= eplied payload is beyond > + /// the scope of this specification. > + /// > + UINT8 Resp[]; > + } EFI_CAPSULE_RESULT_VARIABLE_JSON; >=20 > extern EFI_GUID gEfiCapsuleReportGuid; >=20 > diff --git a/MdePkg/Include/Guid/JsonCapsule.h b/MdePkg/Include/Guid/Json= Capsule.h > new file mode 100644 > index 0000000..b34d6e3 > --- /dev/null > +++ b/MdePkg/Include/Guid/JsonCapsule.h > @@ -0,0 +1,98 @@ > +/** @file > +Guid & data structure for tables defined for reporting firmware configur= ation data to EFI > +Configuration Tables and also for processing JSON payload capsule. > + > + > +Copyright (c) 2020, American Megatrends International LLC. All rights re= served.
> +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_CAPSUL= E_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_CONF= IG_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 sc= ope 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 pay= load is beyond the scope of this specification. > + /// > + UINT8 ConfigData[]; > +} 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/UefiSpe= c.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 0x0000000000= 000008 > #define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED 0x0000000000= 000010 > #define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY 0x0000000000= 000040 > +#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH 0x0000000000= 000080 >=20 > // > // EFI Runtime Services Table > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > index b6da94b..91b6e28 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -647,6 +647,12 @@ >=20 > # GUIDs defined in UEFI2.8 > # > + ## Include/Guid/JsonCapsule.h > + gEfiJsonConfigDataTableGuid =3D { 0x87367f87, 0x1119, 0x41ce, { 0= xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }} > + gEfiJsonCapsuleDataTableGuid =3D { 0x35e7a725, 0x8dd2, 0x4cac, { 0= x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }} > + gEfiJsonCapsuleResultTableGuid =3D { 0xdbc461c3, 0xb3de, 0x422a, { 0= xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }} > + gEfiJsonCapsuleIdGuid =3D { 0x67d6f4cd, 0xd6b8, 0x4573, { 0= xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }} > + > ## Include/Guid/HiiPlatformSetupFormset.h > gEfiHiiResetStyleFormsetGuid =3D { 0x790217bd, 0xbecf, 0x485b, { 0= x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }} >=20 > -- > 2.9.0.windows.1 >=20 >=20 > Please consider the environment before printing this email. >=20 > The information contained in this message may be confidential and proprie= tary to American Megatrends (AMI). This communication > is intended to be read only by the individual or entity to whom it is add= ressed or by their designee. If the reader of this message is > not the intended recipient, you are on notice that any distribution of th= is message, in any form, is strictly prohibited. Please > promptly notify the sender by reply e-mail or by telephone at 770-246-860= 0, and then delete or destroy all copies of the transmission.