public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Ni, Ray" <ray.ni@intel.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	"Liu, Zhiguang" <zhiguang.liu@intel.com>,
	"Ma, Maurice" <maurice.ma@intel.com>,
	"Dong, Guo" <guo.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/3] MdeModulePkg/UniversalPayload: Add definition for extra info in payload
Date: Mon, 7 Jun 2021 23:25:51 +0000	[thread overview]
Message-ID: <BN8PR11MB3666CA28555D0BB469AC010ACA389@BN8PR11MB3666.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210603062259.1390-2-ray.ni@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ni, Ray
> Sent: Thursday, June 3, 2021 2:23 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Ma,
> Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>
> Subject: [edk2-devel] [PATCH v2 1/3] MdeModulePkg/UniversalPayload: Add
> definition for extra info in payload
> 
> The payload is in ELF format per the universal payload spec.
> PLD_INFO_HEADER is stored in the ELF payload as a separate section
> named ".upld_info".
> 
> Extra data needed by payload is stored in sections whose name starts
> with ".upld.".
> 
> Signed-off-by: Ray Ni <ray.ni@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> ---
>  .../Include/UniversalPayload/ExtraData.h      | 28 ++++++++++++++
>  .../UniversalPayload/UniversalPayload.h       | 38 +++++++++++++++++++
>  MdeModulePkg/MdeModulePkg.dec                 |  3 ++
>  3 files changed, 69 insertions(+)
>  create mode 100644 MdeModulePkg/Include/UniversalPayload/ExtraData.h
>  create mode 100644
> MdeModulePkg/Include/UniversalPayload/UniversalPayload.h
> 
> diff --git a/MdeModulePkg/Include/UniversalPayload/ExtraData.h
> b/MdeModulePkg/Include/UniversalPayload/ExtraData.h
> new file mode 100644
> index 0000000000..07b7426683
> --- /dev/null
> +++ b/MdeModulePkg/Include/UniversalPayload/ExtraData.h
> @@ -0,0 +1,28 @@
> +/** @file
> 
> +
> 
> +  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> 
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +#ifndef __EXTRA_DATA_H__
> 
> +#define __EXTRA_DATA_H__
> 
> +
> 
> +extern GUID gPldExtraDataGuid;
> 
> +
> 
> +#pragma pack(1)
> 
> +
> 
> +typedef struct {
> 
> +  CHAR8                   Identifier[16];
> 
> +  EFI_PHYSICAL_ADDRESS    Base;
> 
> +  UINT64                  Size;
> 
> +} PLD_EXTRA_DATA_ENTRY;
> 
> +
> 
> +typedef struct {
> 
> +  PLD_GENERIC_HEADER     PldHeader;
> 
> +  UINT32                 Count;
> 
> +  PLD_EXTRA_DATA_ENTRY   Entry[0];
> 
> +} PLD_EXTRA_DATA;
> 
> +
> 
> +#pragma pack()
> 
> +
> 
> +#endif
> 
> diff --git a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h
> b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h
> new file mode 100644
> index 0000000000..b8e9fe11a1
> --- /dev/null
> +++ b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h
> @@ -0,0 +1,38 @@
> +/** @file
> 
> +
> 
> +  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> 
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +#ifndef __UNIVERSAL_PAYLOAD_H__
> 
> +#define __UNIVERSAL_PAYLOAD_H__
> 
> +
> 
> +typedef  VOID   (EFIAPI *UNIVERSAL_PAYLOAD_ENTRY) (VOID *HobList);


Do we need to add function and input parameter description comments for the above 'typedef' like others in the codebase?

With this handled,
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> 
> +
> 
> +#define PLD_IDENTIFIER                   SIGNATURE_32('U', 'P', 'L', 'D')
> 
> +#define PLD_INFO_SEC_NAME                ".upld_info"
> 
> +#define PLD_EXTRA_SEC_NAME_PREFIX        ".upld."
> 
> +#define PLD_EXTRA_SEC_NAME_PREFIX_LENGTH (sizeof
> (PLD_EXTRA_SEC_NAME_PREFIX) - 1)
> 
> +
> 
> +#pragma pack(1)
> 
> +
> 
> +typedef struct {
> 
> +  UINT32                          Identifier;
> 
> +  UINT32                          HeaderLength;
> 
> +  UINT16                          SpecRevision;
> 
> +  UINT8                           Reserved[2];
> 
> +  UINT32                          Revision;
> 
> +  UINT32                          Attribute;
> 
> +  UINT32                          Capability;
> 
> +  CHAR8                           ProducerId[16];
> 
> +  CHAR8                           ImageId[16];
> 
> +} PLD_INFO_HEADER;
> 
> +
> 
> +typedef struct {
> 
> +  UINT8 Revision;
> 
> +  UINT8 Reserved[3];
> 
> +} PLD_GENERIC_HEADER;
> 
> +
> 
> +#pragma pack()
> 
> +
> 
> +#endif
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec
> index 8d38383915..d823ad0ba7 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -404,6 +404,9 @@ [Guids]
>    ## Include/Guid/MigratedFvInfo.h
> 
>    gEdkiiMigratedFvInfoGuid = { 0xc1ab12f7, 0x74aa, 0x408d, { 0xa2, 0xf4, 0xc6,
> 0xce, 0xfd, 0x17, 0x98, 0x71 } }
> 
> 
> 
> +  ## Include/UniversalPayload/ExtraData.h
> 
> +  gPldExtraDataGuid = {0x15a5baf6, 0x1c91, 0x467d, {0x9d, 0xfb, 0x31, 0x9d,
> 0x17, 0x8d, 0x4b, 0xb4}}
> 
> +
> 
>  [Ppis]
> 
>    ## Include/Ppi/AtaController.h
> 
>    gPeiAtaControllerPpiGuid       = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a,
> 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}
> 
> --
> 2.31.1.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#76009): https://edk2.groups.io/g/devel/message/76009
> Mute This Topic: https://groups.io/mt/83277975/1768737
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com]
> -=-=-=-=-=-=
> 


  parent reply	other threads:[~2021-06-07 23:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  6:22 [PATCH v2 0/3] Add PayloadLoaderPeim which can load ELF payload Ni, Ray
2021-06-03  6:22 ` [PATCH v2 1/3] MdeModulePkg/UniversalPayload: Add definition for extra info in payload Ni, Ray
2021-06-03  6:37   ` [edk2-devel] " Wu, Hao A
2021-06-04  1:01     ` Ni, Ray
2021-06-04  1:02       ` Wu, Hao A
2021-06-07  9:07         ` Ni, Ray
2021-06-07 23:25   ` Wu, Hao A [this message]
2021-06-03  6:22 ` [PATCH v2 2/3] UefiPayloadPkg: Add PayloadLoaderPeim which can load ELF payload Ni, Ray
2021-06-07  1:47   ` Guo Dong
2021-06-07 21:53   ` [edk2-devel] " Marvin Häuser
2021-06-08  2:06     ` Ni, Ray
2021-06-08  3:10     ` Ni, Ray
2021-06-08  8:12       ` Marvin Häuser
2021-06-09  9:49         ` Ni, Ray
2021-06-09 10:03           ` Marvin Häuser
2021-06-10  3:40             ` Ni, Ray
2021-06-10  7:30               ` Marvin Häuser
2021-06-10  9:39                 ` Ni, Ray
2021-06-10 10:13                   ` Marvin Häuser
2021-06-10 10:43                     ` Michael Brown
2021-06-10 11:37                       ` Ni, Ray
     [not found]                       ` <168735878F610E03.10233@groups.io>
2021-06-15 14:36                         ` Ni, Ray
2021-06-15 17:31                           ` Marvin Häuser
2021-06-03  6:22 ` [PATCH v2 3/3] PeiCore: Remove assertion when failing to load PE image Ni, Ray
2021-06-07 23:28   ` Wu, Hao A
2021-06-07 20:33 ` [edk2-devel] [PATCH v2 0/3] Add PayloadLoaderPeim which can load ELF payload Guo Dong

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=BN8PR11MB3666CA28555D0BB469AC010ACA389@BN8PR11MB3666.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