seabios.git
12 years agoMinor fix - make sure not to call ohci/uhci_init from irq handler.
Kevin O'Connor [Sun, 10 Jul 2011 19:41:55 +0000 (15:41 -0400)]
Minor fix - make sure not to call ohci/uhci_init from irq handler.

When CONFIG_THREAD_OPTIONROMS is enabled, accessing the PCI config
space from a thread could potentially race with an option rom.  Make
sure the ohci/uhci_init() functions (which access PCI config space)
are never run while an optionrom could also be running.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoFix serial port flushing code.
Kevin O'Connor [Sat, 9 Jul 2011 22:42:34 +0000 (18:42 -0400)]
Fix serial port flushing code.

debug_serial() was doing a full flush while debug_serial_flush() was
only doing a partial flush.  Fix that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoRemove now unneeded find_pci().
Kevin O'Connor [Sat, 9 Jul 2011 18:49:13 +0000 (14:49 -0400)]
Remove now unneeded find_pci().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoPush use of 'struct pci_device' to bootprio_find_pci_rom().
Kevin O'Connor [Sat, 9 Jul 2011 18:47:47 +0000 (14:47 -0400)]
Push use of 'struct pci_device' to bootprio_find_pci_rom().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoPush use of 'struct pci_device' to bootprio_find_ata_device().
Kevin O'Connor [Sat, 9 Jul 2011 18:42:11 +0000 (14:42 -0400)]
Push use of 'struct pci_device' to bootprio_find_ata_device().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoPush use of 'struct pci_device' to bootprio_find_fdc_device().
Kevin O'Connor [Sat, 9 Jul 2011 18:35:37 +0000 (14:35 -0400)]
Push use of 'struct pci_device' to bootprio_find_fdc_device().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoPush use of 'struct pci_device' to bootprio_find_pci_device().
Kevin O'Connor [Sat, 9 Jul 2011 18:33:56 +0000 (14:33 -0400)]
Push use of 'struct pci_device' to bootprio_find_pci_device().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoPush use of 'struct pci_device' to bootprio_find_usb().
Kevin O'Connor [Sat, 9 Jul 2011 18:31:50 +0000 (14:31 -0400)]
Push use of 'struct pci_device' to bootprio_find_usb().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoPush 'struct pci_device' into USB code (instead of using u16 bdf).
Kevin O'Connor [Sat, 9 Jul 2011 18:11:21 +0000 (14:11 -0400)]
Push 'struct pci_device' into USB code (instead of using u16 bdf).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoExtend tools/readserial.py to support serial port timing calibration.
Kevin O'Connor [Sat, 9 Jul 2011 17:16:24 +0000 (13:16 -0400)]
Extend tools/readserial.py to support serial port timing calibration.

Some serial ports have slightly different timing.  These timing
variations result in less accurate boot time reporting.  So, add a
calibration mechanism to the tool so that one can determine how much
time a specific machine's serial port uses.

Also, extend the main part of the tool to allow the user to specify
an exact timing parameter.

12 years agoFix jpeg decoder problem when it is used in 24 BPP mode.
Wayne Xia [Fri, 8 Jul 2011 03:03:16 +0000 (11:03 +0800)]
Fix jpeg decoder problem when it is used in 24 BPP mode.

Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com>
12 years agoAdd an option to let seabios show BMP file as a logo.
Wayne Xia [Fri, 8 Jul 2011 03:02:09 +0000 (11:02 +0800)]
Add an option to let seabios show BMP file as a logo.

Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com>
12 years agoAdd utility "tools/encodeint.py" for CBFS config file creation.
Kevin O'Connor [Wed, 6 Jul 2011 00:57:07 +0000 (20:57 -0400)]
Add utility "tools/encodeint.py" for CBFS config file creation.

12 years agoReplace CONFIG_SCREEN_AND_DEBUG with "etc/screen-and-debug" file.
Kevin O'Connor [Wed, 6 Jul 2011 00:56:07 +0000 (20:56 -0400)]
Replace CONFIG_SCREEN_AND_DEBUG with "etc/screen-and-debug" file.

