[edk2-devel] [PATCH v3 05/35] OvmfPkg/OvmfXen: Creating an ELF header
Laszlo Ersek
lersek at redhat.com
Fri Jul 5 14:09:56 UTC 2019
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 at citrix.com>
> ---
>
> 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 at redhat.com>
Thanks
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#43359): https://edk2.groups.io/g/devel/message/43359
Mute This Topic: https://groups.io/mt/32308566/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list