qboot.git
2 years agoqboot: Disable PIE for ELF binary build step master github/master
Sven Eckelmann [Fri, 22 May 2020 07:36:52 +0000 (09:36 +0200)] 
qboot: Disable PIE for ELF binary build step

The switch to meson in commit fd2aada36b98 ("Add meson build") had two
major behavior changes for the ELF binary build step:

* ELF binary is no longer build as x86_64 on x86_64
* ELF binary is build as position independent executable on systems with a
  "--enable-default-pie" gcc

The latter will create a slightly larger than 64KB bios.bin which causes an
error when Qemu tries to load it:

  qemu: could not load PC BIOS 'qboot/build/bios.bin'

This behavior change was introduced because the elf linker step was changed
from using ld directly to using cc. Basically something like following
Makefile change:

   bios.bin.elf: $(obj-y) flat.lds
  -        $(LD) -T flat.lds -o bios.bin.elf $(obj-y)
  +        $(CC) -o bios.bin.elf $(obj-y) -Wl,--no-undefined -Wl,--as-needed -nostdlib -m32 -Wl,--build-id=none -Wl,-Tflat.lds

GCC will then take care of calling ld with the appropriate arguments. And
one of these arguments for the "--enable-default-pie" gcc is "-pie":

  $(LD) --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o bios.bin.elf $(obj-y) --no-undefined --as-needed --build-id=none -Tflat.lds

This default behavior of gcc must be suppressed by adding -no-pie to the
arguments when linking the object files.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2 years agoFix initrd base address for PVH boot
Lorenz Brun [Thu, 23 Apr 2020 07:46:45 +0000 (09:46 +0200)] 
Fix initrd base address for PVH boot

2 years agorecord minimum version of meson that is needed
Paolo Bonzini [Fri, 13 Mar 2020 15:06:50 +0000 (16:06 +0100)] 
record minimum version of meson that is needed

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agolimit C headers to freestanding ones
Paolo Bonzini [Wed, 18 Dec 2019 10:02:53 +0000 (11:02 +0100)] 
limit C headers to freestanding ones

inttypes.h is not part of the subset of standard headers for
freestanding environments.  Replace it with stdint.h.

Also include string.h with quotes, since we provide it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoUpdate README
Marc-Andre Lureau [Fri, 13 Dec 2019 15:05:23 +0000 (19:05 +0400)] 
Update README

Change instructions to build from sources.

2 years agoAdd meson build
Marc-André Lureau [Wed, 16 Oct 2019 20:47:45 +0000 (22:47 +0200)] 
Add meson build

That should provide same build results as the Makefile.

tags targets are pending review for meson:
https://github.com/mesonbuild/meson/pull/6058

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agosupport smbios
kaihuan.pkh [Mon, 18 Nov 2019 12:08:36 +0000 (20:08 +0800)] 
support smbios

alloc buffer in fseg memory and fill it with smbios anchor and
tables which read from the fw_cfg, then check type0 table and
rebuild it if it's not exist.

mainly inspired by the seabios, and borrowed some code from it.

Reviewed-by: Ben Luo <luoben@linux.alibaba.com>
Signed-off-by: kaihuan.pkh <kaihuan.pkh@alibaba-inc.com>
2 years agoremove pflash code
Paolo Bonzini [Thu, 25 Jul 2019 13:26:26 +0000 (15:26 +0200)] 
remove pflash code

Also part of the cbfs support which is now obsolete.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoimplement mptable generation
Sergio Lopez [Wed, 24 Jul 2019 14:44:23 +0000 (16:44 +0200)] 
implement mptable generation

This is specially useful for machines lacking ACPI.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2 years agosupport machines without PCI
Sergio Lopez [Wed, 24 Jul 2019 10:51:26 +0000 (12:51 +0200)] 
support machines without PCI

Instead of panicing when a PCI bus isn't found, continue booting
without PCI nor ACPI initialization.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2 years agoclean up printf
Paolo Bonzini [Wed, 24 Jul 2019 10:18:35 +0000 (12:18 +0200)] 
clean up printf

printf is avoiding switch statements so that it can be used in
very early startup, before jump tables can be read from the F segment.
We could use -fno-jump-tables, but we can also keep the if statements
and clean them up so that the indentation is fine.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodo not mix tabs and spaces in a single file
Paolo Bonzini [Wed, 24 Jul 2019 10:14:56 +0000 (12:14 +0200)] 
do not mix tabs and spaces in a single file

