seabios.git
13 years agoStart using Kconfig to configure SeaBIOS settings.
Kevin O'Connor [Thu, 27 Jan 2011 02:19:25 +0000 (21:19 -0500)]
Start using Kconfig to configure SeaBIOS settings.

Create autoconf.h during the build.

Move a couple of config settings from config.h to Kconfig.

13 years agoChange kconfig to emit disabled symbols in autoconf.h.
Kevin O'Connor [Thu, 27 Jan 2011 01:09:39 +0000 (20:09 -0500)]
Change kconfig to emit disabled symbols in autoconf.h.

Always emit CONFIG_X definitions in autoconf.h - set them to 0 when
they are disabled.

13 years agoBuild changes for Linux kconfig code to work in seabios dir structure.
Kevin O'Connor [Thu, 27 Jan 2011 02:14:59 +0000 (21:14 -0500)]
Build changes for Linux kconfig code to work in seabios dir structure.

13 years agoInitial commit of Kconfig build tool.
Kevin O'Connor [Tue, 25 Jan 2011 03:13:58 +0000 (22:13 -0500)]
Initial commit of Kconfig build tool.

This is a pure copy of the tool from the Linux v2.6.38-rc2
scripts/kconfig/ directory.

13 years agoMinor boot fixes.
Kevin O'Connor [Thu, 27 Jan 2011 02:04:01 +0000 (21:04 -0500)]
Minor boot fixes.

13 years agoMinor comment / code layout improvement to romlayout.S.
Kevin O'Connor [Sat, 22 Jan 2011 15:53:48 +0000 (10:53 -0500)]
Minor comment / code layout improvement to romlayout.S.

13 years agoFix to prevent infinite loop in build_pci_path().
Kevin O'Connor [Sat, 22 Jan 2011 15:53:08 +0000 (10:53 -0500)]
Fix to prevent infinite loop in build_pci_path().

Make sure the PCI path doesn't point to itself.

13 years agosupport T13 EDD3.0 spec
Gleb Natapov [Mon, 10 Jan 2011 08:50:27 +0000 (10:50 +0200)]
support T13 EDD3.0 spec

Some guests (such as Linux) expect BIOS to behave according to T13
EDD3.0 spec. T13 spec is much better then Phoenix since it provides
more information about interface and device paths. This patch adds
support for the spec. If guest provides buffer with enough space for
T13 EDD info return EDD according to T13 spec otherwise use Phoenix
one.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoAdd ability to track PCI paths and add to build_pci_path().
Kevin O'Connor [Mon, 10 Jan 2011 05:48:45 +0000 (00:48 -0500)]
Add ability to track PCI paths and add to build_pci_path().

Improve device path descriptions of devices on PCI buses.

13 years agoMove the CBFS payload setup to later in the boot.
Kevin O'Connor [Sat, 8 Jan 2011 17:24:39 +0000 (12:24 -0500)]
Move the CBFS payload setup to later in the boot.

Don't try to register payloads until after malloc has been setup.

13 years agoExtract space trimming code from ATA and use in USB and bootorder code.
Kevin O'Connor [Sat, 8 Jan 2011 17:06:54 +0000 (12:06 -0500)]
Extract space trimming code from ATA and use in USB and bootorder code.

Introduce function nullTrailingSpace() that nulls blank characters
from the end of a string.  Use this function in the ATA, USB MSC, and
bootorder code.

13 years agoseabios: acpi: add _RMV control method for PCI devices
Kevin O'Connor [Thu, 6 Jan 2011 02:25:18 +0000 (21:25 -0500)]
seabios: acpi: add _RMV control method for PCI devices

Use _RMV method to indicate whether device can be removed.

Data is retrieved from QEMU via I/O port 0xae0c.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Gleb Natapov <gleb@redhat.com>
13 years agoAdd support for finding the boot priority of USB drives.
Kevin O'Connor [Fri, 31 Dec 2010 19:38:10 +0000 (14:38 -0500)]
Add support for finding the boot priority of USB drives.

Use the device path of the USB device to find a bootorder entry.

13 years agoExtend 'usb_pipe' to track the controller and ports of each device.
Kevin O'Connor [Fri, 31 Dec 2010 19:35:26 +0000 (14:35 -0500)]
Extend 'usb_pipe' to track the controller and ports of each device.

Track the path of ports and controller of each usb device.  This is
useful for reporting the exact device path.

13 years agoAdd functions for boot device path parsing.
Kevin O'Connor [Sat, 1 Jan 2011 16:00:42 +0000 (11:00 -0500)]
Add functions for boot device path parsing.

Add functions that find boot device path for pci/ata/floppy/rom devices.

13 years agoUse bootprio_find_named_rom() for ramdisk and cbfs payload priorities.
Kevin O'Connor [Thu, 30 Dec 2010 02:59:44 +0000 (21:59 -0500)]
Use bootprio_find_named_rom() for ramdisk and cbfs payload priorities.

13 years agoRemove drive->desc field.
Kevin O'Connor [Thu, 30 Dec 2010 02:41:19 +0000 (21:41 -0500)]
Remove drive->desc field.

The description field is only available during the POST phase - it is
confusing to have it live in a structure available through all phases.

The description was only used by the boot menu code - pass each drive
description directly to the bootlist code.

Add a helper (znprintf) to automatically malloc_tmp the required
space.

Also, fixup ramdisk handling - it was using an incorrect floppy
priority.

13 years agoMinor reorganization of some of the boot_xxx code in boot.c.
Kevin O'Connor [Wed, 29 Dec 2010 16:52:33 +0000 (11:52 -0500)]
Minor reorganization of some of the boot_xxx code in boot.c.

13 years agoMove IPL.fw_bootorder to static variables in boot.c.
Kevin O'Connor [Wed, 29 Dec 2010 16:37:41 +0000 (11:37 -0500)]
Move IPL.fw_bootorder to static variables in boot.c.

13 years agoMove IPL.bev to static variables in boot.c
Kevin O'Connor [Wed, 29 Dec 2010 16:25:14 +0000 (11:25 -0500)]
Move IPL.bev to static variables in boot.c

Move the BEV storage to static variables in boot.c.

Also, increase the maximum number of BEV entries from 8 to 20.

13 years agoMove IPL.checkfloppysig to a global (CheckFloppySig) in boot.c.
Kevin O'Connor [Wed, 29 Dec 2010 16:18:04 +0000 (11:18 -0500)]
Move IPL.checkfloppysig to a global (CheckFloppySig) in boot.c.

13 years agoRemove Drives global struct in favor of independent global variables.
Kevin O'Connor [Wed, 29 Dec 2010 16:05:46 +0000 (11:05 -0500)]
Remove Drives global struct in favor of independent global variables.

The "Drives" struct just held three global variables - declare the
three global variables independently.

13 years agoDon't access drive_g->desc from boot_cdrom().
Kevin O'Connor [Wed, 29 Dec 2010 18:26:01 +0000 (13:26 -0500)]
Don't access drive_g->desc from boot_cdrom().

The drive description is allocated with malloc_tmp() and is thus only
available during the POST phase - boot_cdrom() is called during the
boot phase.

13 years agoSimplify keyboard reading code in the interactive boot menu.
Kevin O'Connor [Wed, 29 Dec 2010 18:25:18 +0000 (13:25 -0500)]
Simplify keyboard reading code in the interactive boot menu.

13 years agoCall setup_translation() from map_hd_drive().
Kevin O'Connor [Tue, 28 Dec 2010 02:08:53 +0000 (21:08 -0500)]
Call setup_translation() from map_hd_drive().

Unify the calling of setup_translation().

13 years agoRename add_ordered_drive() to add_drive() and use in map_hd_drive().
Kevin O'Connor [Mon, 27 Dec 2010 13:37:38 +0000 (08:37 -0500)]
Rename add_ordered_drive() to add_drive() and use in map_hd_drive().

13 years agoAdd stubs to permit devices to specify their boot priority.
Kevin O'Connor [Tue, 28 Dec 2010 00:26:57 +0000 (19:26 -0500)]
Add stubs to permit devices to specify their boot priority.

Add support for passing in priorities to bootlist system.

Based on patch by: Gleb Natapov <gleb@redhat.com>

