qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Marc Marí" <marc.mari.barcelo@gmail.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 9 May 2016 23:16:00 +0200	[thread overview]
Message-ID: <62d1c78f-b216-bdc0-54df-97bca92962ca@redhat.com> (raw)
In-Reply-To: <20160509164814.GS1683@redhat.com>

On 05/09/16 18:48, Richard W.M. Jones wrote:
> 
> Actually there's a rather more fundamental problem.  In the current
> linuxboot_dma.c we use asm statements at the top and bottom of the
> file (outside any function).  The asm statements define the header and
> what I assume is the footer of the file.  At any rate, they encode the
> size of the file (the calculation `.byte (_end - _start) / 512').
> 
> Clang just rearranges everything in the file, so the _start and _end
> asm snippets appear together at the beginning of the input to the
> assembler, and nothing works after that.
> 
> So that pretty much screws up the whole project of trying to write an
> option ROM in C.
> 
> Of course we're well outside any standards here.  Can we tell clang
> users to use the GCC/pre-compiled option ROMs :-?  Any other ideas?  I
> don't think I've missed a flag (GCC has -fno-toplevel-reorder, but
> clang 3.8 doesn't ...)

IIRC for a while we used to ship pre-compiled ACPI byte-code, for people
who didn't have "iasl" installed.

We could make this C source file gcc-only, and provide a pre-compiled
assembly source file for those platforms that only have clang.

Laszlo

  reply	other threads:[~2016-05-09 21:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 16:04 [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version Richard W.M. Jones
2016-04-25 16:04 ` Richard W.M. Jones
2016-05-08 18:57   ` Marc Marí
2016-04-26  9:59 ` Stefan Hajnoczi
2016-05-09 13:24 ` Stefan Hajnoczi
2016-05-09 15:31   ` Stefan Hajnoczi
2016-05-09 16:12     ` Richard W.M. Jones
2016-05-09 16:48     ` Richard W.M. Jones
2016-05-09 21:16       ` Laszlo Ersek [this message]
2016-05-09 21:37         ` Richard W.M. Jones
2016-05-10 17:19           ` Paolo Bonzini
2016-05-10 17:24       ` Paolo Bonzini
2016-05-10 17:36         ` Richard W.M. Jones
2016-05-10 19:00           ` Laszlo Ersek

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=62d1c78f-b216-bdc0-54df-97bca92962ca@redhat.com \
    --to=lersek@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marc.mari.barcelo@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=rth@twiddle.net \
    --cc=stefanha@gmail.com \
    --cc=stefanha@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).