About UEFI
Unified Extensible Firmware Interface
UEFI is designed to replace the Basic Input/Output System(BIOS) firmware interface
QEMU UEFI firmware
OVMF: Open Virtual Machine Firmware
UEFI: Unified Extensible Firmware Interface
edk2: Intel's EFI Development Kit II
TianoCore = edks2
Build OVMF
apt-get install nasm iasl
cd /root
git clone https://github.com/tianocore/edk2.git
cd edk2
OvmfPkg/build.sh -a X64
qemu-system-x86_64 -m 1024 -smp 4 -drive file=/storage/1404-nvme.img,id=d22,if=none -device nvme,drive=d22,serial=1234 --enable-kvm -cdrom /storage/ubuntu-14.10-server-amd64.iso -drive if=pflash,format=raw,file=/root/run-ovmf/edk2/Build/OvmfX64/DEBUG_GCC49/QEMU/bios.bin
qemu-system-x86_64 -m 1024 -smp 4 -drive file=/storage/1404-uefi.img,format=qcow2,id=drive-virtio-disk0,if=none -device virtio-blk-pci,scsi=on,drive=drive-virtio-disk0 -drive file=/storage/1404-nvme.img,id=d22,if=none -device nvme,drive=d22,serial=1234 --enable-kvm -cdrom /storage/ubuntu-14.10-server-amd64.iso -drive if=pflash,format=raw,file=/root/run-ovmf/edk2/Build/OvmfX64/DEBUG_GCC49/QEMU/bios.bin
-drive file=/storage/1404-uefi.img,format=qcow2,id=drive-virtio-disk0,if=none -device virtio-blk-pci,scsi=on,drive=drive-virtio-disk0
QEMU
qemu-system-x86_64 -pflash /root/run-ovmf/edk2/Build/OvmfX64/DEBUG_GCC49/QEMU/bios.bin -hda fat:/root/run-ovmf/edk2/Build/OvmfX64/DEBUG_GCC49/X64
qemu-system-x86_64 -m 1024 -smp 4 -drive file=/storage/1404-uefi.img,format=qcow2,id=drive-virtio-disk0,if=none -device virtio-blk-pci,scsi=on,drive=drive-virtio-disk0 -drive file=/storage/1404-nvme.img,id=d22,if=none -device nvme,drive=d22,serial=1234 --enable-kvm -drive if=pflash,format=raw,file=/root/run-ovmf/edk2/Build/OvmfX64/DEBUG_GCC49/QEMU/bios.bin -drive file=/storage/80G.img,format=qcow2,id=drive-virtio-disk1,if=none -device virtio-blk-pci,scsi=on,drive=drive-virtio-disk1
Reference:
https://www.iol.unh.edu/sites/default/files/testsuites/nvme/20140918_NVMe_Interop_Test_Suite_v1.1b.pdf
http://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746396