All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: documentation fix regarding boot protocol
@ 2008-12-14 17:50 Philipp Kohlbecher
  2008-12-15  9:22 ` Ian Campbell
  2008-12-16 21:06 ` Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Philipp Kohlbecher @ 2008-12-14 17:50 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin; +Cc: Ian Campbell, linux-kernel

Documentation/x86/boot.txt describes payload_offset as the offset
from the end of the real-mode code. In fact, it is more accurately
described as the offset from the beginning of the protected-mode
code, as (a) this is how it is actually calculated and (b) the padding
after the real-mode code is not included in the offset.

Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>

---

  Documentation/x86/boot.txt |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 83c0033..414b6fb 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -537,8 +537,8 @@ Type:		read
  Offset/size:	0x248/4
  Protocol:	2.08+

-  If non-zero then this field contains the offset from the end of the
-  real-mode code to the payload.
+  If non-zero then this field contains the offset from the beginning
+  of the protected-mode code to the payload.

    The payload may be compressed. The format of both the compressed and
    uncompressed data should be determined using the standard magic

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86: documentation fix regarding boot protocol
  2008-12-14 17:50 [PATCH] x86: documentation fix regarding boot protocol Philipp Kohlbecher
@ 2008-12-15  9:22 ` Ian Campbell
  2008-12-15 11:27   ` Philipp Kohlbecher
  2008-12-15 14:27   ` H. Peter Anvin
  2008-12-16 21:06 ` Ingo Molnar
  1 sibling, 2 replies; 6+ messages in thread
From: Ian Campbell @ 2008-12-15  9:22 UTC (permalink / raw)
  To: Philipp Kohlbecher
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-kernel

On Sun, 2008-12-14 at 18:50 +0100, Philipp Kohlbecher wrote:
> Documentation/x86/boot.txt describes payload_offset as the offset
> from the end of the real-mode code. In fact, it is more accurately
> described as the offset from the beginning of the protected-mode
> code, as (a) this is how it is actually calculated and (b) the padding
> after the real-mode code is not included in the offset.
> 
> Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

The padding after the real-mode code which you mention is just the
implicit padding because the size of the real-mode code is specified in
sectors (and hence is rounded up), isn't it?

Is it worth saying that the payload_offset is relative to (setup_sectors
+1) * 512?

> 
> ---
> 
>   Documentation/x86/boot.txt |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
> index 83c0033..414b6fb 100644
> --- a/Documentation/x86/boot.txt
> +++ b/Documentation/x86/boot.txt
> @@ -537,8 +537,8 @@ Type:		read
>   Offset/size:	0x248/4
>   Protocol:	2.08+
> 
> -  If non-zero then this field contains the offset from the end of the
> -  real-mode code to the payload.
> +  If non-zero then this field contains the offset from the beginning
> +  of the protected-mode code to the payload.
> 
>     The payload may be compressed. The format of both the compressed and
>     uncompressed data should be determined using the standard magic
> 
-- 
Ian Campbell

* weasel wonders how stupid one has to be to spam alt.anonymous.messages
 weasel: about half as stupid as one has to be to harvest it.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86: documentation fix regarding boot protocol
  2008-12-15  9:22 ` Ian Campbell
@ 2008-12-15 11:27   ` Philipp Kohlbecher
  2008-12-15 11:34     ` Ian Campbell
  2008-12-15 14:27   ` H. Peter Anvin
  1 sibling, 1 reply; 6+ messages in thread
From: Philipp Kohlbecher @ 2008-12-15 11:27 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-kernel

Ian Campbell wrote:
> On Sun, 2008-12-14 at 18:50 +0100, Philipp Kohlbecher wrote:
>> Documentation/x86/boot.txt describes payload_offset as the offset
>> from the end of the real-mode code. In fact, it is more accurately
>> described as the offset from the beginning of the protected-mode
>> code, as (a) this is how it is actually calculated and (b) the padding
>> after the real-mode code is not included in the offset.
>>
>> Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>
> 
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> 
> The padding after the real-mode code which you mention is just the
> implicit padding because the size of the real-mode code is specified in
> sectors (and hence is rounded up), isn't it?

Yes, it is. You can certainly view the padding as an implicit part of 
the real-mode code, which is why the current statement isn't wrong -- 
there is simply room for improvement.

> Is it worth saying that the payload_offset is relative to (setup_sectors
> +1) * 512?

The fact that the protected-mode code starts at that address is already 
mentioned under the heading "LOADING THE REST OF THE KERNEL" (where 
protected mode is for some reason referred to as "non-real-mode").
(Please note that the header field is called "setup_sects", not 
"setup_sectors".)

