On Thu, May 16, 2013 at 6:01 AM, Laszlo Ersek <ler...@redhat.com> wrote: > Also summarize the resultant NIC driver options in the README file. > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Laszlo Ersek <ler...@redhat.com> > --- > 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/README | 37 ++++++++++++++-------- > OvmfPkg/VirtioNetDxe/VirtioNet.inf | 60 > ++++++++++++++++++++++++++++++++++++
I think it is better to add the inf separately. (Driver vs. platform change.) -Jordan > 8 files changed, 90 insertions(+), 13 deletions(-) > create mode 100644 OvmfPkg/VirtioNetDxe/VirtioNet.inf > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 0e6d187..fbb7098 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -480,6 +480,7 @@ > MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > # Usb Support > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index 4665b9e..be6ca88 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -267,6 +267,7 @@ FILE FREEFORM = > PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) { > INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + INF OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > # Usb Support > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 48da532..ace575a 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -487,6 +487,7 @@ > MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > # Usb Support > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index 177c880..89e86e6 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -267,6 +267,7 @@ FILE FREEFORM = > PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) { > INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + INF OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > # Usb Support > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index c191c61..e5de725 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -507,6 +507,7 @@ > MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > # Usb Support > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index 1d3ba8e..abeedef 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -267,6 +267,7 @@ FILE FREEFORM = > PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) { > INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + INF OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > # Usb Support > diff --git a/OvmfPkg/README b/OvmfPkg/README > index 13058ea..213d864 100644 > --- a/OvmfPkg/README > +++ b/OvmfPkg/README > @@ -108,11 +108,11 @@ $ OvmfPkg/build.sh -a IA32 -b RELEASE -t GCC45 > > === Network Support === > > -OVMF provides a generic UEFI network stack by default, with the lowest level > -driver (the NIC driver) missing in the default build. In order to complete > the > -stack and make eg. DHCP, PXE Boot, and socket test utilities from the StdLib > -edk2 package work, (1) qemu has to be configured to emulate a NIC, (2) a > -matching UEFI NIC driver must be available when OVMF boots. > +OVMF provides a UEFI network stack by default. Its lowest level driver is the > +NIC driver, higher levels are generic. In order to make DHCP, PXE Boot, and > eg. > +socket test utilities from the StdLib edk2 package work, (1) qemu has to be > +configured to emulate a NIC, (2) a matching UEFI NIC driver must be available > +when OVMF boots. > > (If a NIC is configured for the virtual machine, and -- dependent on boot > order > -- PXE booting is attempted, but no DHCP server responds to OVMF's DHCP > @@ -122,23 +122,23 @@ longer.) > * For each NIC emulated by qemu, a GPLv2 licensed UEFI driver is available > from > the iPXE project. The qemu source distribution, starting with version 1.5, > contains prebuilt binaries of these drivers (and of course allows one to > - rebuild them from source as well). > + rebuild them from source as well). This is the recommended set of drivers. > > * Use the qemu -netdev and -device options, or the legacy -net option, to > enable NIC support: <http://wiki.qemu.org/Documentation/Networking>. > > * For a qemu >= 1.5 binary running *without* any "-M machine" option where > "machine" would identify a < qemu-1.5 configuration (for example: "-M > - pc-i440fx-1.4" or "-M pc-0.13"), the drivers are available from the default > - qemu installation to OVMF without further settings. > + pc-i440fx-1.4" or "-M pc-0.13"), the iPXE drivers are automatically > available > + to and configured for OVMF in the default qemu installation. > > * For a qemu binary in [0.13, 1.5), or a qemu >= 1.5 binary with an "-M > machine" option where "machine" selects a < qemu-1.5 configuration: > > - download a >= 1.5.0-rc1 source tarball from > <http://wiki.qemu.org/Download>, > > - - extract the following files from the tarball and install them in a > - location that is accessible to qemu processes (this may depend on your > + - extract the following iPXE driver files from the tarball and install them > + in a location that is accessible to qemu processes (this may depend on > your > SELinux configuration, for example): > > qemu-VERSION/pc-bios/efi-e1000.rom > @@ -156,9 +156,11 @@ longer.) > -device rtl8139,...,romfile=/full/path/to/efi-rtl8139.rom > -device virtio-net-pci,...,romfile=/full/path/to/efi-virtio.rom > > -* Independently of the iPXE NIC drivers, Intel's proprietary E1000 NIC driver > - can be embedded in the OVMF image at build time, as an alternative guest > - driver for "-device e1000": > +* Independently of the iPXE NIC drivers, the default OVMF build provides a > + basic virtio-net driver, located in OvmfPkg/VirtioNetDxe. > + > +* Also independently of the iPXE NIC drivers, Intel's proprietary E1000 NIC > + driver (PROEFI) can be embedded in the OVMF image at build time: > > - Download UEFI drivers for the e1000 NIC > - > http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=17515&lang=eng > @@ -168,6 +170,15 @@ longer.) > - Add "-D E1000_ENABLE -D FD_SIZE_2MB" to your build command, > - For example: "build -D E1000_ENABLE -D FD_SIZE_2MB". > > +* When a matching iPXE driver is configured for a NIC as described above, it > + takes priority over other drivers that could possibly drive the card too: > + > + | e1000 ne2k_pci pcnet rtl8139 virtio-net-pci > + -------------+------------------------------------------------ > + iPXE | x x x x x > + VirtioNetDxe | x > + Intel PROEFI | x > + > === UNIXGCC Debug === > > If you build with the UNIXGCC toolchain, then debugging will be disabled > diff --git a/OvmfPkg/VirtioNetDxe/VirtioNet.inf > b/OvmfPkg/VirtioNetDxe/VirtioNet.inf > new file mode 100644 > index 0000000..408a541 > --- /dev/null > +++ b/OvmfPkg/VirtioNetDxe/VirtioNet.inf > @@ -0,0 +1,60 @@ > +## @file > +# > +# This driver produces Simple Network Protocol instances for virtio-net > +# devices. > +# > +# Copyright (C) 2013, Red Hat, Inc. > +# > +# This program and the accompanying materials are licensed and made available > +# under the terms and conditions of the BSD License which accompanies this > +# distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > WITHOUT > +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +# > +## > + > +[Defines] > + INF_VERSION = 0x00010005 > + BASE_NAME = VirtioNetDxe > + FILE_GUID = A92CDB4B-82F1-4E0B-A516-8A655D371524 > + MODULE_TYPE = UEFI_DRIVER > + VERSION_STRING = 1.0 > + ENTRY_POINT = VirtioNetEntryPoint > + > +[Sources] > + ComponentName.c > + DriverBinding.c > + EntryPoint.c > + Events.c > + SnpGetStatus.c > + SnpInitialize.c > + SnpMcastIpToMac.c > + SnpReceive.c > + SnpReceiveFilters.c > + SnpSharedHelpers.c > + SnpShutdown.c > + SnpStart.c > + SnpStop.c > + SnpTransmit.c > + SnpUnsupported.c > + > +[Packages] > + MdePkg/MdePkg.dec > + OvmfPkg/OvmfPkg.dec > + > +[LibraryClasses] > + BaseMemoryLib > + DebugLib > + DevicePathLib > + MemoryAllocationLib > + UefiBootServicesTableLib > + UefiDriverEntryPoint > + UefiLib > + VirtioLib > + > +[Protocols] > + gEfiSimpleNetworkProtocolGuid ## BY_START > + gEfiDevicePathProtocolGuid ## BY_START > + gEfiPciIoProtocolGuid ## TO_START > -- > 1.7.1 > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel