qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc Marí" <markmb@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
Date: Mon, 29 May 2017 13:20:41 +0200	[thread overview]
Message-ID: <0bcac9a0-f633-1ed1-6917-ab43776daddc@redhat.com> (raw)
In-Reply-To: <20170529101413.GN16511@redhat.com>

On 29.05.2017 12:14, Richard W.M. Jones wrote:
> On Mon, May 29, 2017 at 11:22:14AM +0200, Thomas Huth wrote:
>> On 28.05.2017 07:18, Rob Landley wrote:
>>> You can't boot a kernel under -cpu 486 since that commit (hangs
>>> producing no output) because it added a bios image that won't run on
>>> anything short of pentium II.
>>>
>>> You can try the run-emulator.sh script in
>>> http://landley.net/aboriginal/downloads/binaries/system-image-i486.tar.gz
>>> before and after that commit to check for yourself.
>>
>>  Hi Rob,
>>
>> thanks for the bug report ... but to make sure that your mail does not
>> get lost in the high traffic of the qemu-devel mailing list, it might be
>> a good idea to CC: the people from that commit b2a575a1c652 in this case
>> (which I've done now).
> 
> I see in the disassembly use of cmovne (new in Pentium Pro) and
> bswap (new in 486).
> [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/InstructionSetSummary.pdf]
> 
> The cmovne instruction is generated by the compiler (GCC in my case),
> 
> The following patch removes the cmovne instruction, so it should work
> on 486 (although I didn't test it).  It's not possible to remove bswap
> without surgery on the inline assembler.
> 
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -13,6 +13,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/optionrom)
>  ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0)
>  override CFLAGS += -O2
>  endif
> +override CFLAGS += -march=i386

I guess you could also use "-march=i486" here instead, since QEMU does
not emulate a 386, as far as I can see.

 Thomas

  reply	other threads:[~2017-05-29 11:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28  5:18 [Qemu-devel] Commit b2a575a1c652 broke i486 support Rob Landley
2017-05-29  9:22 ` Thomas Huth
2017-05-29 10:14   ` Richard W.M. Jones
2017-05-29 11:20     ` Thomas Huth [this message]
2017-05-30 19:05     ` Rob Landley
2017-05-31  8:58       ` Thomas Huth
2017-05-31  9:03       ` Richard W.M. Jones
2017-05-31 12:34       ` Paolo Bonzini

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=0bcac9a0-f633-1ed1-6917-ab43776daddc@redhat.com \
    --to=thuth@redhat.com \
    --cc=markmb@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).