aboutsummaryrefslogtreecommitdiff
path: root/src/block.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-04parisc/scsi: Add maximum transfer size per SCSI controllerHelge Deller1-0/+1
LSI controller allows up to 4MB transactions per call, the ESP controller only up to 64k per call. Values for other drivers need to be added too. Signed-off-by: Helge Deller <deller@gmx.de>
2021-09-24scsi: Add fields for specifying target and lun of SCSI devicesHelge Deller1-0/+2
On PA-RISC it's possible to boot from various SCSI targets and LUNs. Add fields to the drive_s struct to be able to store those. Signed-off-by: Helge Deller <deller@gmx.de>
2019-11-18geometry: Apply LCHS values for boot devicesSam Eiderman1-0/+1
Boot devices which use overriden LCHS values are: * ata * ahci * scsi * esp * lsi * megasas * mpt * pvscsi * virtio * virtio-blk We use these values in get_translation() and setup_translation() by introducing a new translation type: "TRANSLATION_HOST". We treat this translation as TRANSLATION_NONE in fill_ata_edd(), although this does not really matter since now the translation between physical and logical geometry does not exist. Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com> Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com> Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com> Message-Id: <20190626123816.8907-6-shmuel.eiderman@oracle.com>
2019-11-18Revert "geometry: Apply LCHS values for boot devices"Gerd Hoffmann1-1/+0
This reverts commit 9caa19be0e534c687081fbdfcd301406e728c98c.
2019-11-06geometry: Apply LCHS values for boot devicesSam Eiderman1-0/+1
Boot devices which use overriden LCHS values are: * ata * ahci * scsi * esp * lsi * megasas * mpt * pvscsi * virtio * virtio-blk We use these values in get_translation() and setup_translation() by introducing a new translation type: "TRANSLATION_MACHINE". We treat this translation as TRANSLATION_NONE in fill_ata_edd(), although this does not really matter since now the translation between physical and logical geometry does not exist. Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com> Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com> Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com> Message-Id: <20190612093704.47175-6-shmuel.eiderman@oracle.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-09-27block: Rename disk_op_s->drive_gf to drive_flKevin O'Connor1-2/+2
Now that the drive_s struct does not need to be in the f-segment, rename references to drive_gf in the generic drive code to drive_fl. This is just variable renames - no code changes. Tested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-02-20block: add NVMe boot supportJulian Stecklina1-0/+1
This patch enables SeaBIOS to boot from NVMe. Finding namespaces and basic I/O works. Testing has been done in qemu and so far it works with Grub, syslinux, and the FreeBSD loader. You need a recent Qemu (>= 2.7.0), because older versions have buggy NVMe support. The NVMe code is currently only enabled on Qemu due to lack of testing on real hardware. Signed-off-by: Julian Stecklina <jsteckli@amazon.de>
2016-03-31block: Move send_disk_op() from block.c to disk.cKevin O'Connor1-1/+0
The send_disk_op() function is only called from the 16bit handlers found in disk.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-03-29Support for booting from LSI Logic LSI53C1030, SAS1068, SAS1068eDon Slutz1-0/+1
Also known as Fusion MPT disk; this controller model is supported by VirtualBox and VMware, and QEMU support patches have been posted. Signed-off-by: Don Slutz <Don.Slutz@Gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-02-04block: Move drive setup to new function block_setup()Kevin O'Connor1-0/+1
Move the list of drive setup calls from post.c to a new function in block.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-17edd: Pass the segment/offset from int 1348 calls using a 'struct segoff_s'Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-07-14block: Route scsi style commands through 'struct disk_op_s'Kevin O'Connor1-2/+11
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'Connor1-0/+1
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>
2014-12-29sdcard: Initial support for SD cards on PCI SDHCI controllers on QEMUKevin O'Connor1-0/+1
This adds basic read/write support for SD cards emulated by QEMU. This code is not expected to work on real hardware, because the current controller and card initialization is not robust. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-06-04Move cdemu call interface and disk_ret helper code to disk.c.Kevin O'Connor1-10/+0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-06-04cdemu: store internal cdemu fields in standard "el-torito" spec format.Kevin O'Connor1-15/+0
Store the fields necessary to export the "el-torito" spec information directly in an internal copy of the "el-torito" struct. This simplifies the interface and obviates the need for an internal home grown struct with the same info. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-06-04edd: Move EDD get drive parameters (int 1348) logic from disk.c to block.c.Kevin O'Connor1-1/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-01-29xhci: Run the XHCI driver entirely in 32bit mode.Kevin O'Connor1-1/+3
Since the XHCI driver needs to jump into 32bit mode anyway, it is simpler to just run all of the code in 32bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-01-29Add space between DTYPE_* definitions.Kevin O'Connor1-15/+15
Avoid consective numbering on the DTYPE_* definitions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-10-26Convert op->drive_g from a 16bit pointer to a 32 bit "GLOBALFLAT" pointer.Kevin O'Connor1-5/+5
The "drive" structure is always malloc'ed and therefore always starts off described as a 32-bit "flat" pointer. Instead of switching to/from 16bit pointers, make all the code use the 32bit pointer. This eliminates the confusing 16/32 bit pointer switches. This patch also removes the "_g" suffixes on local variables in functions that are always called in 32bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-10-26Add pvscsi boot supportEvgeny Budilovsky1-0/+1
Testing was done on windows images (win 2008/2012) taken from esx with vmware tools installed and boot disk configured to use pvscsi. Also I've used linux (ubuntu 12.04) where pvscsi drivers are installed by default and booted it using qemu cmd similar to this: ./x86_64-softmmu/qemu-system-x86_64 -snapshot -device pvscsi,id=pvscsi0 \ -device scsi-disk,bus=pvscsi0.0,drive=drive0 \ -drive id=drive0,if=none,file=ubuntu-12.04.qcow2 \ -bios roms/seabios/out/bios.bin Signed-off-by: Evgeny Budilovsky <evgeny.budilovsky@ravellosystems.com>
2013-10-14Rename fields of 'struct chs_s' and use in floppy lba2chs().Kevin O'Connor1-3/+3
Rename the fields of 'struct chs_s' so that it can be used both to describe a drive and to describe a particular sector on a drive. Update floppy.c:lba2chs() to return a 'struct chs_s' instead of passing the results via pointers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Split disk.h into block.h and std/disk.h.Kevin O'Connor1-0/+129
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>