Re: [PATCHv7 3/5] kexec/zboot: Add arch independent zboot support

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

 



On Mon, Aug 7, 2023 at 9:23 PM Simon Horman <horms@xxxxxxxxxx> wrote:
>
> On Thu, Aug 03, 2023 at 10:41:50AM +0800, Pingfan Liu wrote:
> > From: Jeremy Linton <jeremy.linton@xxxxxxx>
> >
> > 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@xxxxxxx>
> > [Modified by Pingfan to export kernel fd]
> > Signed-off-by: Pingfan Liu <piliu@xxxxxxxxxx>
> > To: kexec@xxxxxxxxxxxxxxxxxxx
> > Cc: horms@xxxxxxxxxxxx
> > Cc: ardb@xxxxxxxxxx
> > Cc: jeremy.linton@xxxxxxx
> > ---
> >  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.
>

Appreciate it if you do it. I think that no v8 if no other guys have
opinions on this series.

Thanks,

Pingfan


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux