All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [Q] x86 - boot/header.S
Date: Sat, 23 Feb 2008 12:21:36 +0300	[thread overview]
Message-ID: <20080223092136.GC6747@cvg> (raw)
In-Reply-To: <20080223091817.GC12161@uranus.ravnborg.org>

[Sam Ravnborg - Sat, Feb 23, 2008 at 10:18:17AM +0100]
| On Sat, Feb 23, 2008 at 12:07:39PM +0300, Cyrill Gorcunov wrote:
| > [Yinghai Lu - Sat, Feb 23, 2008 at 12:44:49AM -0800]
| > | On Sat, Feb 23, 2008 at 12:20 AM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
| > | > Hi Peter, Sam,
| > | >
| > | >  could you take a look on x86/boot/header.S:280 please?
| > | >
| > | >  # Zero the bss
| > | >         movw    $__bss_start, %di
| > | >         movw    $_end+3, %cx
| > | >         xorl    %eax, %eax
| > | >         subw    %di, %cx
| > | >         shrw    $2, %cx
| > | >         rep; stosl
| > | >
| > | >  I wonder why is $_end there instead of $__bss_stop?
| > | >  Well, accroding to vmlinux_32.lsd both _end and __bss_stop
| > | >  are the same BUT __bss_stop is more convenient methink.
| > | >  Would it be usefull to change?
| > | 
| > | we should have head32.c like head64.c
| > | and x86_32_start_kernel.
| > | 
| > | Eric's patch long time ago...
| > | 
| > | YH
| > | 
| > 
| > Hi Yinghai,
| > 
| > thanks for reply BUT that is not the point (or maybe I miss something).
| > 
| > Look, we only have head64.c - there is no head32.c at all. Both
| > vmlinux_32/64.lds defines _end exactly the same as __bss_stop. So in
| > code which DO fillup bss section with zeros the prefered name is
| > __bss_stop. The only thing I'm trying to say that it would be clean
| > naming scheme and I think it would help for further review - instead
| > of searching all over x86 files to find _end definition __bss_stop
| > tell us WHAT we are zeroing from the code.
| 
| We should introduce head32.c and then we can use the exact same function
| as 64 bit does:
| 
| /* Don't add a printk in there. printk relies on the PDA which is not initialized
|    yet. */
| static void __init clear_bss(void)
| {
|         memset(__bss_start, 0,
|                (unsigned long) __bss_stop - (unsigned long) __bss_start);
| }
| 
| This answers your Q.
| 
| I already resubmitted Eric's original patch to introduce head32.c as I also
| liked the cleanup in two Makefiles.
| 
| 	Sam
| 

thanks Sam, i just saw your patch.

		- Cyrill -

  reply	other threads:[~2008-02-23  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-23  8:20 [Q] x86 - boot/header.S Cyrill Gorcunov
2008-02-23  8:44 ` Yinghai Lu
2008-02-23  9:07   ` Cyrill Gorcunov
2008-02-23  9:18     ` Sam Ravnborg
2008-02-23  9:21       ` Cyrill Gorcunov [this message]
2008-02-25  2:17     ` H. Peter Anvin
2008-02-25  2:15 ` H. Peter Anvin
2008-02-25  8:06   ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080223092136.GC6747@cvg \
    --to=gorcunov@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.