Age | Commit message (Collapse) | Author | Files | Lines |
|
In the current seabios MP table description, NMI is connected only to
BSP's LINT1. But usually NMI is connected to all the CPUs' LINT1 as
indicated in MP specification. This patch changes seabios MP table to
describe NMI is connected to all the CPUs' LINT1.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
ACPI NMI Structure describes LINT pin (LINT0 or LINT1) information to
which NMI is connected, and it is needed by OS to initialize local APIC.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
Add ACPI_EXTRACT_ALL_CODE directive, to support extracting
AML code from listing into a named array. Use that instead including C
file generated by iasl, this makes it possible to include multiple AML
tables without resorting to preprocessor tricks.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
allow qemu to load dsdt as external acpi table.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
this will be used later.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
Add some comments and refactor out some duplicated code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
No need for a global variable - only a few functions use the busses
array.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The existing PCI sizing and mapping uses a recursive algorithm to
visit every bus and its devices in order. Replace that with an
algorithm that visits every device and then every bus.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Use the existing bus count instead of calculating a new one. Also,
the MaxPCIBus is guaranteed to encompass all pci->secondary_bus
references, so no need to check for overruns.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Pass a 'struct pci_device' into pci_bar and update all callers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
There are four separate phases of the current PCI initialization code:
bus initialization, bus sizing, bar allocation, and misc device init.
Move the code exclusively called in each phase next to each other, and
clearly mark each section.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Format BDF (bus, device, fn), vendor:device, and prefmem debug output
in a more user-readable format.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Get rid of manually cut and pasted ssdt_proc,
use ssdt compiled by iasl and offsets extracted
by acpi_extract instead.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Use iasl -l flag to produce a mixed listing, where a
source line is followed by matching AML.
Add a tool tools/acpi_extract.py to process this
listing. The tool looks for ACPI_EXTRACT tags
in the ASL source and outputs matching AML offsets
in an array.
To make these directives pass through ASL without affecting AML,
and to make it possible to match AML to source exactly,
add a preprocessing stage, which prepares input for iasl,
and puts each ACPI_EXTRACT tag within a comment,
on a line by itself.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Use method calls in LNK[ABCDS] object methods - this reduces the
cut-and-paste code. It also makes it simpler and the object size
smaller.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Simplify the hotplug code by moving the bulk of the logic out of the
macros and into static method definitions. This also reduces the ACPI
DSDT code size.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Change the macros to pass the slot number via hex, and then remove
passing of duplicate information.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move the PCI hotplug definitions next to each other. This introduces
a notify method (\_SB.PCI0.PCNF) to help consolidate the code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Add comments around major sections of the DSL file. Also, add scope
declarations where needed so that each section only contains one
scope.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
If there are no memory allocations for a given type then the "max" bar
size is zero. However, ALIGN_DOWN does not handle an alignment of
zero properly. Catch and handle the zero case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Some versions of gcc have difficulties with externally visible
variables that are used before they are declared. Now that pmm.c
contains only 32bit code and has a reference to CanPreempt, make sure
the declaration of CanPreempt (in stacks.c) is compiled first.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
This prevents lockups when trying to allocate PCI resources on an
ISA-only system like QEMU can emulate.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
|
|
QEmu only copies the top 128K of the BIOS image to low memory
(0xe0000-0xfffff). Images over 128K are only fully mapped in high
memory (0xfff00000). However, the SeaBIOS shadow functions
(make_bios_writable_intel) will copy up to 256K to low memory.
SeaBIOS generally works with 256K roms because they are automatically
copied to low memory during the BIOS init. However, this only works
if the shadow function code is itself part of the bios image that is
placed in low memory by QEmu.
Defining handle_post() as VISIBLE32FLAT will make the linker scripts
more likely to place the initial shadow code in the last 128K of the
image.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move ACPI_HPET_ADDRESS to BUILD_HPET_ADDRESS in config.h so that it
is listed with similar hardcoded addresses.
Also, organize the BUILD_*_ADDRESS definitions in config.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
QEMU does not provide a HPET block if it was configured with -no-hpet,
other machines SeaBIOS runs on may lack a HPET as well. Perform basic
checks the ID register for a reasonable vendor ID and a clock period
within the valid range, do not build the HPET table if that fails.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
|
|
The coreboot init code now looks for an existing smbios table and will
use it. A locally generated smbios table will only be created if no
coreboot table is found.
|
|
The switch to the two-pass pci initialization dropped the isa bridge
initialization by accident. That broke interrupts on FreeBSD 4.4 and
maybe also other older guests which don't use ACPI for IRQ routing
setup. Add the bits back in.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Bjørn Mork <bjorn@mork.no>
|
|
Lack of real hardware testing was the main reason to turn it off by
default. The AHCI has been fixed to work on both qemu and real
hardware, so lets flip the switch now.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Also allocate the ahci port struct itself from tmp memory for probing,
then copy to fseg memory in case we detected some device. This way we
don't waste fseg memory for unused ports.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Stick description and boot priority into the port struct, so it
holds everything needed to register the device, so we can do
the registration after ahci_port_init returned.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Also simplify the code a bit further down the road
as we know iscd must be true ;)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Instead if creating a single thread which probes all ports one after
another kick one thread per port, so ports are probed in parallel.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This patch creates a common bounce buffer in block.c which
is shared by the cdrom and ahci drivers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
If the SMBIOS is small (less than 600 bytes) allow it to be allocated
in the f-segment. This works around a bug in JunOS - it crashes on
SMBIOS tables located in high memory.
|
|
|
|
|
|
Windows Server 2008 checked build complains about lack of consistency
between MTRR MSRs in SMP guests.
Problem is the smp_mtrr array is not large enough to hold all MSRs (31
entries with current qemu/kvm implementations).
Increase it to 32.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Wind up bootprio support in the ahci driver so boot device ordering
works for ahci disks too. No extra work needed on qemu side.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Rework init workflow to match suggestions in the ahci specs better,
especially remove the shortcut which tries to detect drives without
enabling FIS receiving. This makes memory allocation a bit complicated
as we are using malloc_tmp() allocated memory now to probe the devices
so we can free it when no drive is present. In case we detect a drive
we have to free and realloc the memory with malloc_low() so it is
available after POST when the boot loader wants read stuff via int13.
Also use TSC to calculate timeout instead of delays and loop counts.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This change allows unaligned buffers to be used for reads or writes
to non-atapi devices. Currently only MS-DOS boot is known to need
unaligned buffer support.
Signed-off-by: Scott Duplichan <scott@notabs.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
By Scott Duplichan.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Poll interrupt status register to figure when the device has updated the
status and possibly finished the request, continue polling until BSY is
clear as we might see multiple status updates per request.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
FIS setup does't follow the SATA specs, fix it.
Credits go to Jonathan Kollasch and Scott Duplichan for finding those.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This was somehow dropped during the iterations of the original Xen patches.
It's actually harmless at the moment since there are no users of hypercalls but
patches are being written to support Xen PV block devices which need this.
It's not clear exactly how early this needs to be but I think it needs to be at
least before init_hw() (since that would detect disk devices).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
|
Now that the PMM code is only run in 32bit mode, remove the
GET/SET_PMMVAR macros and other 16bit wrappers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Use call32() to jump into handle_pmm(). This reduces the amount of
16bit code needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
... and make it match with the declarations in acpi-dsdt.dsl.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This patch actually enables the two-pass pci initialization and
deactivates the old pci initialization bits.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This patch adds a second device scan to the pci initialization, which
counts the memory bars of the various sizes and types. Then it
calculates the sizes and the packing of the prefetchable and
non-prefetchable pci memory windows and prints the results.
The patch doesn't actually map the devices to make debugging easier.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
Use a more consistent naming that matches entry_xxx to handle_xxx
where possible.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Detect a resume/reboot by inspecting HaveRunPost instead of inspecting
the cmos reset code. Inspecting a global variable is both simpler and
safer.
Move the reboot logic from post.c to resume.c - this makes the code in
post.c simpler as it is now only called once on machine startup. This
also makes it easier to ensure all POST initialization code resides in
the relocatable "init" sections.
Also, rename _start() to handle_post() so that it is more in keeping
with the entry_xxx() and handle_xxx() function naming.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com>
|
|
Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add romfile_loadint() function which can be used to extract a
little-endian binary encoded integer from rom.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
Call pci_probe after pci bridge setup and before pci device setup.
This will allow the pci device setup to use 'struct pci_device'.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Passing in rom locations via absolute memory addresses hasn't been
needed since coreboot adopted CBFS support (which as several years
ago).
|
|
This adds 'struct pci_device' and pci_probe() which will locate and
store all found PCI devices in the system at startup.
|
|
|
|
To start, register the AMD ATA controller on the A50M chipset as
compatible with ATA mode even if it comes up in AHCI mode.
|
|
|
|
It's easier to understand the code when it is in the same file as its
callers.
|
|
|
|
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>
|
|
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>
|
|
I'd like to use it for Xen support.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
Add a build test to ensure that LD can properly align sections.
|
|
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
|
|
This simplifies the mouse.c code. It also prevents USB mouse
interaction from changing the ps2 port setup.
|
|
|
|
This fixes a compile error on gcc 4.6.
|
|
Based on a patch by: Stefan Reinauer <reinauer@google.com>
|
|
Some versions of Bochs don't like the MTRR initialization, so add
CONFIG_MTRR_INIT to control whether SeaBIOS will touch the MTRRs.
|
|
|
|
|
|
WHQL complains otherwise.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
Move most of the config settings in config.h to the Kconfig file. The
remaining settings in config.h, are mostly build related.
|
|
Don't require the build directory to be the "out/" directory of the
SeaBIOS source.
|
|
|
|
See patch.
Signed-off-by: Stefan Reinauer <reinauer@google.com>
|
|
Create autoconf.h during the build.
Move a couple of config settings from config.h to Kconfig.
|
|
Always emit CONFIG_X definitions in autoconf.h - set them to 0 when
they are disabled.
|
|
|
|
This is a pure copy of the tool from the Linux v2.6.38-rc2
scripts/kconfig/ directory.
|
|
|
|
|
|
Make sure the PCI path doesn't point to itself.
|
|
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>
|
|
Improve device path descriptions of devices on PCI buses.
|
|
Don't try to register payloads until after malloc has been setup.
|
|
Introduce function nullTrailingSpace() that nulls blank characters
from the end of a string. Use this function in the ATA, USB MSC, and
bootorder code.
|
|
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>
|
|
Use the device path of the USB device to find a bootorder entry.
|
|
Track the path of ports and controller of each usb device. This is
useful for reporting the exact device path.
|
|
Add functions that find boot device path for pci/ata/floppy/rom devices.
|
|
|
|
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.
|
|
|
|
|
|
Move the BEV storage to static variables in boot.c.
Also, increase the maximum number of BEV entries from 8 to 20.
|
|
|
|
The "Drives" struct just held three global variables - declare the
three global variables independently.
|
|
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.
|
|
|
|
Unify the calling of setup_translation().
|
|
|
|
Add support for passing in priorities to bootlist system.
Based on patch by: Gleb Natapov <gleb@redhat.com>
|
|
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.
|
|
Make sure the description is populated before registering a drive.
|
|
IO port ends at 64K - 1. not 64K.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
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>
|
|
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.
|
|
If the file requested isn't the last file read, then reread the index
to find the given file.
|
|
|
|
Add function to find, malloc, and copy a romfile. Use it in the
bootsplash and bootorder code.
|
|
Read bootorder file, parse it and put it into array for easy
consumption.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
|
|
romfile_name() return file name given file handler. Works for qemu and
coreboot.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
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>
|
|
Some binutils (report of 2.20.1) don't create dummy symbols for each
section - work around that.
|
|
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>
|
|
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>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Make sure IO, MMIO and DMA are enabled in pci config space
before using the device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
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.
|
|
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.
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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.
|
|
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.
|
|
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>
|
|
This patch adds helper functions to manage pci area.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
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>
|
|
|
|
|
|
Now that a soft-reboot forces a hard-reboot, it is no longer necessary
to manually reset global variables.
|
|
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.
|
|
|
|
vring_virtqueue should be zeroed otherwise old values will be reused
after reboot.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
Add DBUG() method to AML - it can write output to the standard qemu
bios debug port (port 0x402).
|
|
Print a meaningful warning message when trying to use OHCI bulk.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
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.
|