12 years agoReplace CONFIG_S3_RESUME_VGA_INIT with "etc/s3-resume-vga-init" file.
Kevin O'Connor [Wed, 6 Jul 2011 00:50:32 +0000 (20:50 -0400)]
Replace CONFIG_S3_RESUME_VGA_INIT with "etc/s3-resume-vga-init" file.

12 years agoReplace "CONFIG_OPTIONROMS_CHECKSUM" with "etc/optionroms-checksum" file.
Kevin O'Connor [Wed, 6 Jul 2011 00:47:35 +0000 (20:47 -0400)]
Replace "CONFIG_OPTIONROMS_CHECKSUM" with "etc/optionroms-checksum" file.

12 years agoReplace CONFIG_PS2_KEYBOARD_SPINUP with "etc/ps2-keyboard-spinup" file.
Kevin O'Connor [Wed, 6 Jul 2011 00:44:00 +0000 (20:44 -0400)]
Replace CONFIG_PS2_KEYBOARD_SPINUP with "etc/ps2-keyboard-spinup" file.

12 years agoReplace CONFIG_EXTRA_PCI_ROOTS with dynamic "etc/extra-pci-roots" file.
Kevin O'Connor [Wed, 6 Jul 2011 00:40:11 +0000 (20:40 -0400)]
Replace CONFIG_EXTRA_PCI_ROOTS with dynamic "etc/extra-pci-roots" file.

12 years agoReplace CONFIG_BOOTMENU_WAIT with dynamic "etc/boot-menu-wait" file.
Kevin O'Connor [Wed, 6 Jul 2011 00:34:34 +0000 (20:34 -0400)]
Replace CONFIG_BOOTMENU_WAIT with dynamic "etc/boot-menu-wait" file.

12 years agoAdd "romfile" code to assist with extract integer config settings.
Kevin O'Connor [Wed, 6 Jul 2011 00:32:44 +0000 (20:32 -0400)]
Add "romfile" code to assist with extract integer config settings.

Add romfile_loadint() function which can be used to extract a
little-endian binary encoded integer from rom.

12 years agoReplace CONFIG_PCI_ROOT1/2 with CONFIG_EXTRA_PCI_ROOTS.
Kevin O'Connor [Sat, 2 Jul 2011 22:39:03 +0000 (18:39 -0400)]
Replace CONFIG_PCI_ROOT1/2 with CONFIG_EXTRA_PCI_ROOTS.

Instead of defining the bus id of each extra root bus, define the
number of extra root buses.  The bus id isn't necessarily stable from
one boot to the next.

12 years agoRename foreachbdf_in_bus to foreachbdf and simplify it.
Kevin O'Connor [Sat, 2 Jul 2011 18:49:41 +0000 (14:49 -0400)]
Rename foreachbdf_in_bus to foreachbdf and simplify it.

Now that all callers of foreachbdf have been converted to
foreachbdf_in_bus, simplify the pci_next() code - it no longer needs
to track PCI bridges.

Also, rename the remaining users of foreachbdf_in_bus to foreachbdf.

12 years agoConvert remaining callers of foreachbdf to foreachbdf_in_bus.
Kevin O'Connor [Sat, 2 Jul 2011 18:32:11 +0000 (14:32 -0400)]
Convert remaining callers of foreachbdf to foreachbdf_in_bus.

Convert the last few callers of foreachbdf to foreachbdf_in_bus.  This
is in preparation for simplification of foreachbdf_in_bus.

Also add in addition debugging messages to pci_probe.

12 years agoConvert pci_find_device/class to use 'struct pci_device'.
Kevin O'Connor [Sat, 2 Jul 2011 18:04:19 +0000 (14:04 -0400)]
Convert pci_find_device/class to use 'struct pci_device'.

12 years agoCalculate vgahook responses during setup instead of in 16bit code.
Kevin O'Connor [Sat, 2 Jul 2011 17:50:21 +0000 (13:50 -0400)]
Calculate vgahook responses during setup instead of in 16bit code.

