| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Be sure to print at debug level 1 all devices found.
|
|
|
|
|
|
| |
Coreboot users will almost certainly want CBFS support, and
non-coreboot users have no use for it. So, make that the default
behaviour.
|
|
|
|
|
| |
Before transitioning back to real mode, the segment registers should
be reloaded so that the hidden register limits are updated.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Sometimes GETID returns two bytes, and sometimes one byte. Handle
that properly.
This fixes a failure with an msdos mouse driver.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Initial support for EHCI high-speed USB controllers.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Reduce the size to make arrays of tds smaller. For interrupt in
pipes, allocate the data space separately.
|
|
|
|
|
|
| |
Have each controller type allocate its own data structure.
Also, implement freeing of unused uhci controller structures.
|
|
|
|
|
| |
Expand 'struct usb_pipe' with all the fields that are needed from the
encoded 'u32 endp' field.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Those files are only used by 32bit code, so don't bother including
them with the 16bit code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Introduce findEndPointDesc() and mkendpFromDesc() and refactor usb-hid
code.
|
|
|
|
|
|
| |
Add barrier() calls before memory accesses that can be seen by controller.
Fix TD_CTRL_ANY_ERROR macro definition.
Other cleanups.
|
| |
|
|
|
|
| |
The strtcpy function could overrun its output buffer.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Move common "cdb" request functions to a new file.
|
|
|
|
|
| |
This eliminates the limit on the number of available drives. It also
allows for each driver to allocate additional custom fields.
|
| |
|
|
|
|
|
| |
Introduce standard definitions and names for the "command data block"
commands used in the cdrom code.
|
|
|
|
| |
Use the assembler bswapl instruction if the value is not constant.
|
| |
|
|
|
|
| |
Add support for detecting, initializing, and enumerating USB hubs.
|
| |
|
|
|
|
|
| |
Disabling the port will cause device to go into suspend - so don't do
that during the reset sequence.
|
|
|
|
|
| |
If multiple ports are reset simultaneously, they could both respond to
the default address. So, only reset one at a time.
|
|
|
|
|
| |
There is no need for custom warnings for many common failures.
Introduce a common warning which is consistent and more visible.
|