13 years agoSimplify boot ordering by building an inclusive boot list.
Kevin O'Connor [Tue, 28 Dec 2010 00:07:49 +0000 (19:07 -0500)]
Simplify boot ordering by building an inclusive boot list.

Replace the bcv list with a full list of all "bootable objects".  All
ordering can then be done on this list.  The final boot menu, drive
mapping, and BEV list generation is then driven from this
authoritative list.

Move "Floppy" and "DVD/CD" description prefixes into drive description
generation code to simplify boot menu generation.

Rework QEMU's CMOS defined bootorder to work with priority scheme in
new boot list.

Have every CBFS entry create it's own BEV entry (instead of one entry
for all CBFS payloads).  Move CBFS payload detection code into
coreboot.c.

13 years agoPopulate drive_g->desc prior to calling add_bcv_internal().
Kevin O'Connor [Sun, 26 Dec 2010 22:22:28 +0000 (17:22 -0500)]
Populate drive_g->desc prior to calling add_bcv_internal().

Make sure the description is populated before registering a drive.

13 years agopciinit: fix off-by-one
Isaku Yamahata [Fri, 24 Dec 2010 01:51:08 +0000 (10:51 +0900)]
pciinit: fix off-by-one

IO port ends at 64K - 1. not 64K.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agoMinor build fixes.
Kevin O'Connor [Sun, 26 Dec 2010 19:16:22 +0000 (14:16 -0500)]
Minor build fixes.

I made these two tiny changes to SeaBIOS when I was playing with the
HEAD version.

The Makefile change prevents the test command from failing if CC
contains a space.

The coreboot change prevents a warning on our gcc 4.5.2 in certain
circumstances when sizeof seems to be unsigned long int instead of
unsigned int.

They're both unintrusive, shouldn't have potential for breaking
anything.

Signed-off-by: Stefan Reinauer <stepan@coreboot.org>
13 years agoTrack the source of each optionrom deployed.
Kevin O'Connor [Fri, 24 Dec 2010 19:42:42 +0000 (14:42 -0500)]
Track the source of each optionrom deployed.

It's useful to track where each optionrom in the system originated
from when initializing bev/bcvs.  So, keep a map of the rom address to
its source.

13 years agoSupport qemu based romfile wrappers called out of order.
Kevin O'Connor [Fri, 24 Dec 2010 18:53:32 +0000 (13:53 -0500)]
Support qemu based romfile wrappers called out of order.

If the file requested isn't the last file read, then reread the index
to find the given file.

13 years agoBreakup boot_setup() bootorder code into its own function.
Kevin O'Connor [Fri, 24 Dec 2010 16:17:03 +0000 (11:17 -0500)]
Breakup boot_setup() bootorder code into its own function.

13 years agoAdd romfile_loadfile() helper function.
Kevin O'Connor [Fri, 24 Dec 2010 16:15:26 +0000 (11:15 -0500)]
Add romfile_loadfile() helper function.

Add function to find, malloc, and copy a romfile.  Use it in the
bootsplash and bootorder code.

13 years agoRead bootorder file into memory.
Gleb Natapov [Thu, 23 Dec 2010 09:29:38 +0000 (11:29 +0200)]
Read bootorder file into memory.

Read bootorder file, parse it and put it into array for easy
consumption.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoAdd strchr() function.
Kevin O'Connor [Fri, 24 Dec 2010 15:39:32 +0000 (10:39 -0500)]
Add strchr() function.

13 years agoAdd romfile_name() function.
Gleb Natapov [Thu, 23 Dec 2010 09:29:39 +0000 (11:29 +0200)]
Add romfile_name() function.

romfile_name() return file name given file handler. Works for qemu and
coreboot.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoAdd BAID for ahci cdrom.
Gleb Natapov [Thu, 23 Dec 2010 09:29:36 +0000 (11:29 +0200)]
Add BAID for ahci cdrom.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoProvide full EDD 3.0 info for virtio disk
Gleb Natapov [Thu, 23 Dec 2010 09:29:35 +0000 (11:29 +0200)]
Provide full EDD 3.0 info for virtio disk

