From: "Michael K. Johnson" <johnsonm@rpath.com>
To: jmforbes@linuxtx.org, hpa@zytor.com
Cc: Jordan_Hargrave@Dell.com, linux-kernel@vger.kernel.org
Subject: [PATCH] mark %esi as clobbered in E820 BIOS call
Date: Fri, 27 Mar 2009 13:14:41 -0400 [thread overview]
Message-ID: <20090327171441.GD4363@logo.rdu.rpath.com> (raw)
Justin and Peter, please review this for stable .y trees. Peter,
please review this for trunk unless you decide to do a more
extensive workaround for BIOS register clobbering.
Thanks!
$ cat e820-esi-clobber-workaround.patch
Jordan Hargrave diagnosed a BIOS clobbering %esi in the E820 call.
That particular BIOS has been fixed, but there is a possibility that
this is responsible for other occasional reports of early boot
failure, and it does not hurt to add %esi to the clobbers.
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Justin Forbes <jmforbes@linuxtx.org>
Signed-off-by: Michael K Johnson <johnsonm@rpath.com>
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index 8c3c25f..fa85af7 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -27,13 +27,14 @@ static int detect_memory_e820(void)
do {
size = sizeof(struct e820entry);
- /* Important: %edx is clobbered by some BIOSes,
- so it must be either used for the error output
+ /* Important: %edx and %esi are clobbered by some BIOSes,
+ so they must be either used for the error output
or explicitly marked clobbered. */
asm("int $0x15; setc %0"
: "=d" (err), "+b" (next), "=a" (id), "+c" (size),
"=m" (*desc)
- : "D" (desc), "d" (SMAP), "a" (0xe820));
+ : "D" (desc), "d" (SMAP), "a" (0xe820)
+ : "%esi");
/* BIOSes which terminate the chain with CF = 1 as opposed
to %ebx = 0 don't always report the SMAP signature on
next reply other threads:[~2009-03-27 17:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 17:14 Michael K. Johnson [this message]
2009-03-28 11:20 ` [PATCH] mark %esi as clobbered in E820 BIOS call Ingo Molnar
2009-03-28 19:18 ` H. Peter Anvin
2009-04-01 16:40 ` [GIT PULL] x86 setup BIOS workarounds H. Peter Anvin
2009-04-01 18:24 ` Linus Torvalds
2009-04-01 18:51 ` H. Peter Anvin
2009-04-02 4:26 ` Len Brown
2009-04-02 19:31 ` Linus Torvalds
2009-04-02 4:15 ` Len Brown
2009-04-02 20:07 ` H. Peter Anvin
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=20090327171441.GD4363@logo.rdu.rpath.com \
--to=johnsonm@rpath.com \
--cc=Jordan_Hargrave@Dell.com \
--cc=hpa@zytor.com \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.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