Do vga type and parameter detection during setup and store the
necessary info in global variables for the 16bit code.  This
simplifies the "vgahook" 16bit code.

12 years agoUse 'struct pci_device' to note which devices have native drivers.
Kevin O'Connor [Wed, 22 Jun 2011 02:52:51 +0000 (22:52 -0400)]
Use 'struct pci_device' to note which devices have native drivers.

Remove the check in optionroms.c for CONFIG_ATA and
PCI_CLASS_STORAGE_IDE with a flag in 'struct pci_device'.  This
ensures devices using the ATA driver that aren't in
PCI_CLASS_STORAGE_IDE don't have their optionroms executed.  It also
allows other drivers to disable option rom execution in the future.

12 years agoConvert pci_init_device to use 'struct pci_device'.
Kevin O'Connor [Wed, 22 Jun 2011 02:41:15 +0000 (22:41 -0400)]
Convert pci_init_device to use 'struct pci_device'.

12 years agoMove pci_probe() call into pciinit() code.
Kevin O'Connor [Wed, 22 Jun 2011 02:22:58 +0000 (22:22 -0400)]
Move pci_probe() call into pciinit() code.

Call pci_probe after pci bridge setup and before pci device setup.
This will allow the pci device setup to use 'struct pci_device'.

12 years agoUse manual PCI search when making bios ram writable.
Kevin O'Connor [Wed, 22 Jun 2011 01:22:01 +0000 (21:22 -0400)]
Use manual PCI search when making bios ram writable.

During the ram unlock phase static variables can't be written, so
don't rely on the higher level PCI searching functions.  This will
allow for future simplification of those high level search functions.

This also limits the scan for the memory locking device to the first
bus - the device should also be on the root bus.

12 years agoReplace PCIPaths code with struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 03:29:15 +0000 (23:29 -0400)]
Replace PCIPaths code with struct pci_device.

12 years agoConvert USB detection code to use struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 02:23:02 +0000 (22:23 -0400)]
Convert USB detection code to use struct pci_device.

12 years agoConvert AHCI detection code to use struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 02:22:42 +0000 (22:22 -0400)]
Convert AHCI detection code to use struct pci_device.

12 years agoConvert virtio detection to use struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 02:22:08 +0000 (22:22 -0400)]
Convert virtio detection to use struct pci_device.

12 years agoConvert mptable code to use struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 02:21:11 +0000 (22:21 -0400)]
Convert mptable code to use struct pci_device.

12 years agoConvert ATA detection code to use struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 02:20:43 +0000 (22:20 -0400)]
Convert ATA detection code to use struct pci_device.

12 years agoConvert option rom scan to use struct pci_device.
Kevin O'Connor [Tue, 21 Jun 2011 02:19:17 +0000 (22:19 -0400)]
Convert option rom scan to use struct pci_device.

12 years agoRemove support for compiling in OPTIONROM_VENDEV_1/2.
Kevin O'Connor [Tue, 21 Jun 2011 01:52:44 +0000 (21:52 -0400)]
Remove support for compiling in OPTIONROM_VENDEV_1/2.

Passing in rom locations via absolute memory addresses hasn't been
needed since coreboot adopted CBFS support (which as several years
ago).

12 years agoFind all pci devices at startup and cache them for future use.
Kevin O'Connor [Sun, 19 Jun 2011 18:09:20 +0000 (14:09 -0400)]
Find all pci devices at startup and cache them for future use.

This adds 'struct pci_device' and pci_probe() which will locate and
store all found PCI devices in the system at startup.

12 years agoRename foreachpci macro to foreachbdf.
Kevin O'Connor [Sun, 19 Jun 2011 14:46:28 +0000 (10:46 -0400)]
Rename foreachpci macro to foreachbdf.

12 years agoAdd support for white-listing AHCI controllers as ATA compatible.
Kevin O'Connor [Sun, 19 Jun 2011 14:03:08 +0000 (10:03 -0400)]
Add support for white-listing AHCI controllers as ATA compatible.

