We already have a working multiboot implementation that uses fw_cfg to get
its kernel module etc. data in int19 runtime now.
So what's missing is a working linux boot option rom. While at it I figured it
would be a good idea to take the opcode generator out of pc.c and instead use
a proper option rom, like we do with multiboot.
So here it is - an fw_cfg using option rom for -kernel with linux!
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
We will have a linux boot option rom soon, so let's take all functionality
that might be useful for both to a header file that both roms can include.
That way we only have to write fw_cfg access code once.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Right now we load the guest kernel to RAM, fire off the BIOS, hope it
doesn't clobber memory and run an option rom that jumps into the kernel.
That breaks with SeaBIOS, as that clears memory. So let's read all
kernel, module etc. data using the fw_cfg interface when in the int19
handler.
This patch implements said mechanism for multiboot.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Rename pxe-eepro100.bin to pxe-i82559er.bin.
The other devices supported by eepro100.c need
additional pxe boot ROM images.
* Call rom_add_option during initialisation.
The code won't work with two or more different
eepro100 devices, because it only adds one option
ROM, but this use case is perhaps never needed.
Using this patch, model=i82559er at least works partially.
For full support, more eepro100 patches are needed
(will follow later, can be fetched from ar7 branch
of QEMU).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
SeaBIOS is a port of pc-bios to GCC. Besides using a more modern tool chain,
SeaBIOS introduces a number of new features including PMM support, better
BEV and BCV support, and better PnP support.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
On Wed, Sep 23, 2009 at 10:55:02PM +0200, Juergen Lock wrote:
> On Wed, Sep 23, 2009 at 09:31:16PM +0100, Laurence Tratt wrote:
>[...]
> > then the above error doesn't occur, but
> > pc-bios/optionrom/multiboot.S dies as follows:
> >
> > $
> > AS optionrom/multiboot.o
> > multiboot.S: Assembler messages:
> > multiboot.S:116: Error: `%es:-4(%edi)' is not a valid 16 bit base/index
> > expression
> > $
> >
> > What little Intel assembler I ever knew has long since departed from my
> > brain, so I don't know why that error occurs, nor what a fix might be.
> >
> It occurs because of too old binutils (as(1) in this case), on FreeBSD
> we now have a port for newer ones,
> http://www.freshports.org/devel/binutils
> so I depend on that and have the optionrom Makefile use the new as
> like this: (the first change wrt CFLAGS is unrelated and has probably
> been fixed in the meantime; it caused gmake to complain about
> recursive use of CFLAGS.)
>
> Index: qemu/pc-bios/optionrom/Makefile
> @@ -9,10 +9,13 @@
>
> CFLAGS = -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
> CFLAGS += -I$(SRC_PATH)
> -CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector,"")
> +CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-stack-protector,"")
>
> build-all: multiboot.bin
>
> +%.o: %.S
> + $(CC) -E $(CFLAGS) -o - -c $< |${LOCALBASE}/bin/as -V -Qy -o $@
> +
> %.img: %.o
> $(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
>
That patch didn't seem to help on OpenBSD so I now finally got around
making another one that just emits the bytes of the offending insn
instead so people can keep using old assemblers:
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cc-option uses more make-syntax to replace the shell "if/else".
Issue with recursive += is fixed by doing the first assignment
simply-expanded, as explained in
http://www.gnu.org/software/make/manual/html_node/Appending.html
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Now we have to variables: QEMU_CFLAGS: flags without which we can't compile
CFLAGS: "-g -O2"
We can now run:
make CFLAGS="-fbar" foo.o
make CFLAGS="" foo.o
make CFLAGS="-O3" foo.o
And it all should work.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
The printf command takes an octal value after \, so we have to convert
our decimal representation to octal first and then write it.
This unbreaks extboot signing. Multiboot wasn't affected yet because
the checksum was < 8.
Spotted and first patch by Glauber Costa <glommer@redhat.com>.
Printf idea by Paolo Bonzini <bonzini@gnu.org>.
Signed-off-by: Alexander Graf <agraf@suse.de>
CC: Glauber Costa <glommer@redhat.com>
CC: Paolo Bonzini <bonzini@gnu.org>
CC: Jan Ondrej <ondrejj@salstar.sk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
We're marking the used entry bitmap in smbios_load_external() for each
type we check, regardless of whether we loaded anything. This makes
subsequent calls behave as if we've already loaded the tables from qemu
and can result in missing tables (ex. multiple type4 entries on an SMP
guest). Only mark the bitmap if we actually load something.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
In order to not execute code we just compiled, let's replace signrom
with a shell script that does the same thing while staying compatible
to pretty much every system available.
This should make cross-compilation for windows easier.
aliguori: fix build when objdir != srcdir
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
For Sparc64, this fixes the PCI bridge configuration bugs revealed by the
improved bridge handling (b7ee1603c1).
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
In order to build the multiboot option rom, we need a Makefile and a tool
to sign the rom with.
Both are provided by this patch and mostly taken from the extboot source,
written by Anthony Liguori.
Once built, the resulting binary gets copied to pc-bios automatically.
Building also occurs automatically when on an x86 host.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This patch implements support for Multiboot on x86 for -kernel.
Multiboot is a "new" approach to get rid of different bootloaders, providing
a unified interface for the kernel. It supports command line options and
kernel modules.
The two probably best known projects using multiboot are Xen and GNU Hurd.
This implementation should be mostly feature-complete. It is missing VBE
extensions, but as no system uses them currently it does not really hurt.
To use multiboot, specify the kernel as -kernel option. Modules should be given
as -initrd options, seperated by a comma (,). -append also works.
Please bear in mind that grub also does gzip decompression, which qemu does
not do yet. To run existing images, please ungzip them first.
The guest multiboot loader code is implemented as option rom using int 19.
Parts of the work are based on efforts by Rene Rebe, who originally ported
my code to int 19.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This isn't the most ideal layout, but it makes -L /path/to/git/pc-bios Just
Work which is very convenient.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Bit 0 is the enable bit, which we not only don't want to set, but
it will stick and make us think it's an I/O port resource.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
uses the QEMU firmware configuration interfacce to send the NUMA
topology to the BIOS, which has to setup the tables. Only one firmware
configuration channel is used.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7212 c046a42c-6fe2-441c-8c8c-71466251a162
Create a new -smbios option (x86-only) to allow binary SMBIOS entries
to be passed through to the BIOS or modify the default values of
individual fields of type 0 and 1 entries on the command line.
Binary SMBIOS entries can be generated as follows:
dmidecode -t 1 -u | grep $'^\t\t[^"]' | xargs -n1 | \
perl -lne 'printf "%c", hex($_)' > smbios_type_1.bin
These can then be passed to the BIOS using this switch:
-smbios file=smbios_type_1.bin
Command line generation supports the following syntax:
-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]
-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]
[,uuid=$(uuidgen)][,sku=str][,family=str]
For instance, to add a serial number to the type 1 table:
-smbios type=1,serial=0123456789
Interface is extensible to support more fields/tables as needed.
aliguori: remove texi formatting from help output
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7163 c046a42c-6fe2-441c-8c8c-71466251a162
From the documentation I can find, this register is supposed to be read-only.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7070 c046a42c-6fe2-441c-8c8c-71466251a162
Use firmware configuration device for boot device, kernel, initrd and
kernel command line parameters on PPC, Sparc32 and Sparc64.
Update OpenBIOS images to r479 which supports the change.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6777 c046a42c-6fe2-441c-8c8c-71466251a162
mpc8544ds.dts is copied from kerenl.
Non-supported devices has been removed.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Acked-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6664 c046a42c-6fe2-441c-8c8c-71466251a162
This is needed to dynamically add SLIC tables with Windows
activation keys.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6650 c046a42c-6fe2-441c-8c8c-71466251a162
A number of patches were merged since we last pulled.
Thanks to Marcelo Tosatti for rebasing the existing patches and testing.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6589 c046a42c-6fe2-441c-8c8c-71466251a162
The VNC protocol contains quite some constants, some of which are
currently hardcoded in the vnc.c code. This is not exactly pretty.
Let's move all those constants out to vnc.h, so they are clearly
separated. While at it, I also included other defines that will be
used later in this patch series.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6493 c046a42c-6fe2-441c-8c8c-71466251a162
See each patch for individual Signed-off-by's/commit logs
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6392 c046a42c-6fe2-441c-8c8c-71466251a162
They have applied all of our patches and they have an additional HPET fix.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6289 c046a42c-6fe2-441c-8c8c-71466251a162
A number of our patches have been merged so we can now remove them from our
queue.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6117 c046a42c-6fe2-441c-8c8c-71466251a162
aliguori: did a little indenting and motion for aesthics.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6109 c046a42c-6fe2-441c-8c8c-71466251a162
Apparently, guests are very tolerant of corrupt ACPI tables because our
tables have been badly corrupted for some time now. A version of
Knoppix using a 2.6.11 kernel refused to boot and it turned out it was
due to the interrupt override table introduced by the recent HPET
commit.
This patch updates the BIOS and introduces a patch to pack the ACPI
tables. If you have a guest that used to work and is broken by the this
commit, let me know. We have some weird hacks in the tables that I
suspect are work arounds for this bug.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6108 c046a42c-6fe2-441c-8c8c-71466251a162
This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpet
provides a more finely granular clocksource than otherwise available on PC.
This means that latency-dependent applications (e.g. multimedia) will generally
be smoother when using the HPET.
Signed-off-by: Beth Kon <eak@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6081 c046a42c-6fe2-441c-8c8c-71466251a162
Now built from the kernel.org git tree.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6079 c046a42c-6fe2-441c-8c8c-71466251a162
mirror is updated more regularly and reliably.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6078 c046a42c-6fe2-441c-8c8c-71466251a162
Update the PC BIOS to the latest version, split out the patches into
patch series, and update the README to point to the new location of the
Bochs BIOS source tree.
Also update the gitignore to allow the patch queue directory to be used.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6077 c046a42c-6fe2-441c-8c8c-71466251a162
Since most IO devices are integrated into the 440EP chip, "Bamboo support"
mostly entails implementing the -kernel, -initrd, and -append options.
These options are implemented by loading the guest as if u-boot had done it,
i.e. loading a flat device tree, updating it to hold initrd addresses, ram
size, and command line, and passing the FDT address in r3.
Since we use it with KVM, we enable the virtio block driver and include hooks
necessary for KVM support.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6067 c046a42c-6fe2-441c-8c8c-71466251a162
Changes:
r219: Fix #size-cells for HelenOS, add /openprom/version node
r220: Fix typo
r221: More realistic mmu_translate
r222: Fix device names to allow Net/OpenBSD to boot
r223: add set-callback for Aurora 2.0
r224: Switch keyboard controller to translated mode so it works as expected
r225: Add mmu release (claim added in r219)
r226: Set variable defaults before nvram_init also for Sparc64 (cf. r136)
r227: Use nvram boot-args and boot-device variables also for Sparc64 (cf. r137)
r228: Fix compilation on OpenBSD: avoid accidental system include file use
r229: Rename /packages/client-iface to /openprom/client-services
r230
From Igor V. Kovalenko:
This openbios-grubfs-ext2fs-block.patch fixes a problem where inode
pointer is truncated to 32bit integer and then sign-extended to 64bit
integer while passing second pointer argument to ext2_rdfsb.
r231: Fix pad alignment
r232: Remove package finding code that finds unrelated packages
r233: Fix virtual to physical address translation (Igor Kovalenko)
r234: Implement itlb/dtlb directed writes (Igor Kovalenko)
r235: Fix warnings that would be caused by ld flag --warn-common
r236: Enable ld flag --warn-common
r237: Use the firmware device introduced in Qemu SVN r5256
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5262 c046a42c-6fe2-441c-8c8c-71466251a162
r186: Revert broken r161, fix identification string printing (Igor Kovalenko)
r187: Fix NetBSD reset problem
r188: Add a TODO for Sparc
r189: Fix some Sparc32 compile warnings
r190: Fix some Sparc64 compile warnings
r191: Add prototypes for [v]snprintf
r192: Add a common header file for libgcc functions
r193: Implement obmem for NetBSD loader
r194: Add Make dependencies for some files, unify Sparc32/64 build.xml files
r195: Remove debug messages
r196: Add a.out support for SILO
r198: Add a CPU node
r199: Add (bogus) memory nodes
r200: Add idprom node
r201: Make serial console usable
r202: Add MMU node and ops
r203: Add trap table setting function to client interface
r204: Fix MMU translation
r205: Handle 32 bit windows, remove now unused files
r206: Support for simple boot device selection
r207: Fix TLB entry generation
r208: Fix printing of exception messages
r209: Set up tick_cmpr, update assembly flags
r210: Add a clock-frequency node
r211:
Fix available and total memory
Implement a static list of mmu translations
Map more pages
Add a fake unmap method
r212: Fix builtin.c dependencies
r213: Add FCode boot loader for Solaris etc.
r214: Add correct reset vectors
r215: Add T1 and T2 CPUs
r216: Fix wrong translations
r217: Add bootargs property for kernel command line
r218:
Finally fix the very obscure problem which prevented normal and especially
FCode boot: too small heap (used for Forth memory)!
Remove forced arch_init and boot hacks
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4983 c046a42c-6fe2-441c-8c8c-71466251a162
r182: Add handlers for timer interrupts
r183: Print a message and halt if Sun4c or Sun4d
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3875 c046a42c-6fe2-441c-8c8c-71466251a162
r177:
Reset fixes:
* recalculate CRC to avoid error message and halt after reset
* fix bug that crashed SS10/SMP when reset
r178: Remove unused variable
r179: Improved Module ID generation
r180: Add support for eccmemctl
r181: Add support for SPARCstation 20 machine type
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3804 c046a42c-6fe2-441c-8c8c-71466251a162
r172: Enable boot mode in the exception handler for both SuperSparc and TurboSparc
r173: More CPU definitions
r174: Add Sparc64 CPU identification
r175: Add SPARCserver 600MP emulation
r176: Update OHW interface to version 3.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3649 c046a42c-6fe2-441c-8c8c-71466251a162
r150: Try to fix system reset for SMP and SS-10 cases
r151: Fix obp_dumb_memalloc
r152: Fix mapping more than 2G memory
r153: Get a real memory allocator for Sparc, based on PPC ofmem
r154: Update totavail when memory is allocated by dumb memory allocator
r155: Fix pop_fstr_copy memory leaks
- console one prevented Debian 3.1r1 from installing in console=prom mode
- fixing this also needed the real malloc/free
r156: Hack for building on CIFS directory
r157: Allow boot start PC to be different from virtual location (boot mode)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3029 c046a42c-6fe2-441c-8c8c-71466251a162
r145: Fix power-management location for SS-10
r146: Fix overallocation
r147: NetBSD and OpenBSD fixes:
- Correct timer and interrupt controller mappings
- Add ESP clock frequency to avoid division by zero
- CS4231 exists only in SS5
- Disable BPP for now, it's not emulated by Qemu anyway
With these fixes, one NetBSD kernel even got to root device prompt on SS5.
r148: Update vsprintf.c from Linux to get 64-bit output
r149: Use full 36-bit physical address space on SS10
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2831 c046a42c-6fe2-441c-8c8c-71466251a162