Fill out entire EDD 3.0 structure for virtio disk. Currently only EDD 1.0
part is filled which is missing such important info as device path. Use
SCSI device type since virtio is not defined by EDD spec and virtio disk pci
device uses SCSI class.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoEnhance layoutrom.py to work around a binutils quirk.
Kevin O'Connor [Fri, 24 Dec 2010 15:23:10 +0000 (10:23 -0500)]
Enhance layoutrom.py to work around a binutils quirk.

Some binutils (report of 2.20.1) don't create dummy symbols for each
section - work around that.

13 years agoCreate separate IPL entry for each CD/DVD
Gleb Natapov [Tue, 7 Dec 2010 11:50:54 +0000 (13:50 +0200)]
Create separate IPL entry for each CD/DVD

Current code creates only one IPL entry of type IPL_TYPE_CDROM even if
there are more then one CDROM drive present. If CDROM that the entry
refers to is not bootable there is no way to retry boot from another
CDROM. Fix this by creating IPL entry for each CDROM drive found. First
CDROM will always be placed in IPL entry 3 for backwards compatibility.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoahci: set controller id
Gerd Hoffmann [Thu, 9 Dec 2010 07:39:48 +0000 (08:39 +0100)]
ahci: set controller id

Fill the controller id in the drive struct with the port number so we
get a sane boot menu ordering with multiple hard disks attached.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoahci: fix off-by-one in port count
Gerd Hoffmann [Thu, 9 Dec 2010 07:39:47 +0000 (08:39 +0100)]
ahci: fix off-by-one in port count

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoahci: enable io/mem/dma
Kevin O'Connor [Sun, 12 Dec 2010 19:01:47 +0000 (14:01 -0500)]
ahci: enable io/mem/dma

Make sure IO, MMIO and DMA are enabled in pci config space
before using the device.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoahci: set dma feature flag
Gerd Hoffmann [Thu, 9 Dec 2010 07:39:45 +0000 (08:39 +0100)]
ahci: set dma feature flag

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoCheck if capability enabled in XXX_cmd_data functions.
Kevin O'Connor [Sun, 5 Dec 2010 17:52:02 +0000 (12:52 -0500)]
Check if capability enabled in XXX_cmd_data functions.

Make sure to check if CONFIG_AHCI, CONFIG_ATA, CONFIG_USB_MSC is
enabled in their respective cmd_data functions.  This reduces the
compile size when they are not enabled.

13 years agoRequire a "_cfuncXX_" symbol prefix for inter-mode c function references.
Kevin O'Connor [Sun, 5 Dec 2010 17:38:33 +0000 (12:38 -0500)]
Require a "_cfuncXX_" symbol prefix for inter-mode c function references.

The compiler can get confused when referencing a C function in a
different mode.  (It reasonably assumes that the C function in the
current mode is desired.)  To avoid this compiler confusion, introduce
symbol prefixes (_cfunc16_, _cfunc32flat_, _cfunc32seg_) that must be
used on C function symbols that are referenced from other compilation
modes.

This makes it less likely compiler confusion will occur.  It will also
makes it easier to implement and use vtable like operation structures.

13 years agoadd ahci support
Gerd Hoffmann [Mon, 29 Nov 2010 08:42:13 +0000 (09:42 +0100)]
add ahci support

This patch adds AHCI support to seabios.  Tested with virtual hardware
only (upcoming ahci support in qemu).  Coded by looking at the
recommandations in the intel ahci specs, so I don't expect much trouble
on real hardware.  Tested booting fedora install from hard disk and a
opensuse live iso from cdrom.

