All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Michael K. Johnson" <johnsonm@rpath.com>,
	jmforbes@linuxtx.org, Jordan_Hargrave@Dell.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mark %esi as clobbered in E820 BIOS call
Date: Sat, 28 Mar 2009 12:18:15 -0700	[thread overview]
Message-ID: <49CE77F7.8020509@zytor.com> (raw)
In-Reply-To: <20090328112035.GA11146@elte.hu>

Ingo Molnar wrote:
> * Michael K. Johnson <johnsonm@rpath.com> wrote:
> 
>> 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.
> 
> nice fix! Would you mind to update the clobber list to include _all_ 
> registers? I dont see why any of the other registers couldnt be 
> clobbered by a BIOS, and this is boot-only code so micro-performance 
> is not an issue.

%esi and %ebp are the only registers that aren't already clobbered.  gcc
doesn't like %ebp clobbers, so it has to be done via push..pop.  I have
been thinking about doing a generic register-save wrapper for *all* BIOS
calls; this plus the recent patch to do a bunch of similar hacks for
VESA calls kind of tells me it's time to do this.  However, I'm going to
clean up this for the trunk and Cc: stable for now.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  reply	other threads:[~2009-03-28 19:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 17:14 [PATCH] mark %esi as clobbered in E820 BIOS call Michael K. Johnson
2009-03-28 11:20 ` Ingo Molnar
2009-03-28 19:18   ` H. Peter Anvin [this message]
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=49CE77F7.8020509@zytor.com \
    --to=hpa@zytor.com \
    --cc=Jordan_Hargrave@Dell.com \
    --cc=jmforbes@linuxtx.org \
    --cc=johnsonm@rpath.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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.