[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA v
Re: [Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version
Thu, 7 Apr 2016 10:54:33 +0200
On Mon, 4 Apr 2016 16:02:04 +0100
Stefan Hajnoczi <address@hidden> wrote:
> On Fri, Apr 01, 2016 at 01:43:47PM +0100, Richard W.M. Jones wrote:
> > From: Marc Marí <address@hidden>
> > This optionrom is based on linuxboot.S.
> > Signed-off-by: Marc Marí <address@hidden>
> > Signed-off-by: Richard W.M. Jones <address@hidden>
> > ---
> > .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?
I'm sorry I have not answered before, it's been a very busy week.
What's missing (as I remember it):
- Debug loading an initrd from the new linuxboot
- Other minor comments in the thread (mainly, compile using mingw).
- Make it possible to disable DMA fw_cfg.
I've been putting this patch at the back of my todo list for too long.
Let me address some deadlines for this week, and then I'll finish this
> > 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 <address@hidden>:
> 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: *** [linuxboot_dma.img] Error 1
> and then:
> Testing shows two more problems:
> (1) initrd loading is broken, kernel complains it finds only
> [ 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.
Re: [Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version, Michael S. Tsirkin, 2016/04/04