On 11/10/15 19:48, John Snow wrote: > > > On 11/10/2015 01:17 PM, Laszlo Ersek wrote: >> Adding John Snow (IDE maintainer in QEMU) >> >> On 11/10/15 17:55, Mark Rutland wrote: >>> I've been trying to test an EFI application on x86_64 using Ubuntu 14.04's >>> QEMU >>> 2.0.0. I have a directory 'foo' containing the application, and I get QEMU >>> to >>> create a virtual FAT device: >>> >>> $ qemu-system-x86_64 -nographic \ >>> -bios src/edk2/Build/OvmfX64/RELEASE_GCC48/FV/OVMF.fd \ >>> -hda fat:foo >>> >>> However, I'm unable to access the root filesystem: >>> >>> UEFI Interactive Shell v2.1 >>> EDK II >>> UEFI v2.50 (EDK II, 0x00010000) >>> Mapping table >>> FS0: Alias(s):HD7a1:;BLK3: >>> >>> PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1) >>> BLK2: Alias(s): >>> PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0) >>> BLK4: Alias(s): >>> PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0) >>> BLK0: Alias(s): >>> PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x0) >>> BLK1: Alias(s): >>> PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x1) >>> Press ESC in 1 seconds to skip startup.nsh or any other key to continue. >>> Shell> fs0: >>> FS0:\> dir >>> ls: File Not Found - 'FS0:\' >>> >>> With git, I bisected this down to the commit "OvmfPkg: enable SATA >>> controller". >>> >>> Any ideas as to what the problem could be? >>> >>> I don't have a newer qemu-system-x86_64 lying around, so I haven't been >>> able to >>> test with that. >> >> I just tested the above, with upstream QEMU at git ce278618, and OVMF at >> edk2 git 07c70785. It works for me. >> >> Can you please retest with upstream QEMU? As far as I understand, many >> IDE emulation fixes have gone into QEMU since 2.0.0. Some of those were >> directly related to the SATA enablement in OVMF. >> > > Hmm, I had a big long email typed out explaining the state of SATA disk > support in QEMU and how there are known SATA HDD bugs until 2.3.0 and > known SATA CDROM bugs until 2.4.1, but your command-line doesn't appear > to be using SATA -- unless that QEMU is modified -- it appears to be > using traditional ATA disk emulation.
Correct, but even for using the same ATA/IDE controller, the driver was replaced completely in OVMF, so any small tweak on the QEMU side could have an impact. > > Of which I haven't fixed any data corruption bugs that I *know* of. > There have been a lot of changes in general, so it's still possible I > fixed this by "accident." > > Please retest with 2.4.1 if possible. If you still find problems, keep > in touch. Also, using the most recent edk2 version, Mark could elect to reverse-bisect QEMU (2.0 to 2.4) for the fix, whatever it was. :) > >> I'm not sure if you are used to building QEMU; one set of commands that >> works for me (although building in a separate build directory is >> recommended, officially), is: >> >> git clone git://git.qemu.org/qemu.git >> cd qemu >> ./configure --target-list=x86_64-softmmu --prefix=$PREFIX >> nice make -j $N >> make install >> >> $PREFIX/bin/qemu-system-x86_64 ... >> >> In general I'd recommend using virtio-blk over IDE for such testing >> anyway. If you'd like to stick with the Ubuntu-shipped binary, please >> try to replace the "-hda ..." shorthand with the following shorthand: >> >> -drive if=virtio,file=fat:blargh >> >> For completeness, let me reformat your command line the way I'd write it: >> >> cp .../OVMF_VARS.fd my-vars.fd >> >> $PREFIX/bin/qemu-system-x86_64 \ >> -machine pc,accel=kvm \ >> -net none \ >> -nographic \ >> \ >> -drive if=pflash,readonly,file=.../OVMF_CODE.fd,format=raw \ >> -drive if=pflash,file=my-vars.fd,format=raw \ >> \ >> -drive if=none,file=fat:foo,id=drive0,format=raw \ >> -device virtio-blk-pci,drive=drive0 \ >> \ >> -debugcon file:ovmf.log \ >> -global isa-debugcon.iobase=0x402 >> >> Thanks >> Laszlo >> > > ...And my ultimate advice is just to listen to Laszlo. ;) My ultimate advice is just to listen to John; he always makes good points. (See above, for example.) ;) Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel