aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* seabios: pciinit: make pci memory space assignment 64bit aware.Isaku Yamahata2010-07-041-2/+17
| | | | | | | | | | | 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>
* seabios: pciinit: factor out pci bar region allocation logic.Isaku Yamahata2010-07-041-37/+47
| | | | | | factor out pci bar region allocation logic. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* seabios: pci: introduce foreachpci_in_bus() helper macro.Isaku Yamahata2010-07-041-0/+10
| | | | | | | | | 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>
* Add romfile_size() wrapper for accessing cbfs/qemu_cfg files.Kevin O'Connor2010-07-042-2/+15
|
* Initial bootsplash support.Kevin O'Connor2010-06-289-14/+1335
| | | | | | Support displaying a jpeg file (stored in cbfs) during bootup. Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
* Update TODOKevin O'Connor2010-06-191-5/+0
| | | | Remove already completed items.
* Fix bvprintf() to respect padding for hex printing.Kevin O'Connor2010-06-191-15/+23
| | | | | | | | 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>
* Unify optionrom cbfs/qemu_cfg rom pulling code.Kevin O'Connor2010-06-135-68/+64
| | | | | | | | 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.
* SeaBIOS VGA hooksStefan Reinauer2010-06-101-10/+134
| | | | | | | | | 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>
* SeaBIOS CD/DVD abbreviationsStefan Reinauer2010-06-102-4/+4
| | | | | | | - 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>
* seabios: remove iasl output file when error.Isaku Yamahata2010-06-101-4/+6
| | | | | | | | | | 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>
* Allocate cdemu buffer in low mem instead of ebda.Kevin O'Connor2010-06-063-18/+19
| | | | | | | 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.
* Introduce memcpy_fl - a memcpy on "flat" pointers.Kevin O'Connor2010-06-063-15/+17
|
* Rework malloc to use a "first fit" algorithm.Kevin O'Connor2010-06-063-235/+313
| | | | | | | | | | | | | | | | | 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).
* Minor mptable changes.Kevin O'Connor2010-06-061-8/+6
| | | | | | Simplify entrycount tracking. Allow mptable generation to work even if there is no high mem available.
* virtio: clean up memory barrier usageMichael S. Tsirkin2010-05-262-9/+9
| | | | | | | | | | | | | | | | | | 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>
* virtio: remove NO_NOTIFY optimizationMichael S. Tsirkin2010-05-261-3/+1
| | | | | | | | | | | | | 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>
* Don't use RTC to time boot menu delay.Kevin O'Connor2010-05-233-23/+7
| | | | | | | | | | 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.
* Generalize timer based delay code.Kevin O'Connor2010-05-233-32/+34
| | | | | | Move the timer based counting code in serial.c to clock.c. Rework the interface to make it similar to the tsc based timers.
* Rename check_time() to check_tsc().Kevin O'Connor2010-05-239-24/+24
|
* Allow wait_irq to be called in 32bit code.Kevin O'Connor2010-05-235-51/+79
| | | | | | | | | | | 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.
* Improve optionrom debugging statements.Kevin O'Connor2010-05-232-5/+17
| | | | Display device/vendor ids in traditional format.
* Minor - compile out usb-msc code if CONFIG_USB_MSC not set.Kevin O'Connor2010-05-231-0/+2
|
* Minor ata cleanups.Kevin O'Connor2010-05-231-4/+10
| | | | | Eliminate process_atapi_op() code if CONFIG_ATA not set. Use PCI_BASE_ADDRESS_IO_MASK instead of hardcoding it.
* Make sure virtio-blk is fully compiled out if not wanted.Kevin O'Connor2010-05-231-1/+3
| | | | | Add check for CONFIG_VIRTIO_BLK in process_virtio_op. Don't enable virtio when coreboot enabled.
* Minor - split up virtio_blk_setup().Kevin O'Connor2010-05-201-69/+74
| | | | | | Split function to make it more readable. Also, report all found virtio devices at debug level 1.
* fix two issues with virtio-blkGleb Natapov2010-05-173-3/+18
| | | | | | | | | | | | 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.
* Minor improvements to virtio (allow irqs, allocate page aligned).Kevin O'Connor2010-05-162-6/+5
| | | | | | | | | 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.
* Fix virtio compile errors on various gcc versions.Kevin O'Connor2010-05-107-2/+18
| | | | | | | | 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.
* Support for booting from virtio disksGleb Natapov2010-05-1012-1/+653
| | | | | | This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapov <gleb@redhat.com>
* smbios: avoid counting io hole as ramAlex Williamson2010-05-101-25/+43
| | | | | | | 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>
* Fix error causing USB HID "boot" protocol to not be enabled.Kevin O'Connor2010-05-011-2/+2
| | | | To enable the "boot" protocol wValue must be 0, not 1.
* Add support for USB mice.Kevin O'Connor2010-05-016-30/+185
| | | | Initial support for USB mice that follow the "boot" protocol.
* When USB keyboard active, don't send keyboard commands to ps2 port.Kevin O'Connor2010-05-016-30/+72
| | | | | | Route keyboard commands to a USB handler when USB keyboard is active. Add a GETID handler for USB keyboards.
* Document usb-hid.c functions.Kevin O'Connor2010-05-011-0/+10
|
* Further parallelize init when using CONFIG_THREAD_OPTIONROMS.Kevin O'Connor2010-05-014-30/+50
| | | | | | | 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 unknown function addresses in tools/checkstack.py.Kevin O'Connor2010-05-011-17/+16
| | | | | | | 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.
* Simplify build by manually resolving external symbols in layoutrom.py.Kevin O'Connor2010-05-017-291/+241
| | | | | | | | | 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.
* USB EHCI should yield() whil waiting for controller to ack reset.Kevin O'Connor2010-04-171-0/+1
|
* Add __attribute__((__malloc__)) declaration to internal malloc funcs.Kevin O'Connor2010-04-172-2/+3
|
* Minor - remove redundant check from ata_try_dma.Kevin O'Connor2010-04-171-2/+0
|
* Fix possible unitialized variable issue in usb msc.Kevin O'Connor2010-04-081-14/+12
| | | | On an error path, desc and udrive_g may not be initialized.
* Some improvements to optionrom preemption support.Kevin O'Connor2010-04-022-7/+16
| | | | | | | | | | | | | | | | | | | | 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().
* Refactor USB hub code.Kevin O'Connor2010-03-287-209/+253
| | | | | | 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.
* Prep version for next release.Kevin O'Connor2010-03-281-1/+1
|
* Update version to 0.6.0.rel-0.6.0Kevin O'Connor2010-03-261-1/+1
|
* Improve USB EHCI timing.Kevin O'Connor2010-03-201-7/+17
| | | | | | | | | | | 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.
* Disable inlining on old compilers.Kevin O'Connor2010-03-202-1/+2
| | | | | | 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.
* Force use of indirect function calls in inline assembler.Kevin O'Connor2010-03-203-9/+8
| | | | | | | | | | | | 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.
* Don't move EBDA while an optionrom is running (CONFIG_THREAD_OPTIONROMS).Kevin O'Connor2010-03-204-6/+28
| | | | | Moving the ebda while an optionrom is running could confuse it. So, avoid doing that.