aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-26Update version to 0.6.0.rel-0.6.0Kevin O'Connor1-1/+1
2010-03-20Improve USB EHCI timing.Kevin O'Connor1-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.
2010-03-20Disable inlining on old compilers.Kevin O'Connor2-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.
2010-03-20Force use of indirect function calls in inline assembler.Kevin O'Connor3-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.
2010-03-20Don't move EBDA while an optionrom is running (CONFIG_THREAD_OPTIONROMS).Kevin O'Connor4-6/+28
Moving the ebda while an optionrom is running could confuse it. So, avoid doing that.
2010-03-20Call to int1552 (from int1346) should set regs->dl.Kevin O'Connor1-0/+1
2010-03-20Adjust debug levels of device discovery.Kevin O'Connor4-4/+6
Be sure to print at debug level 1 all devices found.
2010-03-20Default CONFIG_COREBOOT_FLASH on; make depend on CONFIG_COREBOOT.Kevin O'Connor4-10/+10
Coreboot users will almost certainly want CBFS support, and non-coreboot users have no use for it. So, make that the default behaviour.
2010-03-15Restore segment limits in handle_1589 code.Kevin O'Connor1-0/+5
Before transitioning back to real mode, the segment registers should be reloaded so that the hidden register limits are updated.
2010-03-13Extend time for rtc to be ready.Kevin O'Connor1-7/+8
Increase the time waiting for rtc from 3ms to 15ms - only 3ms is needed on real hardware, but scheduling delays on qemu can make this longer. Extending the time prevents annoying debugging messages.
2010-03-13Backup and restore registers when calling out to user funcs.Kevin O'Connor2-7/+12
Make sure to fully backup and restore register state when calling out to other interrupts and functions. Some old DOS programs don't fully restore state. Also, make sure to enable irqs in call16_simpint().
2010-03-13Enable irqs in kbd/clock calls that caller might "spin" on.Kevin O'Connor2-0/+4
Some old programs will spin on a clock/keyboard call with irqs disabled. They assume the BIOS will enable irqs and allow key events and clock events to occur. So, enable irqs in those functions that a caller might "spin" on.
2010-03-13Process event on ps2 keyboard irq even if event already read.Kevin O'Connor1-19/+27
Some old DOS programs will hook the keyboard irq, read the keyboard data on irq, and then call the BIOS handler expecting it to continue process the event. So, the BIOS can't assume it is the first to read the data from the ps2 port. Also, reduce window where a ps2 command could conflict with incoming data. Disable all data during interrupt flushing, and only re-enable the desired port just prior to sending the command. Also, discard data from any interrupts if init hasn't completed.
2010-03-13Revert "Unify ps2 port data processing."Kevin O'Connor1-32/+26
This reverts commit 84f7b801ba8c0806fac568e59e85af281c0df207. It's not possible to unify ps2 port irq processing because old DOS apps could hook one or both of the kbd/mouse ps2 irqs.
2010-03-13Handle variable length return of ps2 port GETID command.Kevin O'Connor1-1/+24
Sometimes GETID returns two bytes, and sometimes one byte. Handle that properly. This fixes a failure with an msdos mouse driver.
2010-03-13Prevent ps2 irqs from messing up ps2 init.Kevin O'Connor1-0/+3
This is an alternate to 6f702dd6987b22e9bce472fe61910392af17416a. After disabling ps2 irqs, enable irqs to flush any queued irqs. This should prevent irqs from triggering in the middle of the init process.
2010-03-13Revert "Rework disabling of ps2 port irqs."Kevin O'Connor4-65/+68
This reverts commit 6f702dd6987b22e9bce472fe61910392af17416a. That patch introduced a regression by enabling mouse interrupts by default. It also appears that disabling interrupts by software alone will not work well with some old DOS programs that hook the keyboard irq.
2010-03-13Fix smp cpu detect on gcc 4.5.Kevin O'Connor1-1/+2
Bruce Rogers <brogers@novell.com> observed new compiler optimizing away memory assign in smp detect. Add barrier() to code to ensure gcc knows the SIPI can read/write memory.
2010-03-09Improvements to tools/checkstack.py.Kevin O'Connor1-34/+113
Add explicit tracking of functions that switch stacks. Add new tracking of "yield" points -- areas in the code that appear to hand control to third-party code which may use arbitrary stack space. Try to arrange the output so that functions that call each other are near each other.
2010-03-09Add USB EHCI controller support.Kevin O'Connor10-22/+1013
Initial support for EHCI high-speed USB controllers.
2010-03-09Some USB UHCI and OHCI fixes and cleanups.Kevin O'Connor3-27/+46
Don't send a data packet on OHCI if no data to be sent. Add some barrier() calls where needed. Move toggle definition from generic pipe struct to uhci pipe struct. Check for malloc failure on ohci and uhci "tds" request. Be sure to always allocate an even number of intr tds on uhci - toggle setting depends on it.
2010-03-09Minor - USB OHCI interrupt queue should be one larger.Kevin O'Connor1-1/+1
One of the entries in the queue can't be used, so the total queue size needs to be one larger than it currently is.
2010-03-09Reduce size of USB 'struct uhci_td'.Kevin O'Connor2-10/+8
Reduce the size to make arrays of tds smaller. For interrupt in pipes, allocate the data space separately.
2010-03-09Dynamically allocate USB controller structures.Kevin O'Connor6-185/+199
Have each controller type allocate its own data structure. Also, implement freeing of unused uhci controller structures.
2010-03-09Replace USB encoded 'u32 endp' scheme with explicit struct fields.Kevin O'Connor9-183/+151
Expand 'struct usb_pipe' with all the fields that are needed from the encoded 'u32 endp' field.
2010-03-09Further parallelize USB init by launching a thread per usb port.Kevin O'Connor6-221/+350
Run a thread per usb port in addition to the existing thread per usb controller. This can reduce total boot time by allowing multiple USB devices on the same controller to initialize in parallel. It also makes startup time for critical devices (eg, the keyboard) less dependent on which port they are plugged into.
2010-02-28Introduce simple "mutex" locking code.Kevin O'Connor2-0/+23
Locks are not normally necessary because SeaBIOS uses a cooperative multitasking system. However, occasionally it is necessary to be able to lock a resource across yield calls. This patch introduces a simple mechanism for doing that.
2010-02-28Only compile usb-hub.c and paravirt.c with 32bit code.Kevin O'Connor1-2/+2
Those files are only used by 32bit code, so don't bother including them with the 16bit code.
2010-02-28Prefer passing a USB "pipe" structure over a USB endp encoding.Kevin O'Connor13-175/+429
Instead of passing the "u32 endp" encoding of the usb endpoint, allocate a "struct usb_pipe" for each end point and pass that. Allocate a control pipe for every device found. Support freeing the pipes after they are done. Implement pipe allocation and freeing for both UHCI and OHCI controllers. Also, don't define every UHCI qh to include a pipe - create a separate structure "struct uhci_pipe". Also, be sure to clear the USBControllers on reset. Also, convert usb_hub_init to return 0 on success. Also, cleanup some of the USB debug messages to make them more consistent.
2010-02-28Add a generic "internal error" warning function.Kevin O'Connor2-0/+11
2010-02-28Dynamically allocate ata_channel info; introduce custom atadrive_s struct.Kevin O'Connor8-177/+187
Don't limit the number of ATA controllers supported - just dynamically allocate the structs. Create an atadrive_s struct that extends the standard 'struct drive_s' and have the new struct store a pointer to the ata channel info. Also, prefer storing drive_s pointers as 32bit "flat" pointers - adjust them as needed in the 16bit code.
2010-02-21Cleanup - build drive description in temp memory during init.Kevin O'Connor10-134/+71
Remove describe_drive() mechanism for calling printf with a drive description. Instead, have each drive build a description in temporary ram during drive initialization. Also, remove fields now unneeded from 'struct disk_s' - model and cntl_info.
2010-02-21Seabios e820 reservation portion v3Jes Sorensen3-1/+38
On 02/16/10 01:43, Kevin O'Connor wrote: > On Mon, Feb 15, 2010 at 06:33:59PM +0100, Jes Sorensen wrote: >> Hi, >> >> This is the Seabios part to match my e820 reservation via fw_cfg patch. > > This still has 'struct e820_entry' which is too similar to 'struct > e820entry' in memmap.h. Otherwise, it looks good to me. Hmmm didn't catch that one earlier, thanks for pointing it out. I have renamed it to struct e820_reservation to make it different. Hope this version does the trick then. Cheers, Jes Read optional table of e820 entries from qemu_cfg Read optional table of e820 entries through qemu_cfg, allowing QEMU to provide the location of KVM's switch area etc. rather than rely on hard coded values. For now, fall back to the old hard coded values for the TSS and EPT switch page for compatibility reasons. Compatibility code could possibly be removed in the future. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
2010-02-17Initial support for booting from USB drives.Kevin O'Connor12-4/+479
This patch adds initial support for USB Mass Storage Controllers. This includes support for bulk transfers on UHCI controllers. Code to detect a USB MSC device is added, and wrappers for sending "cdb" block commands over USB are added. The scsi "inquiry" command is also added.
2010-02-17Introduce helper functions for finding USB end-points.Kevin O'Connor3-18/+57
Introduce findEndPointDesc() and mkendpFromDesc() and refactor usb-hid code.
2010-02-17USB UHCI cleanups.Kevin O'Connor2-8/+24
Add barrier() calls before memory accesses that can be seen by controller. Fix TD_CTRL_ANY_ERROR macro definition. Other cleanups.
2010-02-17Minor - arrange struct drive_s to clarify field roles.Kevin O'Connor1-11/+12
2010-02-17Fix off by one error in strtcpy.Kevin O'Connor1-1/+1
The strtcpy function could overrun its output buffer.
2010-02-17Don't require a valid physical cylinders/heads/spt for logical mapping.Kevin O'Connor1-7/+10
Modern drives don't provide a "physical" chs report - try to detect that and force an LBA mapping in that case. Also, don't require setup_translation be called only on ATA drives.
2010-02-17Move common "command data block" functions to new file blockcmd.c.Kevin O'Connor5-67/+83
Move common "cdb" request functions to a new file.
2010-02-15Dynamically allocate each drive_g with malloc_fseg().Kevin O'Connor8-57/+43
This eliminates the limit on the number of available drives. It also allows for each driver to allocate additional custom fields.
2010-02-15Add *.pyc to .gitignore.Kevin O'Connor1-0/+1
2010-02-15Add common "block command" definitions and update cdrom code.Kevin O'Connor4-65/+107
Introduce standard definitions and names for the "command data block" commands used in the cdrom code.
2010-02-15Optimize ntohl() code.Kevin O'Connor1-7/+15
Use the assembler bswapl instruction if the value is not constant.
2010-02-15Minor - sort ATA CMD definitions.Kevin O'Connor1-48/+48
2010-02-15Initial support for USB hubs.Kevin O'Connor5-5/+208
Add support for detecting, initializing, and enumerating USB hubs.
2010-02-14Minor - increase debug level of some USB debug statements.Kevin O'Connor2-2/+2
2010-02-14Don't leave USB UHCI ports disabled for extended time during reset.Kevin O'Connor1-3/+9
Disabling the port will cause device to go into suspend - so don't do that during the reset sequence.
2010-02-14Don't parallelize USB OHCI root port reset.Kevin O'Connor1-21/+32
If multiple ports are reset simultaneously, they could both respond to the default address. So, only reset one at a time.
2010-02-14Introduce standard warnings for allocation failures and timeouts.Kevin O'Connor17-75/+91
There is no need for custom warnings for many common failures. Introduce a common warning which is consistent and more visible.