diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-03-09 07:43:50 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-05-15 13:36:08 +0200 |
commit | f82e82a5ab2366e1f4299e53ec95584f39d57dc8 (patch) | |
tree | 1515fa68510673410814c2b637bd3ad90844c18a /src/boot.c | |
parent | 040b92c6159773c36876f17f3fb02816ca9f6701 (diff) | |
download | seabios-f82e82a5ab2366e1f4299e53ec95584f39d57dc8.tar.gz |
virtio-mmio: add support for scsi devices.
Add new fields to struct virtio_lun_s for mmio support,
add mmio parameter to virtio_scsi_init_lun(), so both
pci and mmio devices can be handled.
Add and use bootprio_find_scsi_mmio_device() to figure
boot priority of devices connected to a virtio-mmio
scsi controller.
Finally add init_virtio_scsi_mmio() to initialize one
virtio-mmio scsi controller.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'src/boot.c')
-rw-r--r-- | src/boot.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -328,6 +328,16 @@ int bootprio_find_scsi_device(struct pci_device *pci, int target, int lun) return find_prio(desc); } +int bootprio_find_scsi_mmio_device(void *mmio, int target, int lun) +{ + if (!CONFIG_BOOTORDER) + return -1; + char desc[256]; + snprintf(desc, sizeof(desc), "/virtio-mmio@%016x/*@0/*@%x,%x", + (u32)mmio, target, lun); + return find_prio(desc); +} + int bootprio_find_ata_device(struct pci_device *pci, int chanid, int slave) { if (CONFIG_CSM) |