Skip to contentSkip to conversation

linuxboot_dma: compile for i486

PATCH In review Paolo Bonzini 2 participants 2 messages May 31, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linuxboot_dma: compile for i486

The ROM uses the cmovne instruction, which is new in Pentium Pro and does not work when running QEMU with "-cpu 486". Avoid producing that instruction.

---
 pc-bios/linuxboot_dma.bin  | Bin 1536 -> 1536 bytes
 pc-bios/optionrom/Makefile |   1 +
 2 files changed, 1 insertion(+)
pc-bios/linuxboot_dma.bin binary +0 -0
index 218d3ab4a29bfb5ab7125ec7a4d29dad1860c673..d176f62797813e4b926dca9dfce7ce554dc1a4d6 100644
GIT binary patch
pc-bios/optionrom/Makefile +1 -0
index fa53d9e58e..a9a9e5e7eb 100644
@@ -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=i486
 
 # Drop -fstack-protector and the like
 QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) $(CFLAGS_NOPIE) -ffreestanding
Signature · 1 line
2.13.0
#1 lore raw
Quoted 8 lines · Paolo Bonzini

The ROM uses the cmovne instruction, which is new in Pentium Pro and does not work when running QEMU with "-cpu 486". Avoid producing that instruction.

I tested this using the reporter's test image
(http://landley.net/aboriginal/downloads/binaries/system-image-i486.tar.gz)
and it fixes the problem over here.

ACK.

Rich.

Quoted 47 lines
 pc-bios/linuxboot_dma.bin  | Bin 1536 -> 1536 bytes
 pc-bios/optionrom/Makefile |   1 +
 2 files changed, 1 insertion(+)
pc-bios/linuxboot_dma.bin binary +0 -0
index 218d3ab4a29bfb5ab7125ec7a4d29dad1860c673..d176f62797813e4b926dca9dfce7ce554dc1a4d6 100644
GIT binary patch
pc-bios/optionrom/Makefile +1 -0
index fa53d9e58e..a9a9e5e7eb 100644
@@ -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=i486
 
 # Drop -fstack-protector and the like
 QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) $(CFLAGS_NOPIE) -ffreestanding
Signature · 1 line
2.13.0
Signature · 5 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW