| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Building with gcc v9 causes lots of warnings about pointers to packed
variables. However, SeaBIOS is limited to x86 where unaligned
reads/writes are supported by the cpu. So, disable that warning.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Supports qemu emulated ati cards. They have been added in qemu 4.0.
Acceleration support (in qemu) is pretty rough still. A simple
framebuffer works fine though.
Available models:
* ati rage 128 pro
* ati rv100
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
| |
So other drivers can simply use the same list too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for qemu ramfb. This is a simple boot framebuffer device,
with normal ram being used to back the framebuffer and fw_cfg being used
to configure the device.
Use case (on x86): boot display for vgpu devices (which neither emulate
vga nor have a vgabios).
Sharing fw_cfg code with seabios turned out to be difficuilt due to
various dependencies the code has on infrastructure which only seabios
has. So include a copy of the code here, with those dependencies
removed and also stripped down because we don't need a non-dma fallback
here.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Use coreboot text mode emulation to also support the qemu bochs-display
device. This is a new display device supporting simple linear
framebuffers, using the bochs register interface. No support for legacy
vga (text modes, planar modes, cga modes, 8bpp palette modes all
dropped). The bochs interface is compatible with the qemu stdvga.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Redirect int10 calls to serial console output.
Parse serial input and queue key events.
The serial console can work both as primary display
and in parallel to another vga display (splitmode).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
| |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables SeaBIOS to boot from NVMe. Finding namespaces and
basic I/O works. Testing has been done in qemu and so far it works with
Grub, syslinux, and the FreeBSD loader. You need a recent Qemu (>=
2.7.0), because older versions have buggy NVMe support.
The NVMe code is currently only enabled on Qemu due to lack of testing
on real hardware.
Signed-off-by: Julian Stecklina <jsteckli@amazon.de>
|
|
|
|
|
| |
Reported-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Also known as Fusion MPT disk; this controller model is supported
by VirtualBox and VMware, and QEMU support patches have been
posted.
Signed-off-by: Don Slutz <Don.Slutz@Gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Split pci.c into pci.c and pcidevice.c. The low-level code that
interacts directly with the PCI devices remains in pci.c, while
functions dealing with the higher level pci_device cache move to
pcidevice.c. Only pci.c is needed in 16bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The SSDT files are rarely modified - recent QEMU versions don't use
them at all and adding features to them in SeaBIOS has been
deprecated. It no longer makes sense to generate them on every build.
The content will remain (for use on old machine types in QEMU) in
static files committed to the SeaBIOS git repo. If the contents do
need to be generated a new build target (make iasl) is available.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Attempt to extract the gcc and binutils versions. Report that
information in the debug log.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the script to generate the build version from a shell script
to a python script.
Remove the ability to override the version at build time via "make
VERSION=xyz". Replace it with ability to add extra version
information at build time via "make EXTRAVERSION=xyz".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Rename memmap.c to e820map.c as the code in that file only deals with
maintaining the e820 map. Move all the e820 definitions to new file
e820map.h and use a consistent "e820_" prefix on all exported
functions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some compilers (such as the one in hardened/Gentoo) default this
option to on which leads to build failures:
src/stacks.c: In function 'call16_back':
src/stacks.c:139:5: error: 'asm' operand has impossible constraints
asm volatile(
^
URL: https://bugs.gentoo.org/559980
Reported-by: Alon Bar-Lev <alonbl@gentoo.org>
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
virtio version 1.0 registers can (and actually do in the qemu
implementation) live in mmio space. So we must run the blk and
scsi virtio drivers in 32bit mode, otherwise we can't access them.
This also allows to drop a bunch of GET_LOWFLAT calls from the virtio
code in the following patches.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a build option to explicitly set the version information compiled
into the seabios and seavgabios binaries. This may assist in
reproducible builds or to better link builds to distribution packages.
If the new "VERSION=" parameter is not provided then the default build
version remains unchanged.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've been successfully using SeaBIOS as secondary bootloader. In more details
I have GRUB2-as-payload in flash together with coreboot. SeaBIOS binary is on
the HDD and loaded by GRUB when needed. This has an unfortunate consequence
that I have to keep vga oprom in flash even if usually I boot without it. This
patches makes bios.bin.elf multiboot executable with files passed as modules.
Example:
menuentry "SeaBIOS (mb)" --unrestricted {
root=ahci0,2
multiboot /bios.bin.elf
module /vgabios_x230.rom name=pci8086,0166.rom
}
the parameter name= specifies under which name SeaBIOS will see it.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the TCG BIOS interrupt handler 1ah. It is for
example used by trusted grub.
This patch adds an implementation of SHA1 (following NIST specs., IETF RFC 3147
and Wikipedia) for speeding up measurements of code. Trusted Grub for example
makes use of this interface and measures (calculates SHA1) of the Linux kernel
and initrd. Those files can be rather large and hunting their bytes through
the TIS interface as part of the int handler commands invoked by trusted grub
does take quite some time due to the many vmexits the interface is creating
(one per byte).
There is also a threshold for the size of data to hash (100k) below which
the TPM is used and above the internal faster SHA1 algorithm is used.
This patch for example enables trusted grub to interact with the TPM
and take additional measurements.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the main part of the TCG BIOS extensions. It provides
the following functionality:
- initialization of the TCPA ACPI table used for logging of measurements
- initialization of the TPM by sending a sequence of commands to it
- proper setup of the TPM before the BIOS hands over control to the bootloader
- support for S3 resume; BIOS sends TPM_Startup(ST_STATE) to TPM
- enable configuration of SeaBIOS to be built with TCGBIOS extensions
All TCG BIOS extensions are activated with CONFIG_TCGBIOS.
Structures that are needed in subsequent patches are also included in
tcgbios.h at this point.
The effect of this patch is that it initialized the TPM upon VM start
and S3 resume.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This option tells linker not to align sections in a way optimied for OS.
ls -lh out/bios.bin.elf
-rwxr-xr-x 1 phcoder phcoder 90K Mai 19 20:38 out/bios.bin.elf
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
|
|
|
|
|
| |
Add a kconfig build option (CONFIG_VGA_FIXUP_ASM) to allow users to
build the vgabios without the complex assembler fixups that work
around emulator bugs.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
This adds basic read/write support for SD cards emulated by QEMU.
This code is not expected to work on real hardware, because the
current controller and card initialization is not robust.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Avoids tools such as layoutrom stumble over localized messages.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-By: Patrick Georgi <pgeorgi@google.com>
|
|
|
|
|
|
|
|
|
| |
Update the layoutrom.py build script so that fixed address sections
can come from the 32bit compiled C code. Update the C code so that
all VAR16FIXED variables instead use the new VARFSEGFIXED which is
defined in 32bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
GCC 4.9 and clang 3.5 support the -m16 option on the command line which
supersedes the hackish ".code16gcc" assembler directive. Use it where
possible.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
The build currently does a textual include of all files in order to
use the -fwhole-compile optimization. Update it to use relative file
paths instead of absolute file paths. This makes the section names in
the resulting binary more readable. It also makes the build easier on
some Windows hosts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Change the multi-processor init code to trampoline into 32bit mode on
each of the additional processors. Implement an atomic lock so that
each processor performs its initialization serially.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow
SeaBIOS to fetch the emulation to use from the environment variables.
This allows SeaBIOS to compile on FreeBSD with gcc.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Since the XHCI driver needs to jump into 32bit mode anyway, it is
simpler to just run all of the code in 32bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
checkrom.py script
File "./scripts/checkrom.py", line 24, in main
objinfo, finalsize, rawfile, outfile = sys.argv[1:]
ValueError: need more than 3 values to unpack
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
|
|
|
|
|
|
|
| |
Instead of jumping into 32bit mode to access the PCI config space, run
the entire driver in 32bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revision 5325e91e introduced a change to force the rebuild of the
.config file when the src/Kconfig (or vgasrc/Kconfig) file changes.
However, this was causing a complete rebuild of the user's .config
file which would throw away the user's current settings.
On a rebuild, use the kbuild olddefconfig rule instead of defconfig to
attempt to keep the user's current settings.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Fixes build failure for CONFIG_COREBOOT=y.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
Move the initialization code out of vgabios.c to a new file to reduce
the size of the vgabios.c file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add code to allocate an extra stack for the main vgabios int 0x10
entry point. The allocation is done via the PMM spec and uses a PCI
v3 permanent low memory region request. This request will work with
SeaBIOS - it is unknown how many other main BIOS implementations
support this PMM call.
The extra stack is useful for old DOS programs that call the VGABIOS
and expect it to work with very small amounts of stack space.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Avoid hardware specific code in output.c. This will reduce the amount
of change needed to output.c as support for more serial hardware is
added.
This patch also renames some functions to improve the naming scheme.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ability for a ROM file to point to
it's image in memory. When file is in memory,
add utility that can patch it, storing
pointers to one file within another file.
This is not a lot of code: together with the follow-up patch to load
ACPI tables from ROM, it's about 1K extra.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing was done on windows images (win 2008/2012) taken from esx with vmware
tools installed and boot disk configured to use pvscsi.
Also I've used linux (ubuntu 12.04) where pvscsi drivers are installed by
default and booted it using qemu cmd similar to this:
./x86_64-softmmu/qemu-system-x86_64 -snapshot -device pvscsi,id=pvscsi0 \
-device scsi-disk,bus=pvscsi0.0,drive=drive0 \
-drive id=drive0,if=none,file=ubuntu-12.04.qcow2 \
-bios roms/seabios/out/bios.bin
Signed-off-by: Evgeny Budilovsky <evgeny.budilovsky@ravellosystems.com>
|
|
|
|
|
|
|
|
| |
Build out/bios.bin on QEMU, out/bios.bin.elf on coreboot, and
out/Csm16.bin for CSM. This reduces the chance that one accidentally
builds for an incorrect target.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
The ahci driver needs to jump into 32bit mode in order to access
portions of the ahci controllers PCI config space. Instead of jumping
into 32bit mode just to toggle the ahci registers, jump into 32bit
mode for all of the driver interactions. This shrinks the size of the
overall code and can lead to further cleanups.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add a config option to specify the rom size wanted. Default is zero,
which will automatically figure the needed size.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
| |
Unbreaks parallel builds.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|