* [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" @ 2019-09-26 4:21 Cao jin 2019-09-26 6:01 ` Ingo Molnar 0 siblings, 1 reply; 10+ messages in thread From: Cao jin @ 2019-09-26 4:21 UTC (permalink / raw) To: x86, linux-kernel, linux-doc; +Cc: tglx, mingo, bp, hpa, corbet 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@cn.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.) -- 2.21.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 4:21 [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" Cao jin @ 2019-09-26 6:01 ` Ingo Molnar 2019-09-26 6:03 ` hpa 2019-09-26 7:55 ` Cao jin 0 siblings, 2 replies; 10+ messages in thread From: Ingo Molnar @ 2019-09-26 6:01 UTC (permalink / raw) To: Cao jin; +Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, hpa, corbet * Cao jin <caoj.fnst@cn.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@cn.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? Thanks, Ingo ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 6:01 ` Ingo Molnar @ 2019-09-26 6:03 ` hpa 2019-09-26 7:55 ` Cao jin 1 sibling, 0 replies; 10+ messages in thread From: hpa @ 2019-09-26 6:03 UTC (permalink / raw) To: Ingo Molnar, Cao jin Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On September 25, 2019 11:01:39 PM PDT, Ingo Molnar <mingo@kernel.org> wrote: >* Cao jin <caoj.fnst@cn.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@cn.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? > >Thanks, > > Ingo This is correct. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 6:01 ` Ingo Molnar 2019-09-26 6:03 ` hpa @ 2019-09-26 7:55 ` Cao jin 2019-09-26 7:58 ` hpa 1 sibling, 1 reply; 10+ messages in thread From: Cao jin @ 2019-09-26 7:55 UTC (permalink / raw) To: Ingo Molnar; +Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, hpa, corbet On 9/26/19 2:01 PM, Ingo Molnar wrote: > * Cao jin <caoj.fnst@cn.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@cn.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. -- Sincerely, Cao jin ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 7:55 ` Cao jin @ 2019-09-26 7:58 ` hpa 2019-09-26 8:20 ` Cao jin 2019-09-26 15:20 ` Randy Dunlap 0 siblings, 2 replies; 10+ messages in thread From: hpa @ 2019-09-26 7:58 UTC (permalink / raw) To: Cao jin, Ingo Molnar Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On September 26, 2019 12:55:51 AM PDT, Cao jin <caoj.fnst@cn.fujitsu.com> wrote: >On 9/26/19 2:01 PM, Ingo Molnar wrote: >> * Cao jin <caoj.fnst@cn.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@cn.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. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 7:58 ` hpa @ 2019-09-26 8:20 ` Cao jin 2019-09-26 19:18 ` hpa 2019-09-26 15:20 ` Randy Dunlap 1 sibling, 1 reply; 10+ messages in thread From: Cao jin @ 2019-09-26 8:20 UTC (permalink / raw) To: hpa, Ingo Molnar; +Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On 9/26/19 3:58 PM, hpa@zytor.com wrote: > On September 26, 2019 12:55:51 AM PDT, Cao jin <caoj.fnst@cn.fujitsu.com> wrote: >> On 9/26/19 2:01 PM, Ingo Molnar wrote: >>> * Cao jin <caoj.fnst@cn.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@cn.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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 8:20 ` Cao jin @ 2019-09-26 19:18 ` hpa 2019-09-27 2:09 ` Cao jin 0 siblings, 1 reply; 10+ messages in thread From: hpa @ 2019-09-26 19:18 UTC (permalink / raw) To: Cao jin, Ingo Molnar Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On September 26, 2019 1:20:02 AM PDT, Cao jin <caoj.fnst@cn.fujitsu.com> wrote: >On 9/26/19 3:58 PM, hpa@zytor.com wrote: >> On September 26, 2019 12:55:51 AM PDT, Cao jin ><caoj.fnst@cn.fujitsu.com> wrote: >>> On 9/26/19 2:01 PM, Ingo Molnar wrote: >>>> * Cao jin <caoj.fnst@cn.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@cn.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. read (reloc) means it is information for the boot loader to read, but that it can ignore it completely if it does not want to relocate the kernel. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 19:18 ` hpa @ 2019-09-27 2:09 ` Cao jin 0 siblings, 0 replies; 10+ messages in thread From: Cao jin @ 2019-09-27 2:09 UTC (permalink / raw) To: hpa, Ingo Molnar; +Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On 9/27/19 3:18 AM, hpa@zytor.com wrote: > On September 26, 2019 1:20:02 AM PDT, Cao jin <caoj.fnst@cn.fujitsu.com> wrote: >> On 9/26/19 3:58 PM, hpa@zytor.com wrote: >>> On September 26, 2019 12:55:51 AM PDT, Cao jin >> <caoj.fnst@cn.fujitsu.com> wrote: >>>> On 9/26/19 2:01 PM, Ingo Molnar wrote: >>>>> * Cao jin <caoj.fnst@cn.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@cn.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. > > read (reloc) means it is information for the boot loader to read, but that it can ignore it completely if it does not want to relocate the kernel. > so, "read (reloc)" also means boot loader can't write it, right? Please bear my verbiage, see protocol explanation for "(reloc)": "Boot loaders who want to load the kernel at a nonstandard address should fill in the fields marked (reloc);" Doesn't the explanation means: if boot loaders want to relocate the kernel, they should write pref_address? And while pref_address actually just provide a suggestion to boot loader, loader could take it or not as you said, but won't write it. That is why I choose the word "consult with" instead of "fill in". -- Sincerely, Cao jin ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 7:58 ` hpa 2019-09-26 8:20 ` Cao jin @ 2019-09-26 15:20 ` Randy Dunlap 2019-09-26 19:17 ` hpa 1 sibling, 1 reply; 10+ messages in thread From: Randy Dunlap @ 2019-09-26 15:20 UTC (permalink / raw) To: hpa, Cao jin, Ingo Molnar Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On 9/26/19 12:58 AM, hpa@zytor.com wrote: > On September 26, 2019 12:55:51 AM PDT, Cao jin <caoj.fnst@cn.fujitsu.com> wrote: >> On 9/26/19 2:01 PM, Ingo Molnar wrote: >>> * Cao jin <caoj.fnst@cn.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@cn.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. is that boot loader ?? -- ~Randy ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" 2019-09-26 15:20 ` Randy Dunlap @ 2019-09-26 19:17 ` hpa 0 siblings, 0 replies; 10+ messages in thread From: hpa @ 2019-09-26 19:17 UTC (permalink / raw) To: Randy Dunlap, Cao jin, Ingo Molnar Cc: x86, linux-kernel, linux-doc, tglx, mingo, bp, corbet On September 26, 2019 8:20:28 AM PDT, Randy Dunlap <rdunlap@infradead.org> wrote: >On 9/26/19 12:58 AM, hpa@zytor.com wrote: >> On September 26, 2019 12:55:51 AM PDT, Cao jin ><caoj.fnst@cn.fujitsu.com> wrote: >>> On 9/26/19 2:01 PM, Ingo Molnar wrote: >>>> * Cao jin <caoj.fnst@cn.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@cn.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. > >is that boot loader ?? Yes, stupid autocorrect. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-09-27 2:08 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-09-26 4:21 [RFC PATCH] x86/doc/boot_protocol: Correct the description of "reloc" Cao jin 2019-09-26 6:01 ` Ingo Molnar 2019-09-26 6:03 ` hpa 2019-09-26 7:55 ` Cao jin 2019-09-26 7:58 ` hpa 2019-09-26 8:20 ` Cao jin 2019-09-26 19:18 ` hpa 2019-09-27 2:09 ` Cao jin 2019-09-26 15:20 ` Randy Dunlap 2019-09-26 19:17 ` hpa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).