summaryrefslogtreecommitdiff
path: root/pc-bios/linuxboot_dma.bin
AgeCommit message (Collapse)AuthorFilesLines
2017-06-07linuxboot_dma: compile for i486Paolo Bonzini1-0/+0
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. Suggested-by: Richard W.M. Jones <rjones@redhat.com> Suggested-by: Thomas Huth <thuth@redhat.com> Reported-by: Rob Landley <rob@landley.net> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-13optionrom: do not rely on compiler's bswap optimizationPaolo Bonzini1-0/+0
Recent compilers can detect and inline manually-written bswap code, but GCC 4.2.1 (the last GPLv2 version) cannot and generates really awful code. Depending on how the compiler is configured, it might also not want to generate bswap because it was not in i386. Using asm is fine because TCG knows about bswap and all processors with virtualization extensions also do. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-08-09linuxboot_dma: avoid guest ABI breakage on gcc vs. clang compilationPaolo Bonzini1-0/+0
Recent GCC compiles linuxboot_dma.c to 921 bytes, while CentOS 6 needs 1029 and clang needs 1527. Because the size of the ROM, rounded to the next 512 bytes, must match, this causes the API to break between a <1K ROM and one that is bigger. We want to make the ROM 1.5 KB in size, but it's better to make clang produce leaner ROMs, because currently it is worryingly close to the limit. To fix this prevent clang's happy inlining (which -Os cannot prevent). This only requires adding a noinline attribute. Second, the patch makes sure that the ROM has enough padding to prevent ABI breakage on different compilers. The size is now hardcoded in the file that is passed to signrom.py, as was the case before commit 6f71b77 ("scripts/signrom.py: Allow option ROM checksum script to write the size header.", 2016-05-23); signrom.py however will still pad the input to the requested size. This ensures that the padding goes beyond the next multiple of 512 if necessary, and also avoids the need for -fno-toplevel-reorder which clang doesn't support. signrom.py can then error out if the requested size is too small for the actual size of the compiled ROM. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-07-14Add optionrom compatible with fw_cfg DMA versionMarc MarĂ­1-0/+0
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> Message-Id: <1464027093-24073-2-git-send-email-rjones@redhat.com> [Add -fno-toplevel-reorder, support clang without -m16. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>