aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-08-04sdcard: Add proper delays during card power upKevin O'Connor1-0/+6
Add card power up timing delays as specified by the sd card "Physical Layer Simplified Specification Version 4.10". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-04sdcard: Improve SD card initialization command sequenceKevin O'Connor1-4/+40
Send the initialization commands that are specified for SD cards by the "SD Host Controller Simplified Specification Version 2.00" spec. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-04sdcard: Set timeout control register during init (to max allowed timeout)Kevin O'Connor1-0/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-04sdcard: Make sure controller support 3.3V before enabling itKevin O'Connor1-1/+11
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-04sdcard: Implement controller frequency setting according to sdhci specKevin O'Connor1-2/+42
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-04sdcard: Check if card is present before sending commands to cardKevin O'Connor1-2/+7
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-30smm: ignore bits 16,18-31 of SMM revision ID at runtime tooKevin O'Connor1-3/+3
Check only the relevant bits of the SMM revision ID for both the init check and during runtime checks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-30smm: fix outl argument orderPaolo Bonzini1-1/+1
The value is the first argument and the port is the second, but the code was using the opposite order. Reported-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-07-24Minor - move declaration of CDRom_locks to code that uses itKevin O'Connor3-4/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-23ramdisk: Allow ramdisk support (CONFIG_FLASH_FLOPPY) under QEMUKevin O'Connor2-7/+8
Don't require coreboot to use CONFIG_FLASH_FLOPPY - with the latest QEMU, it's possible to place a floppy image into fw_cfg using the qemu command line (eg, "-fw_cfg name=floppyimg/MyFloppy,file=file.img"). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-23timer: Add CONFIG_TSC_TIMER build option to disable the CPU TSC timerKevin O'Connor2-17/+16
Allow users to remove the CPU timestamp counter support at compile time. The PMTIMER is frequently used instead of the TSC and this compile time option allows one to strip a few bytes from the final binary. This change also defaults the internal timer to use the PIT based timer until the PMTIMER or TSC is detected. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-22timer: Delay timestamp counter init until after pmtimer is probedKevin O'Connor1-2/+4
Delay call to timer_setup() until after the xxx_platform_setup() calls so that the pmtimer can be detected first. Most modern machines will have a pmtimer and calibrating the timestamp counter is frequently unnecessary. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-22ps2: Don't wait 100ms to discard possible extra reset receive byteKevin O'Connor2-8/+9
The existing PS2 port code waits 100ms to see if the device attached to the keyboard port responds to a reset command with two bytes (instead of the normal one byte). If an extra byte is received, it is discarded. Receiving two bytes would be unusual and waiting to check for that event is unnecessary because the next command in the keyboard init sequence already seamlessly discards any extra bytes in the command queue. This patch eliminates the 100ms wait, which notably reduces the SeaBIOS boot time on QEMU. This patch also forces PS2 mice to always respond with two bytes during a reset sequence (instead of just one byte), which is a good sanity check. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14Don't enable interrupts prior to IVT and PIC setupKevin O'Connor4-7/+11
The machine may crash if an interrupt occurs prior to the setup of the interrupt vector table (IVT) and programmable interrupt controller (PIC). This patch makes sure that interrupts remain disabled until these components are setup. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14ata: Make sure "chanid" is relative to PCI device for bootorder fileKevin O'Connor3-16/+16
When specifying drives in the bootorder file, the "drive@x" parameter should be relative to the given PCI device and not relative to the total number of ATA controllers in the machine. This patch separates the tracking of "chanid" (channel number relative to a given PCI devices) from the "ataid" (channel number relative to the total number of ATA channels). Reported-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14ps2: Support mode for polling the PS2 port instead of using irqsKevin O'Connor3-8/+41
Some recent hardware has trouble with routing PS2 port interrupts while the interrupt controller is in legacy routing mode. This patch adds a config mechanism (via "etc/ps2-poll-only") to force the PS2 code into a polling only mode so that interrupts are not required. It is not recommended to use this polling mode on hardware that does properly support PS2 irqs, because some very old (DOS-era) programs depend on the BIOS PS2 irq behavior. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14coreboot: Try to auto-detect if the CBFS anchor pointer is a relative pointerKevin O'Connor1-0/+3
If CONFIG_CBFS_LOCATION is set to a non-zero value then it means the CBFS flash is not at the very end of memory. In this case, it's unclear if the anchor pointer is an absolute pointer or if it is relative to CONFIG_CBFS_LOCATION. Some devices have been using absolute pointers, but it appears some devices are now using relative pointers there. Since the anchor pointer almost always points to a structure in the last 64K of the rom, it should be possible to auto-detect if the pointer is relative or not. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14block: Rename process_XXX_op() functions to XXX_process_op()Kevin O'Connor12-22/+21
Rename disk driver dispatch functions to a consistent naming style. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14blockcmd: Convert cdb_is_read() to scsi_is_read()Kevin O'Connor7-14/+14
Convert the cdb_is_read() function to a new function scsi_is_read() which takes a 'struct disk_op_s' as a paramter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14blockcmd: Remove unused scsi_process_op() and cdb_cmd_data()Kevin O'Connor2-22/+0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14pvscsi: Handle pvscsi drives directly via 'struct disk_op_s' requestsKevin O'Connor4-25/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14pvscsi: Move pvscsi_fill_req() code into pvscsi_cmd()Kevin O'Connor1-24/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14virtio-scsi: Handle virtio drives directly via 'struct disk_op_s' requestsKevin O'Connor4-27/+18
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14megasas: Handle Megasas drives directly via 'struct disk_op_s' requestsKevin O'Connor4-10/+10
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14esp-scsi: Handle ESP drives directly via 'struct disk_op_s' requestsKevin O'Connor4-22/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14lsi-scsi: Handle LSI drives directly via 'struct disk_op_s' requestsKevin O'Connor4-22/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14usb-uas: Handle USB drives directly via 'struct disk_op_s' requestsKevin O'Connor4-9/+8
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14usb-msc: Handle USB drives directly via 'struct disk_op_s' requestsKevin O'Connor4-13/+12
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14ahci: Handle AHCI ATAPI drives directly via 'struct disk_op_s' requestsKevin O'Connor4-26/+9
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14ata: Handle ATA ATAPI drives directly via 'struct disk_op_s' requestsKevin O'Connor4-6/+10
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14blockcmd: Introduce scsi_fill_cmd()Kevin O'Connor2-30/+24
Introduce scsi_fill_cmd() which creates a scsi style "command data block" from a "struct disk_op_s" disk request. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14block: Route scsi style commands through 'struct disk_op_s'Kevin O'Connor3-10/+36
Support sending scsi style "command data block" commands (cdbcmd) through the 'struct disk_op_s' command request structure. And change the blockcmd.c and cdrom.c code to route these commands through the process_op() code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14block: Introduce default_process_op() with common command handling codesKevin O'Connor9-45/+25
Most disk drivers only implement a couple of the available bios commands. Unify the common fallback handling code into a new function default_process_op() to reduce boiler-plate code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14block: Split process_op() command dispatch up into multiple functionsKevin O'Connor5-60/+73
Introduce process_op_32(), process_op_16(), and process_op_both() and split the disk driver command dispatch by its runtime mode requirements. This makes it more clear which modes each driver runs in. It also reduces the call32() boiler-plate code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14ich9: initialise RCBA register through LPC interfacePaulo Alcantara2-0/+8
This patch initialises root complex register block BAR in order to support TCO watchdog emulation features on QEMU. Cc: Kevin O'Connor <kevin@koconnor.net> Cc: Gerd Hofmann <kraxel@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-04Make sure all code checks for malloc failuresKevin O'Connor6-5/+25
This is the result of an audit of callers of the malloc_XXX() and memalign_XXX() calls. All callers need to check if these functions return NULL. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-04bootorder: Update "extra pci root" buses bootorder format to match qemuKevin O'Connor1-2/+2
The QEMU code will use the prefix "/pci@i0cf8,%x/" for devices on extra pci root buses, so change the SeaBIOS code to match that. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-01virtio-pci: use high memory for ringsGerd Hoffmann1-1/+1
That way we should be able to manage *alot* more devices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio-ring: 32bit cleanupGerd Hoffmann1-31/+30
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio-scsi: 32bit cleanupGerd Hoffmann1-6/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio-blk: 32bit cleanupGerd Hoffmann1-4/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: legacy cleanupGerd Hoffmann2-33/+1
Now that all code is switched over to use vp_read/write we can drop the ioaddr field from vp_device and the offset #defines. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: also probe version 1.0 pci idsGerd Hoffmann3-6/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: use version 1.0 if available (flip the big switch)Gerd Hoffmann1-7/+10
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio-blk: fix initialization for version 1.0Gerd Hoffmann2-28/+75
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio-scsi: fix initialization for version 1.0Gerd Hoffmann1-2/+23
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: add version 1.0 support to vp_find_vqGerd Hoffmann1-15/+43
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: remove unused vp_del_vqGerd Hoffmann1-11/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: add version 1.0 support to vp_notifyGerd Hoffmann4-7/+25
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-07-01virtio: add version 1.0 support to vp_resetGerd Hoffmann2-8/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>