[RFC] Extend zImage format to support notes

Mark Rutland mark.rutland at arm.com
Mon Apr 7 09:04:52 PDT 2014


On Mon, Apr 07, 2014 at 02:59:53PM +0100, Julien Grall wrote:
> Hello all,

Hi Julien,

> Currently ELF is supporting notes (see include/linux/elfnote.h) which
> is used by Xen to know the feature supported by the kernel.

What kind of features do you intend for Xen discover through this
mechanism on ARM?

Can support for these not be negotiated at run-time (how does this work
with other OSs under Xen)?

> On ARM world, the zImage format is mainly used by the distribution.
> Rather than ELF, it's currently not possible to add notes on it.
> 
> ==== Current zImage format ====
> 
> The header starts at offset 0x24:
>     uint32_t  magic      /* Magic number: 0x016f2818 */
>     uint32_t  start      /* absolute load/run zImage address */
>     uint32_t  end        /* zImage end address */
> 
> ==== Extension proposed to zImage format ===
> 
> The header stays compatible with the current format and starts at offset 0x24:
>     uint32_t  magic0     /* Magic number : 0x16f2818 */
>     uint32_t  start      /* absolute load/run zImage address */
>     uint32_t  end        /* zImage end address */
>     uint32_t  magic1     /* Magic number : "ARM\x32" */
>     uint32_t  note_start /* Notes section offset */
>     uint32_t  note_end   /* Notes sections end */

On arm64 we seem to have a notes section but no pointer to it in the
Image header. I assume you'd consider a notes section useful for 64-bit
too?

I have some patches extending the header for arm64 which I intend to
post shortly; if we're going to clash there and this is needed, perhaps
I can fold in a similar update.

Cheers,
Mark.



More information about the linux-arm-kernel mailing list