[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.9999.1905131735450.21198@viisi.sifive.com>
Date: Mon, 13 May 2019 17:39:54 -0700 (PDT)
From: Paul Walmsley <paul.walmsley@...ive.com>
To: Atish Patra <atish.patra@....com>
cc: Paul Walmsley <paul.walmsley@...ive.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
Albert Ou <aou@...s.berkeley.edu>,
Anup Patel <anup@...infault.org>,
Palmer Dabbelt <palmer@...ive.com>,
Zong Li <zong@...estech.com>,
"merker@...ian.org" <merker@...ian.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: Re: [v2 PATCH] RISC-V: Add a PE/COFF compliant Image header.
On Mon, 13 May 2019, Atish Patra wrote:
> On 5/13/19 5:09 PM, Paul Walmsley wrote:
>
> > What are the semantics of those reserved fields?
>
> +struct riscv_image_header {
> + u32 code0;
> + u32 code1;
> + u64 text_offset;
> + u64 image_size;
> + u64 res1;
> + u64 res2;
> + u64 res3;
> + u64 magic;
> + u32 res4; ---> We can use this for versioning when required
> + u32 res5; ---> This is reserved for PE/COFF header
> +};
I saw that in your patch. The problem is that this doesn't describe what
other software might expect in those fields. Can anything at all be
placed in those reserved fields?
> > > Do we need to add it now or add it later when we actually need a version
> > > number. My preference is to add it later based on requirement.
> >
> > If it isn't added now, how would bootloaders know whether it was there or
> > not?
> >
> >
> Here is the corresponding U-Boot Patch
> https://patchwork.ozlabs.org/patch/1096087/
>
> Currently, boot loader doesn't care about versioning. Since we are updating a
> reserved field, offsets will not change. If a boot loader want to use the
> versioning, it should be patched along with the kernel patch.
>
> Any other boot loader that doesn't care about the version, it can continue to
> do so without any change.
>
> My idea is to enable the minimum required fields in this patch and keep
> everything else as reserved so that it can be amended in future as required.
If those fields really are reserved for implementors to do whatever they
want with them, then that might be a reasonable approach. That seems
unlikely, however, since specification authors usually reserve the right
to use reserved fields for their own purposes in later versions.
- Paul
Powered by blists - more mailing lists