>> ---
>>
>>   Documentation/x86/boot.txt |    4 ++--
>>   1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
>> index 83c0033..414b6fb 100644
>> --- a/Documentation/x86/boot.txt
>> +++ b/Documentation/x86/boot.txt
>> @@ -537,8 +537,8 @@ Type:		read
>>   Offset/size:	0x248/4
>>   Protocol:	2.08+
>>
>> -  If non-zero then this field contains the offset from the end of the
>> -  real-mode code to the payload.
>> +  If non-zero then this field contains the offset from the beginning
>> +  of the protected-mode code to the payload.
>>
>>     The payload may be compressed. The format of both the compressed and
>>     uncompressed data should be determined using the standard magic
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86: documentation fix regarding boot protocol
  2008-12-15 11:27   ` Philipp Kohlbecher
@ 2008-12-15 11:34     ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2008-12-15 11:34 UTC (permalink / raw)
  To: Philipp Kohlbecher
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-kernel

On Mon, 2008-12-15 at 12:27 +0100, Philipp Kohlbecher wrote:
> Ian Campbell wrote:
> > On Sun, 2008-12-14 at 18:50 +0100, Philipp Kohlbecher wrote:
> >> Documentation/x86/boot.txt describes payload_offset as the offset
> >> from the end of the real-mode code. In fact, it is more accurately
> >> described as the offset from the beginning of the protected-mode
> >> code, as (a) this is how it is actually calculated and (b) the padding
> >> after the real-mode code is not included in the offset.
> >>
> >> Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>
> > 
> > Acked-by: Ian Campbell <ijc@hellion.org.uk>
> > 
> > The padding after the real-mode code which you mention is just the
> > implicit padding because the size of the real-mode code is specified in
> > sectors (and hence is rounded up), isn't it?
> 
> Yes, it is. You can certainly view the padding as an implicit part of 
> the real-mode code, which is why the current statement isn't wrong -- 
> there is simply room for improvement.

Agreed.

> > Is it worth saying that the payload_offset is relative to (setup_sectors
> > +1) * 512?
> 
> The fact that the protected-mode code starts at that address is already 
> mentioned under the heading "LOADING THE REST OF THE KERNEL" (where 
> protected mode is for some reason referred to as "non-real-mode").

I'd missed/forgotten that section, I don't think anything extra is
needed then.

Ian.

-- 
Ian Campbell
Current Noise: Orange Goblin - Made Of Rats

Fatal Error: Found [MS-Windows] System -> Repartitioning Disk for Linux...
(By cbbrown@io.org, Christopher Browne)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86: documentation fix regarding boot protocol
  2008-12-15  9:22 ` Ian Campbell
  2008-12-15 11:27   ` Philipp Kohlbecher
@ 2008-12-15 14:27   ` H. Peter Anvin
  1 sibling, 0 replies; 6+ messages in thread
From: H. Peter Anvin @ 2008-12-15 14:27 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Philipp Kohlbecher, Thomas Gleixner, Ingo Molnar, linux-kernel

Ian Campbell wrote:
> 
> The padding after the real-mode code which you mention is just the
> implicit padding because the size of the real-mode code is specified in
> sectors (and hence is rounded up), isn't it?
> 
> Is it worth saying that the payload_offset is relative to (setup_sectors
> +1) * 512?
> 

Yes, the padding is considered part of the real mode code.  The phrasing 
you're suggesting is probably the most unambiguous, though.

	-hpa


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86: documentation fix regarding boot protocol
  2008-12-14 17:50 [PATCH] x86: documentation fix regarding boot protocol Philipp Kohlbecher
  2008-12-15  9:22 ` Ian Campbell
@ 2008-12-16 21:06 ` Ingo Molnar
  1 sibling, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2008-12-16 21:06 UTC (permalink / raw)
  To: Philipp Kohlbecher
  Cc: Thomas Gleixner, H. Peter Anvin, Ian Campbell, linux-kernel


* Philipp Kohlbecher <xt28@gmx.de> wrote:

> Documentation/x86/boot.txt describes payload_offset as the offset
> from the end of the real-mode code. In fact, it is more accurately
> described as the offset from the beginning of the protected-mode
> code, as (a) this is how it is actually calculated and (b) the padding
> after the real-mode code is not included in the offset.
>
> Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>
>
> ---
>
>  Documentation/x86/boot.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

applied to tip/x86/doc, thanks!

	Ingo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-16 21:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-14 17:50 [PATCH] x86: documentation fix regarding boot protocol Philipp Kohlbecher
2008-12-15  9:22 ` Ian Campbell
2008-12-15 11:27   ` Philipp Kohlbecher
2008-12-15 11:34     ` Ian Campbell
2008-12-15 14:27   ` H. Peter Anvin
2008-12-16 21:06 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.