[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dff52431-ce54-7c64-b223-36f4491c53b0@cn.fujitsu.com>
Date: Thu, 26 Sep 2019 16:20:02 +0800
From: Cao jin <caoj.fnst@...fujitsu.com>
To: <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <tglx@...utronix.de>,
<mingo@...hat.com>, <bp@...en8.de>, <corbet@....net>
Subject: Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of
"reloc"
On 9/26/19 3:58 PM, hpa@...or.com wrote:
> On September 26, 2019 12:55:51 AM PDT, Cao jin <caoj.fnst@...fujitsu.com> wrote:
>> On 9/26/19 2:01 PM, Ingo Molnar wrote:
>>> * Cao jin <caoj.fnst@...fujitsu.com> wrote:
>>>
>>>> The fields marked with (reloc) actually are not dedicated for
>> writing,
>>>> but communicating info for relocatable kernel with boot loaders. For
>>>> example:
>>>>
>>>> ============ ============
>>>> Field name: pref_address
>>>> Type: read (reloc)
>>>> Offset/size: 0x258/8
>>>> Protocol: 2.10+
>>>> ============ ============
>>>>
>>>> ============ ========================
>>>> Field name: code32_start
>>>> Type: modify (optional, reloc)
>>>> Offset/size: 0x214/4
>>>> Protocol: 2.00+
>>>> ============ ========================
>>>>
>>>> Signed-off-by: Cao jin <caoj.fnst@...fujitsu.com>
>>>> ---
>>>> Unless I have incorrect non-native understanding for "fill in", I
>> think
>>>> this is inaccurate.
>>>>
>>>> Documentation/x86/boot.rst | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst
>>>> index 08a2f100c0e6..a611bf04492d 100644
>>>> --- a/Documentation/x86/boot.rst
>>>> +++ b/Documentation/x86/boot.rst
>>>> @@ -243,7 +243,7 @@ bootloader ("modify").
>>>>
>>>> All general purpose boot loaders should write the fields marked
>>>> (obligatory). Boot loaders who want to load the kernel at a
>>>> -nonstandard address should fill in the fields marked (reloc); other
>>>> +nonstandard address should consult with the fields marked (reloc);
>> other
>>>> boot loaders can ignore those fields.
>>>>
>>>> The byte order of all fields is littleendian (this is x86, after
>> all.)
>>>
>>> Well, this documentation is written from the point of view of a
>>> *bootloader*, not the kernel. So the 'fill in' says that the
>> bootloader
>>> should write those fields - which is correct, right?
>>>
>>
>> Take pref_address or relocatable_kernel for example, they have type:
>> read (reloc), does boot loader need to write them? I don't see grub
>> does
>> this at least.
>
> Read means the boot later reads them.
>
Sorry I don't know what is going wrong in my mind. For me, if
pref_address has "read (reloc)", base on the current document, it means
boot loader will read it and also write it, which is conflicting. And
the purpose of pref_address should just inform boot loader that kernel
whats itself to be loaded at certain address, it don't want to be written.
--
Sincerely,
Cao jin
Powered by blists - more mailing lists