qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: marc.mari.barcelo@gmail.com, ehabkost@redhat.com, mst@redhat.com,
	qemu-devel@nongnu.org, kraxel@redhat.com, pbonzini@redhat.com,
	rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 4 Apr 2016 16:02:04 +0100	[thread overview]
Message-ID: <20160404150204.GB13632@stefanha-x1.localdomain> (raw)
In-Reply-To: <1459514627-23867-2-git-send-email-rjones@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2674 bytes --]

On Fri, Apr 01, 2016 at 01:43:47PM +0100, Richard W.M. Jones wrote:
> From: Marc Marí <markmb@redhat.com>
> 
> This optionrom is based on linuxboot.S.
> 
> Signed-off-by: Marc Marí <markmb@redhat.com>
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
>  .gitignore                        |   4 +
>  hw/i386/pc.c                      |   9 +-
>  hw/nvram/fw_cfg.c                 |   2 +-
>  include/hw/nvram/fw_cfg.h         |   1 +
>  pc-bios/optionrom/Makefile        |   7 +-
>  pc-bios/optionrom/linuxboot_dma.c | 297 ++++++++++++++++++++++++++++++++++++++
>  6 files changed, 315 insertions(+), 5 deletions(-)
>  create mode 100644 pc-bios/optionrom/linuxboot_dma.c

It would be great to merge this but there's more work necessary.

I CCed Marc's current email address.  He was interning at Red Hat but is
now back at university so the Red Hat address is not being read.

Marc: What was still missing from this patch?

> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index ce4852a..bdd0cc1 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -13,15 +13,18 @@ CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
>  CFLAGS += -I$(SRC_PATH)
>  CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector)
>  CFLAGS += $(CFLAGS_NOPIE)
> +CFLAGS += -m32
>  QEMU_CFLAGS = $(CFLAGS)
>  
> -build-all: multiboot.bin linuxboot.bin kvmvapic.bin
> +ASFLAGS += -32
> +
> +build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
>  
>  # suppress auto-removal of intermediate files
>  .SECONDARY:
>  
>  %.img: %.o
> -	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -Ttext 0 -e _start -s -o $@ $<,"  Building $(TARGET_DIR)$@")
> +	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m elf_i386 -Ttext 0 -e _start -s -o $@ $<,"  Building $(TARGET_DIR)$@")

Gerd noted in <1454411187.9300.54.camel@redhat.com>:

  Hmm, that breaks the windows cross build:

  make: Entering directory `/home/kraxel/projects/qemu/build-win32'
  Building optionrom/linuxboot_dma.img
  i686-w64-mingw32-ld: unrecognised emulation mode: elf_i386
  Supported emulations: i386pe
  make[1]: *** [linuxboot_dma.img] Error 1

and then:

  Testing shows two more problems:

  (1) initrd loading is broken, kernel complains it finds only gibberish:

  [    0.934582] Unpacking initramfs...
  [    1.166983] Initramfs unpacking failed: junk in compressed archive
  [    1.168458] Freeing initrd memory: 32812k freed

  (2) going back to non-dma boot via -M pc-$old doesn't work, appearently
      fw_cfg dma is enabled even for old machine types.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-04-04 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 12:43 [Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version Richard W.M. Jones
2016-04-01 12:43 ` Richard W.M. Jones
2016-04-04 15:02   ` Stefan Hajnoczi [this message]
2016-04-04 15:21     ` Richard W.M. Jones
2016-04-05  7:29       ` Gerd Hoffmann
2016-04-22 12:23         ` Richard W.M. Jones
2016-04-05 12:51       ` Laszlo Ersek
2016-04-05 13:09         ` Paolo Bonzini
2016-04-07  8:54     ` Marc Marí
2016-04-04 15:12 ` Michael S. Tsirkin

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=20160404150204.GB13632@stefanha-x1.localdomain \
    --to=stefanha@gmail.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 \
    /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).