]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: VirtioNetDxe: add entry point
authorLaszlo Ersek <lersek@redhat.com>
Fri, 14 Jun 2013 07:39:40 +0000 (07:39 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Jun 2013 07:39:40 +0000 (07:39 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14406 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/VirtioNetDxe/EntryPoint.c [new file with mode: 0644]

diff --git a/OvmfPkg/VirtioNetDxe/EntryPoint.c b/OvmfPkg/VirtioNetDxe/EntryPoint.c
new file mode 100644 (file)
index 0000000..bbf6d8f
--- /dev/null
@@ -0,0 +1,50 @@
+/** @file\r
+\r
+  This file implements the entry point of the virtio-net driver.\r
+\r
+  Copyright (C) 2013, Red Hat, Inc.\r
+  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  distribution. The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <Library/UefiLib.h>\r
+\r
+#include "VirtioNet.h"\r
+\r
+/**\r
+  This is the declaration of an EFI image entry point. This entry point is the\r
+  same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both\r
+  device drivers and bus drivers.\r
+\r
+  @param  ImageHandle           The firmware allocated handle for the UEFI\r
+                                image.\r
+  @param  SystemTable           A pointer to the EFI System Table.\r
+\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval Others                An unexpected error occurred.\r
+**/\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioNetEntryPoint (\r
+  IN EFI_HANDLE       ImageHandle,\r
+  IN EFI_SYSTEM_TABLE *SystemTable\r
+  )\r
+{\r
+  return EfiLibInstallDriverBindingComponentName2 (\r
+           ImageHandle,\r
+           SystemTable,\r
+           &gVirtioNetDriverBinding,\r
+           ImageHandle,\r
+           &gVirtioNetComponentName,\r
+           &gVirtioNetComponentName2\r
+           );\r
+}\r