<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Chen,<div><br></div><div>You also have to remember that BIOS requires a mixture of 16-bit assembly APIs and 1970s (and early 1980s) hardware devices to exist. These 1970’s hardware devices still exist in hardware (or are emulated in SMM) to support BIOS, option ROMs, and boot loader compatibility. </div><div><br></div><div>Also the BIOS APIs have evolved over time, so at times there are multiple ways to do things, and the new way obsoletes the old way, but the old way still exists for backward compatibility. For example APM is 1992 technology, that was superseded by ACPI in 1996. So APM is only interesting if you are trying to boot an OS from the early to mid 1990’s.</div><div><br></div><div>UEFI does not require a specific type of hardware to exist. An OS platform design guide probably specs out specific hardware that needs to exist, but is not really part of the UEFI spec. So an UEFI implementation can implements interrupts via APICs (or the ARM Generic Interrupt Contoller) and thus it does not need to support the 1970s 8259.  </div><div><br></div><div>Also in UEFI you don’t need the VM to emulate hardware. You can just build VM specific drivers that do VM calls. If you need to run pre-UEFI systems that is what the edk2 CSM is all about. It lets you boot in a legacy BIOS compatible way and that requires legacy BIOS code. This is where seabios (or some other codebase) would come into play. </div><div><br></div><div>Seabios and UEFI are doing different things in different ways so it has hard to make direct comparison. </div><div><br></div><div>Thanks,</div><div><br></div><div>Andrew Fish</div><div><br><div><div>On Feb 24, 2014, at 3:59 AM, Laszlo Ersek <<a href="mailto:lersek@redhat.com">lersek@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On 02/24/14 05:19, Chen Fan wrote:<br><blockquote type="cite">Hi all,<br>   I'm a novice with OVMF, so please pardon me if I make any mistake.<br><br>   I have made a list about the feature differences between OVMF and<br>Seabios after investigation using QEMU. I simply use seabios source code<br>file name as the feature's name, then I made the following categorize<br>about OVMF supported/unsupported features. maybe there are some defects<br>at the list. and if this list miss some important features, please point<br>it out to me.<br> I want to improve this list with you. so I'm welcome any comments and<br>suggestions.<br><br>Thanks,<br>Chen<br><br>-----------------------------------------------------------------------<br> A: OVMF supports feature which seabios support it<br>    (This includes features which have similar bios)<br>-----------------------------------------------------------------------<br> 1. ata          2. blockcmd     3. dma         4. floppy<br> 5. pci          6. pic          7. ps2port     8. rtc<br> 9. timer        10. usb-ehci    11. usb-hid    12. usb-hub<br> 13. usb-msc     14. usb-uhci    <br></blockquote><br>I'll call these, in a hand-waving manner, "basic PC peripheral support",<br>and it's edk2 modules that support them, not directly OvmfPkg. IOW<br>OvmfPkg pulls in / utilizes drivers from the edk2 tree unmodified to<br>support these. For example, many drivers from under PcAtChipsetPkg/.<br><br>The end result is the same (ie. the OVMF.fd build you end up with<br>supports them), but it's good to be clear about the scope when saying OVMF.<br><br>Also, since we're talking "PC", I think we've never tried OVMF on q35<br>machine types.<br><br><blockquote type="cite"> 15. virtio-blk 16. virtio-pci<br> 17. virtio-ring 18. virtio-scsi<br></blockquote><br>The virtio support we have could be a bit differently structured, but<br>mostly "yes".<br><br><blockquote type="cite">19. pci bus    20. VGA-cirrus<br> 21. ISA bridge  22. PCI IRQs    23. ISA        24. pci crs<br></blockquote><br>Re ACPI (since you say PCI CRS): OVMF has some builtin tables, and the<br>PCI CRS is built dynamically (kudos for guidance from Gerd et al). It<br>works. When running on qemu machine types / qemu versions up to 1.6,<br>this is the only ACPI stuff OVMF exports.<br><br>I plan to post an OVMF patch soonish (when qemu 1.7.1 is out) that will<br>enable OVMF to download ACPI tables from qemu, benefiting from Michael<br>Tsirkin's qemu work. Since SeaBIOS already does that, this should (a)<br>synchronize ACPI between OVMF and SeaBIOS, (b) give some missing ACPI<br>features to guest OSes running on OVMF "for free", like PCI hotplug and<br>pvpanic.<br><br><blockquote type="cite"> 25. mtrr<br></blockquote><br>Yes, although as I gather this is mostly cosmetic in KVM guests.<br><br><blockquote type="cite">26. smbios<br></blockquote><br>The SMBIOS integration that you might have become accustomed to between<br>qemu and SeaBIOS is not upstream OVMF.<br><br>I posted patches for that, I run them every day, and Gerd's RPMs<br><<a href="http://www.kraxel.org/repos/">http://www.kraxel.org/repos/</a>> and IIRC Paolo's Copr builds<br><<a href="http://copr-be.cloud.fedoraproject.org/results/bonzini/ovmf/">http://copr-be.cloud.fedoraproject.org/results/bonzini/ovmf/</a>> include<br>them. They are not in the upstream tree because Jordan and myself<br>disagree on how SMBIOS should be worked out in OVMF.<br><br>If I recall correctly, Jordan's point was to factor out SMBIOS code from<br>another client package (EmulatorPkg if I remember?...), librarize it in<br>a central edk2 location (like MdeModulePkg), and use this library /<br>integrate it with qemu in OVMF. My patches add custom / independent code<br>to SMBIOS.<br><br>Jordan's suggestion would involve a lot of work, and modifying the<br>Mde*Pkg directories (aside from obvious small fixes) is very hard from a<br>project management POV. Spending cycles on this is not economic for me,<br>especially after having implemented the custom patches, so I'm not doing it.<br><br><blockquote type="cite">   27. smp<br></blockquote><br>Not sure what this covers. Jordan has out-of-tree WIP for MP services,<br>and it's possible someone will help with it in the near future.<br><br><blockquote type="cite">      28. suspend<br></blockquote><br>S3 is work in progress. It should make it into the tree soon.<br><br><blockquote type="cite"> 29. block       30. boot        <br></blockquote><br>OVMF supports qemu boot order specs, but the huge conceptual difference<br>between UEFI boot options and the traditional BIOS boot options / the<br>OpenFirmware expressive power keeps us revising details and fixing bugs.<br><br><blockquote type="cite">31. cdrom      32. output<br> 33. resume      34. serial      35. usb        36. pciint<br> 37. optionroms  38. xen         <br></blockquote><br>The Xen community certainly cares about OVMF. For details you'll have to<br>talk to them.<br><br><blockquote type="cite">39. vgahooks   40. PCI I/O protcol(pci<br>bios)<br> 41. DSDT table  42. SEC (post)  43. MADT table 44. font<br> 45. mouse       46. disk        47. kbd        48. clock<br> 49. memmap      50. Memory Allocation Services (pmm)<span class="Apple-converted-space"> </span><br> 51. System table (biosvar)      52. FW_CFG<span class="Apple-converted-space"> </span><br></blockquote><br>"Yes", in general. I'll just single out "font", which to me implies HII<br>in UEFI / edk2, and it's a beast.<br><br><blockquote type="cite"><br>P.S:<br> the values ​​in parentheses represents the seabios feature.<br><br>---------------------------------------------------------------------<br> B: OVMF does not support features which seabios support it<br>---------------------------------------------------------------------<br> 53. ahci        <br></blockquote><br>Hmm. I think edk2 in general does support AHCI<br>(seeMdeModulePkg/Bus/Ata/AtaAtapiPassThru), we just don't include it. I<br>think we should have a good use case for drivers / features; more than<br>just "feature parity with SeaBIOS".<br><br><blockquote type="cite">54. usb-ohci    55. esp-scsi   56. lsi-scsi<br> 57. magasas<br></blockquote><br>These look like various SCSI HBA's. edk2 probably has no drivers,<br>indeed. I'm not convinced we need to support them.<br><br><blockquote type="cite">58. usb-uas     59. usb-xhci<br></blockquote><br>I think the same applies to XHCI as to AHCI, see<br>MdeModulePkg/Bus/Pci/XhciDxe.<br><br><blockquote type="cite"> 60. cpu-hotplug<br> 61. acpi-dbug   62. VGA-std     63. PIIX4 PM   64. pci-hotplug<br></blockquote><br>I'm not sure if CPU and/or PCI hotplug is very useful during the<br>firmware's lifetime (and I don't know if the above SeaBIOS files imply<br>such support). If you mean the ACPI dependencies, they should come "for<br>free" once we have the ACPI download patch in place.<br><br><blockquote type="cite"> 65. GPE         66. hpet        67. q35        68. pvpanic<br> 69. processor table             70. smm<br></blockquote><br>No SMM in OVMF; KVM doesn't support it (last I heard). edk2 has<br>extensive support for SMM otherwise.<br><br><blockquote type="cite">      71. pnp bios<br></blockquote><br>Not sure what to make of this. I'll have a few words about CSM.<br><br><blockquote type="cite"> 72. gdb<br></blockquote><br>Source level debugging of OVMF is not solved / supported, at leat not by<br>tools in the upstream tree. There have been elaborate and working hacks<br>but they've gone stale. For me personally debug messages beat anything<br>and everything and lack of gdb is a non-issue.<br><br><blockquote type="cite"><br>---------------------------------------------------------------------<br> C: OVMF does not need to support feature which seabios support<br>    (due to UEFI's spec/implementation)<br>---------------------------------------------------------------------<br> 73. ramdisk    74. lzma decoder<br></blockquote><br>Actually edk2 uses LZMA quite a bit. Most of the firmware image is<br>compressed.<br><br><blockquote type="cite">75. biostable   76. coreboot<br></blockquote><br>There are efforts to support coreboot and OVMF in combination (google<br>CorebootPkg). I have no clue of the scope, and it's not upstream.<br><br><blockquote type="cite"> 77. shadow     78. apm<br><br> D: OVMF supports feature which is required by UEFI spec<br> 79. CSM        <br></blockquote><br>David Woodhouse and Kevin O'Connor have done huge work to make this<br>work, covering both SeaBIOS and edk2/OVMF.<br><br>The edk2 patches are not in-tree yet. Actually the precise set of the<br>edk2 patches to include is not fully "agreed upon" yet. In my local tree<br>I carry the two critical patches from David on a topic branch. Gerd's<br>RPMs also provide a pure-UEFI *and* a CSM build of OVMF. (The flavor you<br>want must be specified at build time.)<br><br>David even managed to change the CSM specification -- additional fields<br>were needed between edk2 and SeaBIOS. v0.98 (IIRC) of the spec is<br>supposed to describe these too, but I'm not sure about the release<br>status of this version.<br><br><blockquote type="cite">80. GPT           81. secureboot<br></blockquote><br>Yes. (Side note: secure boot is per-spec incompatible with CSM.)<br><br><blockquote type="cite"><br>---------------------------------------------------------------------<br> E: OVMF does not support feature which is required by UEFI spec<br>---------------------------------------------------------------------<br> 82. i18n<br></blockquote><br>This is incorrect I'd think (it depends on the scope you have in mind of<br>course): edk2 has super-extensive support for HII, which covers fonts,<br>languages etc.<br><br>I'm sure I haven't been precise enough in this email, but it should help<br>ignite the discussion :)<br><br>Thanks<br>Laszlo<br><br>------------------------------------------------------------------------------<br>Flow-based real-time traffic analytics software. Cisco certified tool.<br>Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer<br>Customize your own dashboards, set traffic alerts and generate reports.<br>Network behavioral analysis & security monitoring. All-in-one tool.<br><a href="http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk</a><br>_______________________________________________<br>edk2-devel mailing list<br>edk2-devel@lists.sourceforge.net<br>https://lists.sourceforge.net/lists/listinfo/edk2-devel</div></blockquote></div><br></div></body></html>