From: Simon Horman <horms@kernel.org>
To: Pingfan Liu <piliu@redhat.com>
Cc: kexec@lists.infradead.org, Jeremy Linton <jeremy.linton@arm.com>,
ardb@kernel.org
Subject: Re: [PATCHv7 3/5] kexec/zboot: Add arch independent zboot support
Date: Mon, 7 Aug 2023 15:22:59 +0200 [thread overview]
Message-ID: <ZNDwM0YfAHT7PDef@vergenet.net> (raw)
In-Reply-To: <20230803024152.11663-4-piliu@redhat.com>
On Thu, Aug 03, 2023 at 10:41:50AM +0800, Pingfan Liu wrote:
> From: Jeremy Linton <jeremy.linton@arm.com>
>
> The linux kernel CONFIG_ZBOOT option creates
> self decompressing PE kernel images. So this means
> that kexec should have a generic understanding of
> the format which may be used by multiple arches.
>
> So lets add an arch independent validation
> and decompression routine.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> [Modified by Pingfan to export kernel fd]
> Signed-off-by: Pingfan Liu <piliu@redhat.com>
> To: kexec@lists.infradead.org
> Cc: horms@verge.net.au
> Cc: ardb@kernel.org
> Cc: jeremy.linton@arm.com
> ---
> include/Makefile | 1 +
> include/kexec-pe-zboot.h | 15 +++++
> kexec/Makefile | 1 +
> kexec/kexec-pe-zboot.c | 131 +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 148 insertions(+)
> create mode 100644 include/kexec-pe-zboot.h
> create mode 100644 kexec/kexec-pe-zboot.c
>
> diff --git a/include/Makefile b/include/Makefile
> index 621ce9f..cd88a26 100644
> --- a/include/Makefile
> +++ b/include/Makefile
> @@ -1,6 +1,7 @@
> dist += include/Makefile \
> include/config.h \
> include/config.h.in \
> + include/kexec-pe-zboot.h \
> include/kexec-uImage.h \
> include/x86/x86-linux.h \
> include/x86/mb_info.h \
> diff --git a/include/kexec-pe-zboot.h b/include/kexec-pe-zboot.h
> new file mode 100644
> index 0000000..c588ca2
> --- /dev/null
> +++ b/include/kexec-pe-zboot.h
> @@ -0,0 +1,15 @@
> +#ifndef __KEXEC_PE_ZBOOT_H__
> +#define __KEXEC_PE_ZBOOT_H__
> +
> +/* see drivers/firmware/efi/libstub/zboot-header.S */
> +struct linux_pe_zboot_header {
> + uint32_t mz_magic;
> + uint32_t image_type;
> + uint32_t payload_offset;
> + uint32_t payload_size;
> + uint32_t reserved[2];
> + uint32_t compress_type;
> +};
nit: the above should consistently use tabs for indentation.
I can try and fix this when applying if there is no v8.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2023-08-07 13:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 2:41 [PATCHv7 0/5] arm64: zboot support Pingfan Liu
2023-08-03 2:41 ` [PATCHv7 1/5] kexec/arm64: Simplify the code for zImage Pingfan Liu
2023-08-07 13:21 ` Simon Horman
2023-08-07 13:26 ` Dave Young
2023-08-10 12:11 ` Simon Horman
2023-08-11 0:31 ` Dave Young
2023-08-03 2:41 ` [PATCHv7 2/5] kexec: Introduce a member kernel_fd in kexec_info Pingfan Liu
2023-08-11 1:23 ` Dave Young
2023-08-03 2:41 ` [PATCHv7 3/5] kexec/zboot: Add arch independent zboot support Pingfan Liu
2023-08-07 13:22 ` Simon Horman [this message]
2023-08-07 15:22 ` Pingfan Liu
2023-08-03 2:41 ` [PATCHv7 4/5] arm64: Add ZBOOT PE containing compressed image support Pingfan Liu
2023-08-03 2:41 ` [PATCHv7 5/5] arm64: Hook up the ZBOOT support as vmlinuz Pingfan Liu
2023-08-11 7:29 ` [PATCHv7 0/5] arm64: zboot support Simon Horman
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-all 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=ZNDwM0YfAHT7PDef@vergenet.net \
--to=horms@kernel.org \
--cc=ardb@kernel.org \
--cc=jeremy.linton@arm.com \
--cc=kexec@lists.infradead.org \
--cc=piliu@redhat.com \
/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