To start, register the AMD ATA controller on the A50M chipset as
compatible with ATA mode even if it comes up in AHCI mode.

12 years agoConvert ATA pci scan to use pci_device_id table.
Kevin O'Connor [Sun, 19 Jun 2011 13:43:20 +0000 (09:43 -0400)]
Convert ATA pci scan to use pci_device_id table.

12 years agoRemove dev-i440fx.c/h - move code closer to its callers.
Kevin O'Connor [Sun, 19 Jun 2011 14:09:26 +0000 (10:09 -0400)]
Remove dev-i440fx.c/h - move code closer to its callers.

It's easier to understand the code when it is in the same file as its
callers.

12 years agoOnly allow CONFIG_XEN when not CONFIG_COREBOOT.
Kevin O'Connor [Wed, 15 Jun 2011 02:20:45 +0000 (22:20 -0400)]
Only allow CONFIG_XEN when not CONFIG_COREBOOT.

12 years agoCorrect fseg allocation for SMBIOS tables.
Ian Campbell [Tue, 14 Jun 2011 14:22:09 +0000 (15:22 +0100)]
Correct fseg allocation for SMBIOS tables.

Anthony Perard noticed that grub was unhappy because it sees no low memory and
that his e820 table was missing the first entry. He then pointed out this
rather glaring error in the allocation of space for the SMBIOS tables.

I've no idea why I didn't see this failure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Anthony Perard <anthony.perard@citrix.com>
12 years agoAdd support for use as Xen HVM BIOS.
Ian Campbell [Wed, 1 Jun 2011 10:00:29 +0000 (11:00 +0100)]
Add support for use as Xen HVM BIOS.

SeaBIOS is called by Xen's hvmloader which does the basic platform
setup (PCI, APIC, etc) and provides the various BIOS tables. Therefore
avoid re-doing that setup and copy out the tables as necessary. A
simple data structure is defined to pass the addresses of these
tables.

This patch also establishes the basic infrastructure to make
hypercalls, although it currently only uses it to query the hypervisor
version.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
12 years agoMove support for copying out BIOS tables into its own file.
Ian Campbell [Wed, 1 Jun 2011 10:00:28 +0000 (11:00 +0100)]
Move support for copying out BIOS tables into its own file.

I'd like to use it for Xen support.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
12 years agoFix OHCI keyboard repeat key issue.
Kevin O'Connor [Sun, 29 May 2011 13:48:28 +0000 (09:48 -0400)]
Fix OHCI keyboard repeat key issue.

Mask toggleCarry and Halted flags in endpoint descriptor dword #2 so that
the remaining head pointer field is valid for comparing with the next
pointer.

Signed-off-by: Scott Duplichan <scott@notabs.org>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoOnly show CONFIG_PS2_KEYBOARD_SPINUP when CONFIG_COREBOOT.
Kevin O'Connor [Sat, 28 May 2011 15:01:39 +0000 (11:01 -0400)]
Only show CONFIG_PS2_KEYBOARD_SPINUP when CONFIG_COREBOOT.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agoAdd option to handle PS2 keyboards that have a slow power up.
Kevin O'Connor [Sat, 28 May 2011 15:00:28 +0000 (11:00 -0400)]
Add option to handle PS2 keyboards that have a slow power up.

Add PS2_KEYBOARD_SPINUP option to give certain keyboards more time to
initialize.

Based on report and feedback from: Sven Schnelle <svens@stackframe.org>

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
12 years agofix resume from S3 with QXL device
Kevin O'Connor [Wed, 25 May 2011 02:35:40 +0000 (22:35 -0400)]
fix resume from S3 with QXL device

From: Gleb Natapov <gleb@redhat.com>

QXL device is powered down during S3, so tell this to a guest OS
in AML code.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
12 years agoCheck for broken LD that ships with Ubuntu 11.04.
Kevin O'Connor [Sun, 22 May 2011 01:05:04 +0000 (21:05 -0400)]
Check for broken LD that ships with Ubuntu 11.04.

Add a build test to ensure that LD can properly align sections.

