Re: [edk2] [PATCH v2 0/4] OvmfPkg: virtio-blk driver
Thanks Laszlo. Committed in r13801. Two requests for your next virtio series: 1. Add inclusion guards in VirtioBlkDxe/*.h 2. Make OFFSET_OF_VHDR use OFFSET_OF I noticed the -drive file=cd.iso,if=virtio doesn't seem to boot the ISO. This does work for seabios. I wonder if this is luck based on the ISO layout, or if seabios detects this. Perhaps SCSI based virtio will detect it as a CD/DVD, and work correctly? -Jordan On Sun, Sep 30, 2012 at 3:11 PM, Laszlo Ersek ler...@redhat.com wrote: v1-v2: - (no functional changes) - (patches 2 to 4 unchanged) - (rebased to svn rev 13778) - make sure all new files have CRLF line endings - remove author references - move virtio-0.9.5 definitions and structures to Virtio.h - rename IoWrite() / IoRead() to VirtioWrite() / VirtioRead() - make Dev param of CONFIG_READ() / CONFIG_WRITE() explicit - rename CONFIG_READ() / CONFIG_WRITE() to VIRTIO_CFG_READ() / VIRTIO_CFG_WRITE() - open-code goto from VIRTIO_CFG_READ() / VIRTIO_CFG_WRITE(); consequently, simplify call sites where the precise error code doesn't matter - substitute EFI_PAGE_SIZE for SIZE_4KB parameter of ALIGN_VALUE() - replace division by SIZE_4KB with EFI_SIZE_TO_PAGES in RingSize calculation - replace similar division with right shift by EFI_PAGE_SHIFT in calculation of ring base GPFN - retest steps (4) and (5) described below The first patch adds the driver. The rest enables QemuBootOrder to recognize virtio-blk devices. Tested as follows: (1) Booted the Fedora 18 Alpha Live CD (XFCE flavor) with OVMF under RHEL-6.3 qemu-kvm. The ISO image was accessed as an IDE CD-ROM. The target disk was virtio-blk, but in this phase OVMF didn't care about it beyond noticing / enumerating it. (2) Created a 4 GB raw image file with MBR partition table and a single VFAT partition, with a few directories inside. This virtual disk was attached to the virtual machine (while turned off) with virt-manager. At this point 00:05.0 corresponded to the main image, while 00:07.0 corresponded to this made-up MBR image. (3) Edited the VM xml with virsh so that the disks would sit on two functions of the same PCI device (this was not necessary, I just wanted to see if it worked). See the virsh XML fragment below: disk type='file' device='disk' driver name='qemu' type='raw' cache='none'/ source file='/var/lib/libvirt/images/fw-ovmf.g-f18xfcealpha.e-rhel63.img'/ target dev='vda' bus='virtio'/ address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x1'/ /disk disk type='file' device='disk' driver name='qemu' type='raw' cache='none'/ source file='/var/lib/libvirt/images/mbr-one-vfat-part.img'/ target dev='vdb' bus='virtio'/ address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0' multifunction='on'/ /disk (4) Booted virtual machine and entered the Boot Options text-ui in OVMF. Browsed the directories on mbr-one-vfat-part.img (see (2)), then made sure \EFI\fedora\shim.efi was added as a boot option from the main image. (Full device path: PciRoot(0x0)/Pci(0x5,0x1)/HD(1,GPT,32DBD7E0-D59B-4190-8DE3-A95E75483A13,0x800,0x36800)/\EFI\fedora\shim.efi.) (5) OVMF loaded shim https://github.com/mjg59/shim/, which loaded grub-2 with the Simple File System Protocol. Grub-2 loaded the OS with BlockIo. Grub-1 does not recognize the UEFI device path in (4) as bootable. I plan to write a virtio-scsi driver sometime, which should cooperate with the existent SCSI parts of OVMF, and produce the messaging device path nodes required by grub-1. Many thanks to Paolo Bonzini Jordan Justen. Laszlo Ersek (4): OvmfPkg: introduce virtio-blk driver OvmfPkg: QemuBootOrder: whitespace fix OvmfPkg: QemuBootOrder: lower the required number of OFW nodes to 2 OvmfPkg: QemuBootOrder: recognize virtio-blk OFW device paths OvmfPkg/VirtioBlkDxe/Virtio.h | 176 +++ OvmfPkg/VirtioBlkDxe/VirtioBlk.h | 293 + OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c | 51 +- OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 1431 OvmfPkg/OvmfPkgIa32.dsc|1 + OvmfPkg/OvmfPkgIa32.fdf|1 + OvmfPkg/OvmfPkgIa32X64.dsc |1 + OvmfPkg/OvmfPkgIa32X64.fdf |1 + OvmfPkg/OvmfPkgX64.dsc |1 + OvmfPkg/OvmfPkgX64.fdf |1 + OvmfPkg/VirtioBlkDxe/VirtioBlk.inf | 40 + 11 files changed, 1986 insertions(+), 11 deletions(-) create mode 100644 OvmfPkg/VirtioBlkDxe/Virtio.h create mode 100644 OvmfPkg/VirtioBlkDxe/VirtioBlk.h create mode 100644 OvmfPkg/VirtioBlkDxe/VirtioBlk.c create mode 100644 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
Re: [edk2] EFI_PAGES_TO_SIZE for UINT32 argument
Hi Feng, I agree with the conclusion but in this case I may write a long list of mistakes in MdeModulePkg using the macro. If you want I do this. Sergey On 08.10.2012, at 11:16, Tian, Feng wrote: Hi, Isakov Sorry for forgetting this macro usage was ever discussed internally. Our conclusion is the caller should cast the parameter to (UINTN) before calling this macro. Thanks Feng From: Tian, Feng [mailto:feng.t...@intel.com] Sent: Monday, October 08, 2012 14:53 To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] EFI_PAGES_TO_SIZE for UINT32 argument Thanks for your contribution. I agree with your suggestion, and EFI_SIZE_TO_PAGES() macro also need update. Br Feng From: Sergey Isakov [mailto:isakov...@bk.ru] Sent: Sunday, October 07, 2012 17:09 To: edk2-devel@lists.sourceforge.net Subject: [edk2] EFI_PAGES_TO_SIZE for UINT32 argument Dear sirs, The follow warning -- image.c(288) : warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value. -- It means that if we are using the macro A = EFI_PAGES_TO_SIZE(N); then the result will be same size as an argument. For example, if UINT16 N; then the result will be restricted to 16 bit - not as expected. So I propose to change the definition of the macro in UefiBaseType.h to be the follow --- #define EFI_PAGES_TO_SIZE(Pages) (((UINTN)Pages) EFI_PAGE_SHIFT) --- Or check all sources for a size of argument. Sergey -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] problem in uefi shell application on samsung board
Hi I couldn't find the error strings in my codebase too. As you suggested I have disabled two partitions and tested again. But result is same. On Fri, Oct 5, 2012 at 9:22 PM, Olivier Martin olivier.mar...@arm.comwrote: Hi Shiva, I have looked for different patterns that could make match your error message ‘CTRL based features are not usable.’ But I do not see any in the public repository. Can you do a search on this string in your codebase ? ** ** Do you know if there is any automatic startup Shell script in one of your partitions that will print this error. If you do not know, could you disable the two partitions and try again:*** * **- ** VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(1,MBR,0x13883578,0x2000,0xA000) **- ** VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(2,MBR,0x13883578,0xC000,0x140) ** ** Let me know, Olivier ** ** *From:* Shivamurthy Shastri [mailto:shiva.linuxwo...@gmail.com] *Sent:* 04 October 2012 13:51 *To:* Olivier Martin *Cc:* edk2-devel@lists.sourceforge.net *Subject:* problem in uefi shell application on samsung board ** ** Hi, ** ** I am getting problem after updating dsc and fdf files of samsung board as per your patches ( https://github.com/tianocore/edk2/commit/e1772adfef242ed7ddb748c8ac97aa4a5c6c6470 and https://github.com/tianocore/edk2/commit/8213627ef73ea5cac96c9eaeaed8dd8169ec3431 ) . ** ** The console log is : ** ** The default boot selection will start in 10 seconds [1] SD-MMC Booting - VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(1,MBR,0x13883578,0x2000,0xA000)/zImage - Arguments: root=/dev/mmcblk1p2 rw rootwait console=ttySAC2,115200 init --no-log - LoaderType: 1 [2] Shell [3] Boot Manager Start: 2 add-symbol-file /home/olimar01/edk2/Build/Shell/RELEASE_RVCTLINUX/ARM/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll 0xBE78A240 Loading driver at 0x000BE78A000 EntryPoint=0x000BE7CD1A9 Shell.efi UEFI Interactive Shell v2.0. UEFI v2.31 (ARM Platform EFI Oct 3 2012 19:39:20, 0x). Revision 1.02 Mapping table FS1: Alias(s):F8: VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB) FS0: Alias(s):HD4b:;BLK1: VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(1,MBR,0x13883578,0x2000,0xA000) BLK3: Alias(s): VenHw(B615F1F5-5088-43CD-809C-A16E52487D00) BLK0: Alias(s): VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9) BLK2: Alias(s): VenHw(3A02E7FE-0649-4FB4-BE4F-A862CA1872A9)/HD(2,MBR,0x13883578,0xC000,0x140) Error. Error. No SimpleTextInputEx was found. CTRL based features are not usable. Error. Error. No SimpleTextInputEx was found. CTRL based features are not usable. Press ESC in 5 seconds to skip startup.nsh or any other key to continue.** ** ** ** ** ** -- Thanks and Regards, Shiva. ** ** -- Thanks and Regards, Shiva. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] [PATCH v2 0/4] OvmfPkg: virtio-blk driver
On 10/08/12 09:42, Jordan Justen wrote: Thanks Laszlo. Committed in r13801. Two requests for your next virtio series: 1. Add inclusion guards in VirtioBlkDxe/*.h Regarding headers. I have a working virtio-scsi driver now (no nice comments yet), but I have some parts that are shared by virtio-blk and virtio-scsi. You mentioned OvmfPkg/Include/IndustryStandard as a new directory to host the type and macro definitions, but I also have some functions to extract. Where should I put the header file with the function declarations, and the C file with the function definitions? 2. Make OFFSET_OF_VHDR use OFFSET_OF Ugh. For some reason I was convinced that OFFSET_OF didn't exist yet. It's not that I forgot to search for it, I searched and decided it wasn't there. Strange. I noticed the -drive file=cd.iso,if=virtio doesn't seem to boot the ISO. This does work for seabios. I wonder if this is luck based on the ISO layout, or if seabios detects this. I have not tested this scenario. I tried it now (from virt-manager, as usual), but Advanced Options | Disk bus for CD-ROMs only allows two values, IDE and SCSI. Virtio is not listed. Perhaps SCSI based virtio will detect it as a CD/DVD, and work correctly? I tested that now. OVMF boots grub2 from the Fedora-18-Alpha-x86_64-Live-XFCE.iso virtio-scsi CD-ROM. Later the installer fails with https://fedoraproject.org/wiki/Common_F18_bugs#uefi-dvd-fail, but I think that is an initrd problem. Listed from the emergency shell, /proc/modules contains virtio_net and virtio_blk, but not virtio_scsi. I submitted https://bugzilla.redhat.com/show_bug.cgi?id=864012. I tested the same with the Windows 8 Consumer Preview ISO (build 8250). It boots. I powered off the virtual machine at the first window (Windows Setup, language / locale selection). Relevant options on the qemu-kvm command line: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x5 ^ -drive file=/filestore/isos/win8/en_windows_8_consumer_preview_debug_checked_build_x64_dvd_811812.iso,if=none,media=cdrom,id=drive-scsi0-0-0-0,readonly=on,format=raw ^ -device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 ^ ^ Thanks, Laszlo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] [PATCH v2 0/4] OvmfPkg: virtio-blk driver
Il 08/10/2012 09:42, Jordan Justen ha scritto: I noticed the -drive file=cd.iso,if=virtio doesn't seem to boot the ISO. This does work for seabios. I wonder if this is luck based on the ISO layout, or if seabios detects this. I do wonder if it is treating it as a USB (pendrive) image... Paolo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] www.tianocore.org gone?
Link to where www.tianocore.org is normally relayed to: http://sourceforge.net/apps/mediawiki/tianocore/ thanks, Laurie laurie.jarlst...@intel.com EFI / Framework Technical Marketing Engineering Team (503) 712-9395 -Original Message- From: Nikolai Saoukh [mailto:n...@otdel-1.org] Sent: Monday, October 08, 2012 7:41 AM To: edk2-devel@lists.sourceforge.net Subject: [edk2] www.tianocore.org gone? DNS servers points to nowhere -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel