[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 05/35] OvmfPkg/OvmfXen: Creating an ELF header



On 07/04/19 16:42, Anthony PERARD wrote:
> This patch changes the flash device image of OvmfXen to make it look
> like it's an ELF. For this, we replace the empty embedded variable store
> by a binary array, which is a ELF file header.
> 
> The ELF header explain to a loader to load the binary at the address
> 1MB, then jump to the PVH entry point which will be created in a later
> patch. The header also includes a Xen ELF note that is part of the
> PVH ABI.
> 
> That patch include OvmfXenElfHeaderGenerator.c which can be use to
> regenerate the ELF header, but this will be a manual step.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> 
> Notes:
>     v3:
>     - added license to generate_elf_header.c
>       which is renamed to OvmfPkg/OvmfXenElfHeaderGenerator.c
>     - added an ELF NOTE into the header
> 
>  OvmfPkg/OvmfXen.fdf                 | 101 +++++++++++++++++++-
>  OvmfPkg/OvmfXenElfHeaderGenerator.c | 140 ++++++++++++++++++++++++++++
>  2 files changed, 238 insertions(+), 3 deletions(-)
>  create mode 100644 OvmfPkg/OvmfXenElfHeaderGenerator.c

[...]

> diff --git a/OvmfPkg/OvmfXenElfHeaderGenerator.c 
> b/OvmfPkg/OvmfXenElfHeaderGenerator.c
> new file mode 100644
> index 0000000000..6cbad8fbf7
> --- /dev/null
> +++ b/OvmfPkg/OvmfXenElfHeaderGenerator.c
> @@ -0,0 +1,140 @@
> +/*
> + * @file
> + * This program generates a hex array to be manually coppied into
> + * OvmfXen.fdf.
> + * The purpose is for the flash device image to be recognize as an ELF.
> + *
> + * Copyright (c) 2019, Citrix Systems, Inc.
> + *
> + * SPDX-License-Identifier: BSD-2-Clause-Patent
> + */

(1) This patch is almost complete, just please update the comment style,
for this top-level comment, from

/*
 * @file
 * blah
 */

to:

/** @file
  blah
**/

Please refer to e.g. "OvmfPkg/XenBusDxe/XenBusDxe.c".

With that comment style update:

Acked-by: Laszlo Ersek <lersek@xxxxxxxxxx>

Thanks
Laszlo

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.