| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
make pci memory space assignment 64bit aware.
If 64bit memory space is found while assigning pci memory space,
clear higher bit and skip to next bar.
This patch is preparation for q35 chipset initialization which
has 64bit bar.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
|
|
|
|
| |
factor out pci bar region allocation logic.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
|
|
|
|
|
|
|
| |
This patch introduces foreachpci_in_bus() helper macro for
depth first recursion. foreachpci() is for width first recursion.
The macro will be used later to initialize pci bridge
that requires depth first recursion.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
|
|
|
|
|
|
| |
Support displaying a jpeg file (stored in cbfs) during bootup.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
|
|
|
|
| |
Remove already completed items.
|
|
|
|
|
|
|
|
| |
Fix bvprintf to respect space padding when printing hex numbers
and the caller specifies alignment without zero padding, eg. %2x
as opposed to %02x
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
|
|
|
|
|
|
|
|
| |
Make the qemu_cfg optionrom extraction code use an interface more
similar to the cbfs file interface.
Introduce a set of "romfile_" wrappers that select between cbfs and
qemu cfg interface. Use these new wrappers in the optionrom code.
|
|
|
|
|
|
|
|
|
| |
Add VGA hooks to operate the following mainboards with coreboot + SeaBIOS:
- Kontron 986LCD-M
- Getac P470 (Laptop)
- Roda RK886EX (Laptop)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
|
|
|
|
|
|
|
| |
- Use the same description text for CD and DVD drives all over the tree.
- Mention DVD first as it's more likely these days
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
|
|
|
|
|
|
|
|
|
|
| |
Surprisingly iasl creates output file even when compilation error.
So typing make after an error will succeed.
This patch prevents it by removing the output file when error.
And adds related dependencies to compile when .hex is missing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
|
|
|
|
|
| |
Using the low memory buffer gives more flexibility with the final
location of the buffer.
Don't allocate the buffer at all if no cdrom drives are present.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing malloc implementation effectively uses a stack - all new
allocations come from the top of the stack. When allocating memory
with a large alignment, the pad used to align the new memory is
unavailable to other users. Also, memory released by calling free()
is only available to other users when all memory allocated after it is
also freed.
This new malloc scheme uses a first fit approach to finding available
memory. It makes it possible to use alignment padding and freed space
for new allocations.
This helps reduce the required memory in the permanent memory zones
(ZoneHigh and ZoneLow) where users have the need to allocate
structures with high alignment (eg, virtio and usb).
|
|
|
|
|
|
| |
Simplify entrycount tracking.
Allow mptable generation to work even if there is no high mem available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cleanup memory barrier usage bringing it
in sync with what linux guest does.
The rules are simple:
- read barrier after index read
- write barrier before index write
Also, call macros smp_rmb/smp_wmb to stress
we are not syncing with a real io device here.
While I don't think compiler is crazy/powerful
enough to reorder these, anyway, the bogus
barriers we currently have in code will confuse
anyone who tries to copy/reuse it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NO_NOTIFY is an optimization to reduce the number of exits,
but using it requires careful synchronization with host,
forcing read/write ordering for the CPU. Otherwise we
risk not kicking a host when it is waiting for more buffers,
resulting in a deadlock.
Let's just always kick, it's way simpler.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
It appears real machines sometimes have a flaky RTC, so avoid using
the RTC irq during boot. Instead, use a delay based on the standard
timer irq.
This also optimizes CONFIG_THREAD_OPTIONROMS users as it is no longer
necessary to use preemption - the wait_irq() call handles task
switching natively.
|
|
|
|
|
|
| |
Move the timer based counting code in serial.c to clock.c.
Rework the interface to make it similar to the tsc based timers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If wait_irq() is called from 32bit code, then jump to 16bit mode for
the wait.
Have wait_irq check for threads, and have it use yield if threads are
pending. This ensures threads aren't delayed if anything calls
wait_irq.
Use wait_irq() in 32bit mode during a failed boot.
|
|
|
|
| |
Display device/vendor ids in traditional format.
|
| |
|
|
|
|
|
| |
Eliminate process_atapi_op() code if CONFIG_ATA not set.
Use PCI_BASE_ADDRESS_IO_MASK instead of hardcoding it.
|
|
|
|
|
| |
Add check for CONFIG_VIRTIO_BLK in process_virtio_op.
Don't enable virtio when coreboot enabled.
|
|
|
|
|
|
| |
Split function to make it more readable.
Also, report all found virtio devices at debug level 1.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Check if blk_size is valid in virtio_blk config.
2. Disable interrupt otherwise interrupt may stuck
with some guests.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
ChangeLog:
v1->v2:
- Treat sector size not equal to 512 bytes as error.
|
|
|
|
|
|
|
|
|
| |
Allow irqs to be handled while waiting for virtio reads to complete.
Use native page aligned allocations instead of manually aligning the
data. This reduces the amount of low memory virtio requires.
Also, some minor white space cleanups.
|
|
|
|
|
|
|
|
| |
Gcc 3.4 doesn't like __FUNCTION__ for some reason - use __func__
instead.
Gcc 4.5 compiles each .c file independently, so make sure includes are
correct for each .c file.
|
|
|
|
|
|
| |
This patch adds native support for booting from virtio disks to Seabios.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
|
|
|
|
|
| |
Avoid counting the io hole as part of ram, a vm started with 4G
should report 4G in smbios, not 4.5G.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
|
| |
To enable the "boot" protocol wValue must be 0, not 1.
|
|
|
|
| |
Initial support for USB mice that follow the "boot" protocol.
|
|
|
|
|
|
| |
Route keyboard commands to a USB handler when USB keyboard is active.
Add a GETID handler for USB keyboards.
|
| |
|
|
|
|
|
|
|
| |
When optionrom threading is enabled, allow hardware init to run in
parallel with boot menu key press delay and with the smp detection.
Also, run qemu_cfg_port_probe() before ram_probe().
|
|
|
|
|
|
|
| |
Handle cases where objdump shows an call to an unknown address.
Also, simplify implemention of orderfuncs() - use funcion addreses
instead of function names as keys.
|
|
|
|
|
|
|
|
|
| |
Enhance tools/layoutrom.py to explicitly set those symbols that
resolve to a different code chunk (eg, 16, 32seg, 32flat). This
eliminates the need to link the code chunks multiple times.
This patch reduces the dependency on binutils behavior and makes the
build simpler to understand.
|
| |
|
| |
|
| |
|
|
|
|
| |
On an error path, desc and udrive_g may not be initialized.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable preemption during VGA mode switch call - this call can take
several milliseconds on real hardware.
Call yield() in finish_preempt() - when preemption is configured it
allows threads in wait_preempt() to run; when not configured it gives
an opportunity for threads to execute after the implicit delay from
optionrom execution.
Don't penalize priority in run_thread(). The run_thread() code would
implicitly yield because it created the new thread on the list after
the current thread and then jumped to it. When in a preemption event,
a yield effectively waits approximately one millisecond (to the next
rtc irq). The implicit yielding in run_thread thus limited the number
of threads one could launch during preemption to 1 per millisecond.
So, change the code so that the new thread is created prior to the
current thread - thus eliminating the effective yield from
run_thread().
|
|
|
|
|
|
| |
All four implementations of hubs (and root hubs) were very similar.
Replace them with a single implementation that uses callbacks for the
three custom parts (detect, reset, disconnect) of each type of hub.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a small delay even in non-power-switching mode to ensure device
detect completes.
Start companion controllers as soon as all port detects are complete -
don't wait for ehci device config to complete. This ensure critical
high/low speed devices (eg, usb keyboards) are initialized quickly.
Also, be sure to disable port on a failed reset.
|
|
|
|
|
|
| |
If the compiler can't restrict inlining by stack usage, then disable
inlining in 16bit mode. Otherwise, old compilers produce code that
uses too much stack space.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For indirect calls, place function address in a register and call it.
This is less optimal when gcc can inline the code and the destination
address is known at compile time. However, older gcc compilers don't
do as well with inlining, and they then mess up the code generation.
There doesn't seem to be a way to tell gcc how to emit the code
correctly for both immediate addresses and register addresses, so fall
back to a safe way.
Also, reduce params to stack_hop to avoid register assignment issues.
|
|
|
|
|
| |
Moving the ebda while an optionrom is running could confuse it. So,
avoid doing that.
|