2 years agoimplement PCIBIOS specification
Paolo Bonzini [Tue, 23 Jul 2019 17:45:15 +0000 (19:45 +0200)] 
implement PCIBIOS specification

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoclear CF on entry to BIOS handlers
Paolo Bonzini [Wed, 24 Jul 2019 08:05:06 +0000 (10:05 +0200)] 
clear CF on entry to BIOS handlers

This simplifies the success case, which never has to manipulate
the carry flag.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoremove incorrect flat_to_off16
Paolo Bonzini [Wed, 24 Jul 2019 08:13:11 +0000 (10:13 +0200)] 
remove incorrect flat_to_off16

Here we use offsetof so "start" is not a flat pointer, it is
a pointer inside the e820 segment.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agocleanup PAM check
Paolo Bonzini [Mon, 22 Jul 2019 11:00:28 +0000 (13:00 +0200)] 
cleanup PAM check

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoavoid out-of-bounds warnings with recent compilers
Paolo Bonzini [Mon, 22 Jul 2019 11:01:40 +0000 (13:01 +0200)] 
avoid out-of-bounds warnings with recent compilers

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodrop cbfs experiment
Paolo Bonzini [Mon, 22 Jul 2019 10:55:48 +0000 (12:55 +0200)] 
drop cbfs experiment

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agobug fix for setup_idt
开恒 [Fri, 12 Jul 2019 09:26:52 +0000 (17:26 +0800)] 
bug fix for setup_idt

the setup_idt() has not configured default ISR for all interrupt.

CPU lookup IVT and set 0x0:0x0 (cs:ip) as interrupt handler entry
when received an unexpected interrupt which not setup ISR via
set_realmode_int in setup_idt().

howerver, the 0x0:0x0 point to IVT-self and executing it caused
invalid opcode exception, which the interrupt vector is 6, and the
handler bios_intfake not fixing this problem, this makes CPU run
into a infinite loop.

3 years agopvh: load initrd from fw_cfg
Stefano Garzarella [Thu, 10 Jan 2019 13:57:27 +0000 (14:57 +0100)] 
pvh: load initrd from fw_cfg

If we found initrd through fw_cfg, we can load it and use the
first module of hvm_start_info to pass initrd address and size
to the kernel.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
3 years agopvh: add benchmark exit point
Liam Merwick [Thu, 22 Nov 2018 18:07:37 +0000 (18:07 +0000)] 
pvh: add benchmark exit point

This commit adds a PVH specific VM exit point for use in benchmarking
boot times using a QEMU specific device that terminates the QEMU process
and thus the VM itself when handling those VM exits. Since the VM
terminates right at those exit points, generic tools like time can
be used to measure the time spent between the QEMU startup
and termination moments.

The QEMU device used for those measurement is called isa-debug-exit
for the PC and Q35 machine types. These devices take 2 arguments:
iobase and iosize.  iobase specifies which IO port we need to write
into to have these devices eventually handle the corresponding VM exit.

If for example, QEMU is started with the following argument:

-device isa-debug-exit,iobase=0xf4

then any IO write to 0xf4 will terminate the QEMU process and the
corresponding VM.

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
3 years agopvh: use x86/HVM direct boot ABI
Liam Merwick [Tue, 20 Nov 2018 13:01:47 +0000 (13:01 +0000)] 
pvh: use x86/HVM direct boot ABI

These changes (along with corresponding QEMU and Linux kernel changes)
enable a guest to be booted using the x86/HVM direct boot ABI.

QEMU parses the uncompressed kernel binary passed to it via -kernel
to read the ELF Note which contains the address to be loaded.  QEMU
then depends on qboot to populate the start_info struct needed by
the direct boot ABI and configure the guest e820 tables before
jumping to the loaded kernel entry.

Signed-off-by: George Kennedy <George.Kennedy@oracle.com>
Signed-off-by: Liam Merwick <Liam.Merwick@oracle.com>
3 years agopvh: Add x86/HVM direct boot ABI header file
Liam Merwick [Fri, 16 Nov 2018 16:25:57 +0000 (16:25 +0000)] 
pvh: Add x86/HVM direct boot ABI header file

The x86/HVM direct boot ABI permits a guest to be able to boot directly
into the uncompressed Linux kernel binary.

https://xenbits.xen.org/docs/unstable/misc/pvh.html

This commit adds the header file that defines the start_info struct
that needs to be populated in order to use this ABI.

