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>
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>
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>
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.
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.
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.
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.
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.
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.
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.
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 ]
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.
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.
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.
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.
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.