[ v2: disable by default           ]
[ v2: add check for malloc failure ]
[ v2: wind up disk write support   ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoata: make helpers available
Gerd Hoffmann [Mon, 29 Nov 2010 08:42:12 +0000 (09:42 +0100)]
ata: make helpers available

Make ata helper functions available outside ata.c, so others (i.e.
upcoming ahci support) can use them.  Prefix them with ata_ to avoid
name clashes.  Also don't hard-code buffer size for the model name.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoutil: add memset_fl()
Gerd Hoffmann [Mon, 29 Nov 2010 08:42:11 +0000 (09:42 +0100)]
util: add memset_fl()

13 years agopci: add helper functions for mmio bar access from real mode.
Gerd Hoffmann [Mon, 29 Nov 2010 08:42:10 +0000 (09:42 +0100)]
pci: add helper functions for mmio bar access from real mode.

This patch adds helper pci_readl and pci_writel which can be used
to access pci mmio bars from real mode.  They work in 32bit mode
too.  ahci support needs this, also ohci for bulk transfers, and
probably more devices in the future.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agoEnhance call32() to pass a parameter to called function.
Kevin O'Connor [Thu, 25 Nov 2010 14:17:31 +0000 (09:17 -0500)]
Enhance call32() to pass a parameter to called function.

Support passing a parameter to the 32bit function, as well as
returning the result of the function back to the 16bit code.

Also, make call32 available outside of stacks.c.

13 years agoDon't pass return address to transition(32,16,16big) on stack.
Kevin O'Connor [Thu, 25 Nov 2010 13:52:50 +0000 (08:52 -0500)]
Don't pass return address to transition(32,16,16big) on stack.

It's difficult to have a uniform view of the stack when transition
modes, so pass the return address in a register.  As a result, the
transition functions only access memory via the %cs selector now.

13 years agopciinit: use pci_region functions.
Isaku Yamahata [Thu, 28 Oct 2010 06:54:36 +0000 (15:54 +0900)]
pciinit: use pci_region functions.

This patch cleans up pci region allocation with pci_region.
Now it is aware of overflow.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agopci: introduce pci_region to manage pci io/memory/prefmemory regions.
Isaku Yamahata [Thu, 28 Oct 2010 06:54:35 +0000 (15:54 +0900)]
pci: introduce pci_region to manage pci io/memory/prefmemory regions.

This patch adds helper functions to manage pci area.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agomark irq9 active high in DSDT
Kevin O'Connor [Thu, 21 Oct 2010 01:59:11 +0000 (21:59 -0400)]
mark irq9 active high in DSDT

In PIIX4 SCI (irq9) is active high. Seabios marks it so in interrupt
override table, but some OSes (FreeBSD) require the same information to
be present in DSDT too. Make it so.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoReport meaningful error if pyserial not present in tools/readserial.py
Kevin O'Connor [Mon, 18 Oct 2010 01:38:38 +0000 (21:38 -0400)]
Report meaningful error if pyserial not present in tools/readserial.py

13 years agoShow size of non-relocatable runtime code during build.
Kevin O'Connor [Sun, 26 Sep 2010 22:32:13 +0000 (18:32 -0400)]
Show size of non-relocatable runtime code during build.

13 years agoCleanup - it's no longer necessary to manually reset global variables.
Kevin O'Connor [Sat, 25 Sep 2010 18:53:15 +0000 (14:53 -0400)]
Cleanup - it's no longer necessary to manually reset global variables.

Now that a soft-reboot forces a hard-reboot, it is no longer necessary
to manually reset global variables.

13 years agoAllow rom to grow to 256K.
Kevin O'Connor [Sat, 25 Sep 2010 16:48:43 +0000 (12:48 -0400)]
Allow rom to grow to 256K.

Enable rom size to be over 128K.

Apparently, only the first 128K of the rom are mirrored to the
0xc0000-0xfffff area under qemu, so make sure to copy the rom (via
make_bios_writable) in the non-init part of the startup code.  This
ensure the copy code is itself available.

13 years agoFix typo preventing relocated space from being used for option roms.
Kevin O'Connor [Sat, 25 Sep 2010 16:46:38 +0000 (12:46 -0400)]
Fix typo preventing relocated space from being used for option roms.

13 years agofix virtio-blk failure after reboot
Gleb Natapov [Wed, 15 Sep 2010 16:31:44 +0000 (18:31 +0200)]
fix virtio-blk failure after reboot

vring_virtqueue should be zeroed otherwise old values will be reused
after reboot.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoAdd a debug method to AML code.
Kevin O'Connor [Mon, 20 Sep 2010 02:13:18 +0000 (22:13 -0400)]
Add a debug method to AML code.

Add DBUG() method to AML - it can write output to the standard qemu
bios debug port (port 0x402).

13 years agoWarn that ohci bulk is not supported.
Kevin O'Connor [Mon, 20 Sep 2010 02:10:08 +0000 (22:10 -0400)]
Warn that ohci bulk is not supported.

Print a meaningful warning message when trying to use OHCI bulk.

13 years agoEnable optionroms to use freed space due to CONFIG_RELOCATE_INIT.
Kevin O'Connor [Thu, 16 Sep 2010 02:06:19 +0000 (22:06 -0400)]
Enable optionroms to use freed space due to CONFIG_RELOCATE_INIT.

The space in the e-segment is available for option roms after
relocating the init code.

Also, zero all of the option rom space when !CONFIG_OPTIONROMS_DEPLOYED.

13 years agoMove the 32bit init code to high memory at runtime.
Kevin O'Connor [Sat, 25 Sep 2010 15:34:06 +0000 (11:34 -0400)]
Move the 32bit init code to high memory at runtime.

Add support for moving the 32bit init code out of the e/f-segments and
into temporary ram.  Update the relocations in the code so that it can
live at its new address.

This frees up memory for other uses in the e/f segments.

13 years agoMove init code from _start() to post().
Kevin O'Connor [Thu, 16 Sep 2010 01:59:11 +0000 (21:59 -0400)]
Move init code from _start() to post().

Move the shadow calls from _start() to post() - this ensures all the
one time init code is in post().

Also, reorg post so that malloc setup is done before ivt/bda/ebda
setup.

This is in preparation for relocating the 32bit flat init code.

13 years agoAdd memalign_tmp() helper function.
Kevin O'Connor [Wed, 15 Sep 2010 04:25:32 +0000 (00:25 -0400)]
Add memalign_tmp() helper function.

13 years agoTry to hard-reboot on rerun of post even on emulators.
Kevin O'Connor [Thu, 16 Sep 2010 01:48:16 +0000 (21:48 -0400)]
Try to hard-reboot on rerun of post even on emulators.

Extend the hard-reboot logic to qemu and kvm.  On qemu, a reboot will
not reset the memory settings for 0xc0000-0xfffff, so copy that memory
area manually before rebooting.  Unfortunately, kvm does not keep a
pristine copy of the BIOS at 0xffff0000, so detect that case and
shutdown the machine.

13 years agoDon't do shadow copying of optionroms when CONFIG_OPTIONROMS_DEPLOYED.
Kevin O'Connor [Tue, 14 Sep 2010 01:19:27 +0000 (21:19 -0400)]
Don't do shadow copying of optionroms when CONFIG_OPTIONROMS_DEPLOYED.

When CONFIG_OPTIONROMS_DEPLOYED is set, there is no need to copy the
0xc0000-0xf0000 space around - SeaBIOS ignores what's there when it
that mode.

13 years agoTry to hard-reboot processor on rerun of post under coreboot.
Kevin O'Connor [Tue, 14 Sep 2010 00:22:07 +0000 (20:22 -0400)]
Try to hard-reboot processor on rerun of post under coreboot.

Add several methods for rebooting a processor.

Detect a rerun of POST under coreboot and attempt to reboot the
processor.

13 years agoEnhance build to emit relocation information.
Kevin O'Connor [Wed, 15 Sep 2010 04:26:19 +0000 (00:26 -0400)]
Enhance build to emit relocation information.

Add support for determining which relocations need to be adjusted to
relocate the "32bit flat init" code.  Place those relocations in the
output object.

13 years agoSeparate out init code from the rest of the 32bit flat code.
Kevin O'Connor [Thu, 16 Sep 2010 01:38:16 +0000 (21:38 -0400)]
Separate out init code from the rest of the 32bit flat code.

Enhance tools/layoutrom.py code so that it can detect which sections
are used from the "32bit flat" runtime code.  All other "32bit flat"
sections can then be assured to be initialization code only.

This is in preparation for relocating the 32bit initialization code.

13 years agoModify tools/layoutrom.py to use classes instead of tuples.
Kevin O'Connor [Thu, 16 Sep 2010 01:28:31 +0000 (21:28 -0400)]
Modify tools/layoutrom.py to use classes instead of tuples.

Using classes and updating the values in the classes makes the code
easier to understand.

13 years agoUse str.startswith() in python scripts.
Kevin O'Connor [Mon, 13 Sep 2010 22:04:02 +0000 (18:04 -0400)]
Use str.startswith() in python scripts.

Use the builtin startswith() string method instead of implementing it
manually.

13 years agoPrep version for next release.
Kevin O'Connor [Mon, 13 Sep 2010 17:18:09 +0000 (13:18 -0400)]
Prep version for next release.

13 years agoUpdate version to 0.6.1
Kevin O'Connor [Mon, 13 Sep 2010 16:58:44 +0000 (12:58 -0400)]
Update version to 0.6.1

13 years agoSupport Samsung SE-S084 USB DVD drive (and probably many others)
Kevin O'Connor [Fri, 3 Sep 2010 01:18:20 +0000 (21:18 -0400)]
Support Samsung SE-S084 USB DVD drive (and probably many others)

A full implementation of ATAPI USB support would need to translate / filter
certain package types or some devices might not work. No previously working
devices break with the patch, so it is fine to commit.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
13 years agopciinit: remove unused variable, old_addr, in pci_set_io_region_addr().
Isaku Yamahata [Mon, 30 Aug 2010 02:32:01 +0000 (11:32 +0900)]
pciinit: remove unused variable, old_addr, in pci_set_io_region_addr().

old_addr is initialized, but not used.
remove the useless variable.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agoMinor - indentation change to jpeg.c.
Kevin O'Connor [Sat, 28 Aug 2010 18:58:15 +0000 (14:58 -0400)]
Minor - indentation change to jpeg.c.

13 years agoEnhance tools/readserial.py to support reading from a pipe.
Kevin O'Connor [Sat, 28 Aug 2010 18:55:32 +0000 (14:55 -0400)]
Enhance tools/readserial.py to support reading from a pipe.

Add option parsing support to tool.

Enable option (-f) to read from a pipe - which is useful when
redirecting qemu's debugging log to a pipe with:
  -chardev pipe,id=seabios,path=seabioslog -device isa-debugcon,iobase=0x402,chardev=seabios

13 years agoMake tools/transdump.py more resilient to unknown input.
Kevin O'Connor [Sat, 28 Aug 2010 16:54:23 +0000 (12:54 -0400)]
Make tools/transdump.py more resilient to unknown input.

13 years agoUpdate qemu_cfg_read to use "rep insb".
Kevin O'Connor [Thu, 26 Aug 2010 01:43:19 +0000 (21:43 -0400)]
Update qemu_cfg_read to use "rep insb".

Use rep insb instead of manual loop - the host may be able to optimize
the rep insb instruction.

13 years agoOnly show bootsplash during boot menu.
Kevin O'Connor [Thu, 26 Aug 2010 01:07:48 +0000 (21:07 -0400)]
Only show bootsplash during boot menu.

When the bootsplash picture is shown, it's not possible to see text.
So, only display the picture while prompting the user for the boot
menu.

13 years agoadd write support to virtio-blk
Gleb Natapov [Mon, 23 Aug 2010 07:23:45 +0000 (10:23 +0300)]
add write support to virtio-blk

Windows XP does write to sector 0 during installation and prints
mysterious error if write fails. Interestingly if write drops data,
but returns OK to Windows installer installation proceed without
complains and completes successfully.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoDon't try to talk to APIC on 486
Lubomir Rintel [Fri, 20 Aug 2010 11:37:54 +0000 (13:37 +0200)]
Don't try to talk to APIC on 486

It only has one cpuid level, therefore it can't report whether it
has an APIC. It probably hasn't; assume that. Without this,
SeaBIOS would get stuck on qemu -M isapc.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
13 years agoAdd ACPI SSDT/DSDT support for CPU hotplug.
Kevin O'Connor [Wed, 4 Aug 2010 01:30:03 +0000 (21:30 -0400)]
Add ACPI SSDT/DSDT support for CPU hotplug.

Move the SSDT defined processors from _PR to _SB namespace.

Extend the dynamically generated SSDT to include per cpu hotplug
methods.  These methods just call methods defined in the DSDT.  Also
dynamically generate a NTFY method and a CPON array of the
online/available CPUs.  Add file src/ssdt-proc.dsl with directions for
generating the per-cpu processor object AML code.

Extend the DSDT to include methods for handling cpu hotplug
notifications and methods for handling cpu status requests originating
from the SSDT methods.

13 years agoAdd additional debug status messages to bootsplash code.
Kevin O'Connor [Wed, 4 Aug 2010 00:58:43 +0000 (20:58 -0400)]
Add additional debug status messages to bootsplash code.

13 years agoAllow qemu to use bootsplash code via fwcfg interface.
Kevin O'Connor [Fri, 30 Jul 2010 22:53:10 +0000 (18:53 -0400)]
Allow qemu to use bootsplash code via fwcfg interface.

All the bootsplash code to pull the jpeg file from either cbfs (on
coreboot) or fwcfg (on qemu).

13 years agoAdd tools/trandump.py tool for converting hexdump() output.
Kevin O'Connor [Fri, 30 Jul 2010 22:51:29 +0000 (18:51 -0400)]
Add tools/trandump.py tool for converting hexdump() output.

Add tool for converting the output from hexdump() back into its
original binary form.  This can be useful for use with tools such as
hexdump and objdump.

13 years agoDefault bootsplash on (for coreboot users).
Kevin O'Connor [Fri, 30 Jul 2010 18:09:31 +0000 (14:09 -0400)]
Default bootsplash on (for coreboot users).

13 years agoAutodetect video mode based on bootsplash jpeg dimensions.
Kevin O'Connor [Fri, 30 Jul 2010 18:07:03 +0000 (14:07 -0400)]
Autodetect video mode based on bootsplash jpeg dimensions.

Replace video mode settings in config.h with a system to auto-detect a
video mode for the given bootsplash.jpg file.

13 years agoRename "decdata" to "jpeg" in bootsplash - to be consistent with jpeg.c.
Kevin O'Connor [Fri, 30 Jul 2010 17:25:21 +0000 (13:25 -0400)]
Rename "decdata" to "jpeg" in bootsplash - to be consistent with jpeg.c.

Also rename "jpeg" to "filedata" to avoid a conflict.

13 years agoBreakup jpeg_decode into parsing and displaying phases.
Kevin O'Connor [Fri, 30 Jul 2010 17:07:08 +0000 (13:07 -0400)]
Breakup jpeg_decode into parsing and displaying phases.

Split the screen display code out of the jpeg parsing code.

Allow ability for caller to obtain jpeg dimensions.

13 years agoAvoid using BSS variables in jpeg.c.
Kevin O'Connor [Fri, 30 Jul 2010 16:27:14 +0000 (12:27 -0400)]
Avoid using BSS variables in jpeg.c.

Using BSS increases the rom size (and reduce space for option roms).
So, move BSS variables in the jpeg.c code to malloc'd memory.

Also, move struct and error declarations from jpeg.h to jpeg.c.

13 years agoAdd FUNC16() helper macro for converting a 16bit func to a segoff_s.
Kevin O'Connor [Thu, 29 Jul 2010 01:31:38 +0000 (21:31 -0400)]
Add FUNC16() helper macro for converting a 16bit func to a segoff_s.

13 years agoHandle unaligned sizes in iomemcpy().
Kevin O'Connor [Tue, 27 Jul 2010 05:14:11 +0000 (01:14 -0400)]
Handle unaligned sizes in iomemcpy().

This fixes a bug causing truncation of uncompressed files in
cbfs_copyfile().

13 years agoCleanup bootsplash vesa signature detection.
Kevin O'Connor [Tue, 27 Jul 2010 04:00:53 +0000 (00:00 -0400)]
Cleanup bootsplash vesa signature detection.

13 years agoBe sure to disable bootsplash on all BIOS boot cases.
Kevin O'Connor [Tue, 27 Jul 2010 03:47:26 +0000 (23:47 -0400)]
Be sure to disable bootsplash on all BIOS boot cases.

Disable the bootsplash on cbfs payload exec, and if something hooks
int19.

Also, be sure to only disable the bootsplash (revert to text mode)
once.