From 4cb3e8d46721c7d3410cc347e3262a64421e913c Mon Sep 17 00:00:00 2001 From: "Ivan A. Melnikov" Date: Wed, 16 Jul 2025 11:22:53 +0400 Subject: [PATCH] OvmfPkg/LoongArchVirt: Add SATA support SATA CD-ROMS are still conventionally used in many virtual environments, so it's nice to support them out of the box. Tested with QEMU 9.2.3 with the following controller and drive: qemu-system-loongarch64 -M virt [...] \ -device ahci,id=ahci0,multifunction=on,bus=pcie.0,addr=0x7 \ -drive if=none,id=drive-sata2,media=cdrom,format=raw,aio=threads,file=/path/to/bootable.iso \ -device ide-cd,bus=ahci0.2,drive=drive-sata2,id=sata2,bootindex=102 Signed-off-by: Ivan A. Melnikov --- OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc | 10 ++++++++-- OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc index df6a6e1957..b4418f765c 100644 --- a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc +++ b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc @@ -584,12 +584,18 @@ OvmfPkg/VirtioNetDxe/VirtioNet.inf # - # IDE/SCSI + # SCSI # - MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + # + # SATA + # + MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + # # NVME Driver # diff --git a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf index ac197ade80..f612b99944 100644 --- a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf +++ b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.fdf @@ -111,12 +111,18 @@ INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf INF OvmfPkg/PlatformDxe/Platform.inf # -# SATA/SCSI +# SCSI # -INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf +# +# SATA +# +INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf +INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf +INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + # # NVME #