Signed-off-by: Maran Wilson <Maran.Wilson@oracle.com>
Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
3 years agoqboot: Move inline load and store routines to memaccess.h
Liam Merwick [Thu, 6 Dec 2018 21:09:26 +0000 (21:09 +0000)] 
qboot: Move inline load and store routines to memaccess.h

Move lduw_p, ldl_p, stw_p, stl_p from linuxboot.c to
include/memaccess.h so they can be reused more easily.

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
3 years agoqboot: add cscope/ctags/TAGS Makefile targets (#16)
Liam Merwick [Wed, 19 Dec 2018 11:19:32 +0000 (11:19 +0000)] 
qboot: add cscope/ctags/TAGS Makefile targets (#16)

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
3 years agopci: improve PCI bus discovery
Stefano Garzarella [Tue, 11 Dec 2018 17:25:55 +0000 (18:25 +0100)] 
pci: improve PCI bus discovery

When we discovery devices on a PCI BUS, we block bridges, and
we use PCI_SECONDARY_BUS to create a linked list of bridges to
recursively setup new buses. This avoids a second visit of all the
addresses on the bus.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoRemove --disable-uuid
Paolo Bonzini [Fri, 30 Nov 2018 00:00:18 +0000 (01:00 +0100)] 
Remove --disable-uuid

It was removed from QEMU.

Fixes #12.

3 years agoqboot/printf.c:141: more undefined references to `_GLOBAL_OFFSET_TABLE_' follow
x [Wed, 7 Jun 2017 10:40:52 +0000 (12:40 +0200)] 
qboot/printf.c:141: more undefined references to `_GLOBAL_OFFSET_TABLE_' follow

Fix for qboot/printf.c:141: more undefined references to `_GLOBAL_OFFSET_TABLE_' follow

3 years agomain: Add firmware start benchmarking point
Samuel Ortiz [Tue, 23 Oct 2018 17:35:14 +0000 (19:35 +0200)] 
main: Add firmware start benchmarking point

We use a different IO port than the Linux boot
benchmarking point.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
3 years agobenchmark: Define exit points and values
Samuel Ortiz [Tue, 23 Oct 2018 17:35:02 +0000 (19:35 +0200)] 
benchmark: Define exit points and values

Benchmarking IO port addresses and return values are now defined
through a dedicated header.

Each exit point can have its own IO port address and return value.
With this we are able to discriminate between similar code paths
through the QEMU process return values or between different
code paths by having the QEMU debugexit device monitoring
different IO port addresses.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
5 years agoqboot: enable mmconfig
Yang Zhong [Thu, 30 Mar 2017 10:32:53 +0000 (18:32 +0800)] 
qboot: enable mmconfig

Need to enable mmconfig in qboot and also need to reserve
mmconfig space in bios.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <1490869973-4562-1-git-send-email-yang.zhong@intel.com>
[Do not affect e820 memory map on i440FX chipset. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agoqboot: modified the malloc for fseg and high momory.
Yang Zhong [Thu, 30 Mar 2017 10:20:50 +0000 (18:20 +0800)] 
qboot: modified the malloc for fseg and high momory.

The fseg and high memory malloc all use the up align
mode in do_alloc(),which will result in qboot hang
issue.The high memory use the down align mode and fseg
memory use the up align mode. With those changes,the
qemu can boot up the image with qboot.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <1490869250-4357-1-git-send-email-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agoremove unused macros
Paolo Bonzini [Thu, 15 Sep 2016 09:02:38 +0000 (11:02 +0200)] 
remove unused macros

5 years agoupdate README
Paolo Bonzini [Tue, 6 Sep 2016 14:07:38 +0000 (16:07 +0200)] 
update README

5 years agoskip PAM if unnecessary
Paolo Bonzini [Tue, 6 Sep 2016 13:56:50 +0000 (15:56 +0200)] 
skip PAM if unnecessary

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agocopy only ~11K down to low memory
Paolo Bonzini [Tue, 6 Sep 2016 13:44:17 +0000 (15:44 +0200)] 
copy only ~11K down to low memory

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agoinline string functions to movsb/stosb
Paolo Bonzini [Tue, 6 Sep 2016 14:17:36 +0000 (16:17 +0200)] 
inline string functions to movsb/stosb

5 years agouse DMA to read fw_cfg file names
Paolo Bonzini [Tue, 6 Sep 2016 13:38:55 +0000 (15:38 +0200)] 
use DMA to read fw_cfg file names

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agouse fw_cfg DMA for fw_cfg_read
Paolo Bonzini [Tue, 6 Sep 2016 13:05:27 +0000 (15:05 +0200)] 
use fw_cfg DMA for fw_cfg_read

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agouse fw_cfg DMA for fw_cfg_read_entry
Paolo Bonzini [Tue, 6 Sep 2016 13:05:08 +0000 (15:05 +0200)] 
use fw_cfg DMA for fw_cfg_read_entry

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years agouse fw_cfg_read_entry
Paolo Bonzini [Tue, 6 Sep 2016 12:44:22 +0000 (14:44 +0200)] 
use fw_cfg_read_entry

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoenable caches at startup
Paolo Bonzini [Fri, 10 Jul 2015 11:37:00 +0000 (13:37 +0200)] 
enable caches at startup

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoapply benchmarking hack to multiboot as well
Paolo Bonzini [Sat, 30 May 2015 12:37:32 +0000 (14:37 +0200)] 
apply benchmarking hack to multiboot as well

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agocbfs: avoid void* arithmetic, constify
Paolo Bonzini [Sat, 30 May 2015 12:35:18 +0000 (14:35 +0200)] 
cbfs: avoid void* arithmetic, constify

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoavoid reserved identifiers for header guards
Paolo Bonzini [Fri, 29 May 2015 14:50:48 +0000 (16:50 +0200)] 
avoid reserved identifiers for header guards

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoput main at beginning of binary on older compilers
Paolo Bonzini [Wed, 27 May 2015 11:07:46 +0000 (13:07 +0200)] 
put main at beginning of binary on older compilers

Reported-by: David Halls (via github)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agouse = for input/output operands
Paolo Bonzini [Tue, 26 May 2015 13:15:32 +0000 (15:15 +0200)] 
use = for input/output operands

The input side is already handled by the duplicate constraints, and clang
rejects usage of "+".

Reported-by: David Halls (via github)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoREADME: Add a note on compiling qboot
Kashyap Chamarthy [Mon, 25 May 2015 13:42:33 +0000 (15:42 +0200)] 
README: Add a note on compiling qboot

Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
Message-Id: <1432561354-26220-1-git-send-email-kchamart@redhat.com>
["make" is enough. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoanother embarrassing typo
Paolo Bonzini [Mon, 25 May 2015 14:03:58 +0000 (16:03 +0200)] 
another embarrassing typo

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agofix for PCI bridges
Paolo Bonzini [Mon, 25 May 2015 13:45:03 +0000 (15:45 +0200)] 
fix for PCI bridges

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoan 8MB cbfs flash does not fit together with bios.bin
Paolo Bonzini [Mon, 25 May 2015 13:00:28 +0000 (15:00 +0200)] 
an 8MB cbfs flash does not fit together with bios.bin

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoboot multiboot from fw_cfg
Paolo Bonzini [Mon, 25 May 2015 12:25:01 +0000 (14:25 +0200)] 
boot multiboot from fw_cfg

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agosetup PCI devices
Paolo Bonzini [Mon, 25 May 2015 09:14:01 +0000 (11:14 +0200)] 
setup PCI devices

setup interrupt line, PCI bridges, and IDE devices

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agomake pci_config_* inline
Paolo Bonzini [Mon, 25 May 2015 09:13:33 +0000 (11:13 +0200)] 
make pci_config_* inline

Small thinko...

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoinitialize the southbridge
Paolo Bonzini [Mon, 25 May 2015 09:06:01 +0000 (11:06 +0200)] 
initialize the southbridge

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoload ACPI tables from fw_cfg
Paolo Bonzini [Mon, 25 May 2015 08:22:13 +0000 (10:22 +0200)] 
load ACPI tables from fw_cfg

7 years agoremove useless file
Paolo Bonzini [Thu, 21 May 2015 16:20:17 +0000 (18:20 +0200)] 
remove useless file

Reported-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agosave one instruction :)
Paolo Bonzini [Thu, 21 May 2015 14:45:21 +0000 (16:45 +0200)] 
save one instruction :)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoadd a 16-bit data segment
Paolo Bonzini [Thu, 21 May 2015 14:40:24 +0000 (16:40 +0200)] 
add a 16-bit data segment

Otherwise the real mode data segments keep G=D=1.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agofix the 16-bit code segment's granularity
Paolo Bonzini [Thu, 21 May 2015 14:35:44 +0000 (16:35 +0200)] 
fix the 16-bit code segment's granularity

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agocommit missing file
Paolo Bonzini [Thu, 21 May 2015 14:19:33 +0000 (16:19 +0200)] 
commit missing file

reported by Kashyap Chamarty

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agonot necessary
Paolo Bonzini [Thu, 21 May 2015 13:39:26 +0000 (15:39 +0200)] 
not necessary

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agobenchmarking hack
Paolo Bonzini [Thu, 21 May 2015 13:19:41 +0000 (15:19 +0200)] 
benchmarking hack

7 years agoa nicer README
Paolo Bonzini [Thu, 21 May 2015 11:40:18 +0000 (13:40 +0200)] 
a nicer README

7 years agospeed up KVM by avoiding invalid guest state emulation
Paolo Bonzini [Thu, 21 May 2015 10:56:34 +0000 (12:56 +0200)] 
speed up KVM by avoiding invalid guest state emulation

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agofix KVM e820 and initrd
Paolo Bonzini [Thu, 21 May 2015 10:53:25 +0000 (12:53 +0200)] 
fix KVM e820 and initrd

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agofix warning
Paolo Bonzini [Thu, 21 May 2015 10:39:53 +0000 (12:39 +0200)] 
fix warning

7 years agoadd README
Paolo Bonzini [Thu, 21 May 2015 09:42:37 +0000 (11:42 +0200)] 
add README

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoinitial support for cbfs
Paolo Bonzini [Thu, 21 May 2015 09:40:05 +0000 (11:40 +0200)] 
initial support for cbfs

pflash isn't ideal because there's only 8MB room, but it's a
start and it's fast.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoprotect against no -kernel
Paolo Bonzini [Thu, 21 May 2015 09:03:25 +0000 (11:03 +0200)] 
protect against no -kernel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoinitial support for pflash / cbfs
Paolo Bonzini [Thu, 21 May 2015 07:12:50 +0000 (09:12 +0200)] 
initial support for pflash / cbfs

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agomalloc fw_cfg files
Paolo Bonzini [Thu, 21 May 2015 08:31:09 +0000 (10:31 +0200)] 
malloc fw_cfg files

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoadd malloc
Paolo Bonzini [Thu, 21 May 2015 08:26:49 +0000 (10:26 +0200)] 
add malloc

Allocate the e820 map in the E-segment.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agobuild e820 entries for low RAM
Paolo Bonzini [Thu, 21 May 2015 08:05:52 +0000 (10:05 +0200)] 
build e820 entries for low RAM

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoparse vmlinuz inside firmware
Paolo Bonzini [Thu, 21 May 2015 08:00:47 +0000 (10:00 +0200)] 
parse vmlinuz inside firmware

This will make it possible to load the vmlinuz from CBFS.  We need
some contortions because QEMU splits the real mode and protected
mode parts of vmlinuz in different fw_cfg files.

The parsing code is lifted from QEMU.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoput 16-bit code in a single file
Paolo Bonzini [Thu, 21 May 2015 06:41:21 +0000 (08:41 +0200)] 
put 16-bit code in a single file

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agocompute dependencies automatically
Paolo Bonzini [Wed, 20 May 2015 22:37:46 +0000 (00:37 +0200)] 
compute dependencies automatically

getting serious...

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoboot the kernel
Paolo Bonzini [Wed, 20 May 2015 21:46:42 +0000 (23:46 +0200)] 
boot the kernel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoinitial fw_cfg support
Paolo Bonzini [Wed, 20 May 2015 22:39:02 +0000 (00:39 +0200)] 
initial fw_cfg support

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agosetup pic
Paolo Bonzini [Wed, 20 May 2015 22:30:07 +0000 (00:30 +0200)] 
setup pic

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agosetup idt
Paolo Bonzini [Wed, 20 May 2015 15:15:57 +0000 (17:15 +0200)] 
setup idt

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agomake a bootable BIOS
Paolo Bonzini [Wed, 20 May 2015 15:09:34 +0000 (17:09 +0200)] 
make a bootable BIOS

includes source from kvm-unit-tests

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agofirst commit
Paolo Bonzini [Wed, 20 May 2015 14:03:33 +0000 (16:03 +0200)] 
first commit

Based on x86/bios from lkvm

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 years agoInitial commit
Paolo Bonzini [Thu, 21 May 2015 09:44:57 +0000 (11:44 +0200)] 
Initial commit

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>