Age | Commit message (Collapse) | Author | Files | Lines |
|
Use the get_bda_ptr() accessor function instead of hardcoding with
MAKE_FLATPTR().
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
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>
|
|
int 0x05 was not assigned in the interrupt table - fix that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move the list of drive setup calls from post.c to a new function in
block.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The HaveRunPost flag controls whether post or reboot handling is
entered on a reset signal. The flag needs to be set before any other
global variable because an external reboot signal could occur at any
time. (If any global variable is modified prior to setting
HaveRunPost then the code might enter post with global variables in a
dirty state.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Use a macro to define and obtain the value of a symbol introduced by
the linker scripts (scripts/layoutrom.py).
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>
|
|
Always enable caching at start of 32bit code and always make sure the
paging flag is off. Because this alters the cr0 register, perform a
backup and restore of it when using call32().
Also, rename get/setcr0() to cr0_read/write() to more closely match
other register access functions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Delay call to timer_setup() until after the xxx_platform_setup() calls
so that the pmtimer can be detected first. Most modern machines will
have a pmtimer and calibrating the timestamp counter is frequently
unnecessary.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The machine may crash if an interrupt occurs prior to the setup of the
interrupt vector table (IVT) and programmable interrupt controller
(PIC). This patch makes sure that interrupts remain disabled until
these components are setup.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Rename tcg externally called functions to more closely match other
subsystems.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
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 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 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>
|
|
The int 1589 call is entered in real mode and returns in protected
mode. However, the code to use the "extra stack" does not support
that. Fix this by never using the "extra stack" on int 1589 calls.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Modify the int 1587 handler to check if the POST phase is still
running. If it is, use bigreal mode segment limits so that the caller
remains in bigreal mode when the 1587 handler completes. This helps
with SeaVGABIOS' use of "direct" framebuffer accesses (an option rom
may attempt to display text during its option rom execution which can
cause SeaVGABIOS to make the int 1587 calls).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Replace the CONFIG_THREAD_OPTIONROMS option with the CBFS (or fw_cfg)
file "etc/threads". This allows for the "threads during optionrom"
capability to be enabled/disabled without requiring SeaBIOS to be
recompiled. A value of "2" in this file will enable threads to run
during option rom execution.
This change also allows for all threads to be disabled via the same
runtime config file. Setting the file to a value of "0" will cause
SeaBIOS to perform all hardware initialization serially.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Introduce debug_banner() and use it in all the places SeaBIOS version
is displayed for debugging purposes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The serial_debug_preinit() function disables serial interrupts so that
the OS doesn't get confused by "transmit buffer empty" interrupts
caused when seabios writes to the serial port. It's unnecessary
paranoia to keep rechecking that interrupts are disabled.
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>
|
|
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>
|
|
Group the Real Time Clock code into hw/rtc.[ch].
Also, use rtc_read/write/mask function naming (instead of
inb/outb_cmos) to be more consistent with other register accessors.
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Also, sort the order of include files in the c files.
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>
|
|
Move many C files from the src/ directory to the new src/fw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move many C files from the src/ directory to the new src/hw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Internal "low memory" allocations are currently placed in the UMB
region (0xc0000-0xf0000). However, there have been reports of some
real machines that do not support DMA to this area of memory. So, add
a compile time config option (off by default) to support placing all
internal low-memory allocations at the end of the 640K real-memory
area (0x90000-0xa0000).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The PCI-BIOS entry point can be called in 16bit protected mode, so
separate its entry code from the legacy 0x1a code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Since the final location of the "varlow" variables are known at build
time, link the final locations into the binary during the build. The
16bit code was already done at link time - update the build so the
32bit code is also done at link time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
This reduces the size of the CSM binary by a few bytes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Rename datalow_base (and similar) to zonelow_base, and datalow_start
(and similar) to varlow_start. This helps distinguish between the
bounds for the runtime dynamic memory pool and the compile time global
variables.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Now that only qemu_romfile_init() uses the fw_cfg interface, it only
needs to be detected in that function.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
There's no real gain to starting the device_hardware_setup in the
middle of the platform setup. Always start it just prior to the VGA
rom.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
CONFIG_QEMU means compile to start from QEMU (and possibly
Xen/KVM/Bochs) and definitely running under QEMU (or Xen/KVM/Bochs).
CONFIG_COREBOOT means compile for coreboot and definitely running
under coreboot. Places that used CONFIG_COREBOOT to mean "running on
real hardware" have been changed to use !CONFIG_QEMU.
CONFIG_QEMU_HARDWARE enables support for some virtual hardware devices
even if QEMU didn't start SeaBIOS.
usingXen() is replaced by runningOnXen().
runningOnQEMU() is added to hardware devices that are only safe to
access when we are sure we are running under QEMU (or Xen/KVM/Bochs).
Neither the coreboot nor the csm code currently enable runningOnQEMU,
but future patches may.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
CONFIG_THREAD_OPTIONROMS depends on CONFIG_THREADS, so the code can
assume that the two are always on when CONFIG_THREAD_OPTIONROMS is on.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Xen invokes SeaBIOS via entry_post, not entry_elf. As a result commit
6ca0460f broke Xen. This change effectively undoes that commit.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The CPU cache is enabled and DMA is disabled on all real-world POST
entry situations, so no need to do this in the low-level "pre-init"
phase. Instead, move it to the platform hardware setup stage.
Also, move the setting of the reboot flags (which control reset-vector
entry point handling) to ivt_init().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Unlocking ram in handle_post() is tricky and only needed under qemu.
Separate out that logic from the coreboot/xen paths by invoking
handle_elf_post separately. This simplifies both the qemu and
non-qemu code paths.
Also, organize all the "pre-init" functions into one section of the
file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Don't clutter post.c with the gory details of QEMU memory sizing and
BIOS table creation. Instead, move that code to paravirt.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
|
|
Pass a function pointer to reloc_preinit() instead of always running
maininit() after relocating the init code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Place the "interface initialization" functions together, "platform
hardware initialization" functions together, and "prepare to boot"
functions together. This may also be useful for using SeaBIOS as a
CSM.
This slightly changes the order of some function invocations, but
should otherwise not change code behavior at all.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|