From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: <x86@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: questions about header.S
Date: Sat, 17 Mar 2018 18:01:27 +0800 [thread overview]
Message-ID: <ac02a918-0c7a-2376-569d-c53a87bc1a42@cn.fujitsu.com> (raw)
Hi,
I find two small questions which confuse me a little.
1.
# Check signature at end of setup
cmpl $0x5a5aaa55, setup_sig
jne setup_bad
setup_sig is defined in setup.ld, which points to the constant also
defined in setup.ld, so I don't figure out in which case they don't
equal and jump to setup_bad?
In my test, drop these 2 lines seems fine, system can boot without any
obvious error.
2.
# Zero the bss
movw $__bss_start, %di
movw $_end+3, %cx
xorl %eax, %eax
subw %di, %cx
shrw $2, %cx
rep; stosl
It is not a big deal, but I think replace "_end" with "__bss_end" make
more sense, and "_end" is already aligned to word length. And, there is
no other code use symbol "__bss_end". So I don't know is there any
reason to use "_end" here?
In my test, replace the 2nd line with:
movw $_end, %cx
or:
movw $__bss_end+3, %cx
are both fine.
--
Sincerely,
Cao jin
next reply other threads:[~2018-03-17 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-17 10:01 Cao jin [this message]
2018-03-21 9:23 ` Cao jin
2018-03-21 9:57 ` Thomas Gleixner
2018-03-22 2:31 ` Cao jin
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=ac02a918-0c7a-2376-569d-c53a87bc1a42@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®