12 years agoPrint E820 type names as well as numbers, as a debug aid
Ian Campbell [Fri, 13 May 2011 15:30:55 +0000 (16:30 +0100)]
Print E820 type names as well as numbers, as a debug aid

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
12 years agoAdd Kconfig option to specify which serial port when serial debugging.
Kevin O'Connor [Wed, 11 May 2011 03:36:11 +0000 (23:36 -0400)]
Add Kconfig option to specify which serial port when serial debugging.

12 years agoAdd config option (CONFIG_BOOTORDER) to disable bootorder support.
Kevin O'Connor [Wed, 11 May 2011 02:08:30 +0000 (22:08 -0400)]
Add config option (CONFIG_BOOTORDER) to disable bootorder support.

12 years agoMove ps2ctr manipulation from mouse.c to ps2port.c.
Kevin O'Connor [Sat, 7 May 2011 18:19:29 +0000 (14:19 -0400)]
Move ps2ctr manipulation from mouse.c to ps2port.c.

This simplifies the mouse.c code.  It also prevents USB mouse
interaction from changing the ps2 port setup.

12 years agoMinor Kconfig help update.
Kevin O'Connor [Sat, 7 May 2011 17:57:42 +0000 (13:57 -0400)]
Minor Kconfig help update.

12 years agoFix struct bregs - it shouldn't have multiple members with the same name.
Kevin O'Connor [Sat, 7 May 2011 17:56:48 +0000 (13:56 -0400)]
Fix struct bregs - it shouldn't have multiple members with the same name.

This fixes a compile error on gcc 4.6.

13 years agoAdd config option to permit running option roms with bad checksums.
Kevin O'Connor [Mon, 7 Mar 2011 00:22:46 +0000 (19:22 -0500)]
Add config option to permit running option roms with bad checksums.

Based on a patch by: Stefan Reinauer <reinauer@google.com>

13 years agoAdd config option to disable MTRR initialization.
Kevin O'Connor [Mon, 7 Mar 2011 00:06:48 +0000 (19:06 -0500)]
Add config option to disable MTRR initialization.

Some versions of Bochs don't like the MTRR initialization, so add
CONFIG_MTRR_INIT to control whether SeaBIOS will touch the MTRRs.

13 years agoPrep version for next release.
Kevin O'Connor [Sun, 6 Mar 2011 23:26:13 +0000 (18:26 -0500)]
Prep version for next release.

13 years agoUpdate version to 0.6.2
Kevin O'Connor [Tue, 1 Mar 2011 02:09:34 +0000 (21:09 -0500)]
Update version to 0.6.2

13 years agolets pretend that RTC can be used to wakeup from S4
Gleb Natapov [Sun, 30 Jan 2011 12:17:11 +0000 (14:17 +0200)]
lets pretend that RTC can be used to wakeup from S4

WHQL complains otherwise.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
13 years agoExpand user configurable parameters in Kconfig.
Kevin O'Connor [Sat, 29 Jan 2011 15:57:20 +0000 (10:57 -0500)]
Expand user configurable parameters in Kconfig.

Move most of the config settings in config.h to the Kconfig file.  The
remaining settings in config.h, are mostly build related.

13 years agoSupport non-local build directory - allow "make OUT=abc/" to work.
Kevin O'Connor [Sat, 29 Jan 2011 16:26:54 +0000 (11:26 -0500)]
Support non-local build directory - allow "make OUT=abc/" to work.

Don't require the build directory to be the "out/" directory of the
SeaBIOS source.

13 years agoThe vgabios build must depend on autoconf.h.
Kevin O'Connor [Sat, 29 Jan 2011 16:24:58 +0000 (11:24 -0500)]
The vgabios build must depend on autoconf.h.

13 years agofix parallel compilation of SeaBIOS
Stefan Reinauer [Fri, 28 Jan 2011 02:39:01 +0000 (18:39 -0800)]
fix parallel compilation of SeaBIOS

See patch.

Signed-off-by: Stefan Reinauer <reinauer@google.com>
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.