Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a mechanism (VARLOW declaration) to make a variable reside in the
low memory (e-segment) area. This is useful for runtime variables
that need to be accessed from 16bit code and need to be modifiable
during runtime.
Move the 16bit "extra stack" from the EBDA to the low memory area
using this declaration mechanism. Also increase the size of this
stack from 512 bytes to 2048 bytes.
This also reworks tools/layoutrom.py a bit.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The ATAPI driver does not need to support writes, but it does needs to
avoid the PIO transfer and DRQ check when TEST UNIT READY is sent.
Since TEST UNIT READY has no payload, checking for not busy is enough.
This fixes a timeout when booting from CD/DVD, which fellaw@gmx.net
reported to cause boot failures.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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.
|
|
|
|
|
|
|
|
To start, register the AMD ATA controller on the A50M chipset as
compatible with ATA mode even if it comes up in AHCI mode.
|
|
|
|
Introduce function nullTrailingSpace() that nulls blank characters
from the end of a string. Use this function in the ATA, USB MSC, and
bootorder code.
|
|
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.
|
|
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.
|
|
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>
|
|
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.
|
|
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>
|
|
|
|
- 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>
|
|
|
|
Eliminate process_atapi_op() code if CONFIG_ATA not set.
Use PCI_BASE_ADDRESS_IO_MASK instead of hardcoding it.
|
|
|
|
Be sure to print at debug level 1 all devices found.
|
|
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.
|
|
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.
|
|
There is no need for custom warnings for many common failures.
Introduce a common warning which is consistent and more visible.
|
|
The function pointer passed to run_thread() can confuse the compiler
into thinking the function needs to be emitted. Add ASSERT32FLAT() to
help the compiler eliminate this code.
|
|
Allow compile option to disable ATA DMA support.
Turn it off by default for now - some coreboot users are seeing issues
with it.
|
|
Omitting "void" leads to a K&R style declaration which was not intended.
|
|
Add support for detecting and using SFF 8038 compatible PCI devices.
Currently, only ATA transfers (not ATAPI) will use DMA.
|
|
Check explicitly for an extended read/write command instead of 0x04
bit set. The identify command has that bit set, but doesn't need
the 48bit lba registers set.
|
|
The ctrl register is iorange + 2 not iorange + 6.
Rework port definitions to be based on PCI offsets instead of ISA.
Also, properly define ATA irqs when in PCI compatibility mode.
|
|
Add probing for ISA ATA devices when no pci devices found.
Also, add defines for common ATA ports.
Also, make sure irq and pci_bdf are defined for both pci ata controllers.
|
|
If the ata command fails, be sure to reenable errors.
This fixes a report of MS Vista not seeing a cdrom drive.
|
|
Enable system for running hardware initialization in parallel.
The yield() call can now round-robin between "threads".
Rework ata controller init to use a thread per controller.
Make sure internal drives are registered in a defined order.
Run keyboard initialization in a thread.
Rework usb init to use a thread per controller.
|
|
Add new function yield() which will permit irqs to trigger.
The yield() call enables irqs to occur in 32bit mode.
Add [num]sleep calls that yield instead of just spinning.
Rename existing int 1586 usleep call to biosusleep.
Convert many calls to mdelay to msleep.
|
|
Handle case where timetamp counter overflows while waiting.
|
|
Pass a pointer to the drive_s struct instead of a driveid array offset.
Don't allocate ata drive's until a real drive found.
Introduce getDrive() and allocDrive() functions.
|
|
Add a new backend driver for cd emulation (DTYPE_CDEMU). This backend
driver now does the work of scheduling mis-sized reads.
Add mechanism for obtaining emulated drive geometry.
Extend disk_1308() to support cdrom emulation.
Use regular disk_13*() calls even for cdemu.
Also, unify the X_SECTOR_SIZE definitions.
|
|
Allow each drive type to describe itself on the boot menu.
This fixes a bug where driveid was used in place of ataid in the boot
menu.
Also, expand descriptions for each drive type.
Don't overload the IPL type for BCVs - instead introduce new types.
|
|
Sometimes VAR16_32 is used to export a definition to assembler, so
clarify its naming.
|
|
|
|
Implement low-level floppy commands using the disk_op structure.
The requests can then be filled using the regular disk_13xx functions.
|
|
|
|
The Drives.drives list now contains floppies, harddrives, and cdroms.
Add mapping table for external/internal drive ids for floppies.
Rename CONFIG_FLOPPY_SUPPORT to CONFIG_FLOPPY (for consistency).
Be consistent with "driveid" and "floppyid" variable names.
Replace switch statements of drive parameters into a global array.
There are some externally visible changes with this patch:
- Some calls will now return EPARAM instead of ETIMEOUT (or ECHANGED)
- floppy_1301/1308 are now only available when regs->dl is valid
- floppy_1308/1315 return EPARAM on invalid drives
|
|
Move generic code from ata.c to new file block.c.
Rename atabits.h to ata.h and move ata header definitions from disk.h.
Rename ATA.channels to ATA_channels.
Rename ATA structure to Drives.
Support both CONFIG_DRIVES and CONFIG_ATA options.
|
|
|