]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: VirtioNetDxe: definitions of unsupported SNP member functions
authorLaszlo Ersek <lersek@redhat.com>
Fri, 14 Jun 2013 07:40:42 +0000 (07:40 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Jun 2013 07:40:42 +0000 (07:40 +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@14416 6f19259b-4bc3-4df7-8a09-765794883524

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

diff --git a/OvmfPkg/VirtioNetDxe/SnpUnsupported.c b/OvmfPkg/VirtioNetDxe/SnpUnsupported.c
new file mode 100644 (file)
index 0000000..e9f3825
--- /dev/null
@@ -0,0 +1,160 @@
+/** @file\r
+\r
+  Empty implementation of the SNP methods that dependent protocols don't\r
+  absolutely need and the UEFI-2.3.1+errC specification allows us not to\r
+  support.\r
+\r
+  Copyright (C) 2013, Red Hat, Inc.\r
+  Copyright (c) 2006 - 2010, 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 "VirtioNet.h"\r
+\r
+/**\r
+  Resets a network adapter and re-initializes it with the parameters that were\r
+  provided in the previous call to Initialize().\r
+\r
+  @param  This                 The protocol instance pointer.\r
+  @param  ExtendedVerification Indicates that the driver may perform a more\r
+                               exhaustive verification operation of the device\r
+                               during reset.\r
+\r
+  @retval EFI_SUCCESS           The network interface was reset.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_INVALID_PARAMETER One or more of the parameters has an\r
+                                unsupported value.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network\r
+                                interface.\r
+  @retval EFI_UNSUPPORTED       This function is not supported by the network\r
+                                interface.\r
+\r
+**/\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioNetReset (\r
+  IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+  IN BOOLEAN                     ExtendedVerification\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+\r
+/**\r
+  Modifies or resets the current station address, if supported.\r
+\r
+  @param  This  The protocol instance pointer.\r
+  @param  Reset Flag used to reset the station address to the network\r
+                interfaces permanent address.\r
+  @param  New   The new station address to be used for the network interface.\r
+\r
+  @retval EFI_SUCCESS           The network interfaces station address was\r
+                                updated.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_INVALID_PARAMETER One or more of the parameters has an\r
+                                unsupported value.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network\r
+                                interface.\r
+  @retval EFI_UNSUPPORTED       This function is not supported by the network\r
+                                interface.\r
+\r
+**/\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioNetStationAddress (\r
+  IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+  IN BOOLEAN                     Reset,\r
+  IN EFI_MAC_ADDRESS             *New OPTIONAL\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+\r
+/**\r
+  Resets or collects the statistics on a network interface.\r
+\r
+  @param  This            Protocol instance pointer.\r
+  @param  Reset           Set to TRUE to reset the statistics for the network\r
+                          interface.\r
+  @param  StatisticsSize  On input the size, in bytes, of StatisticsTable. On\r
+                          output the size, in bytes, of the resulting table of\r
+                          statistics.\r
+  @param  StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure\r
+                          that contains the statistics.\r
+\r
+  @retval EFI_SUCCESS           The statistics were collected from the network\r
+                                interface.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The\r
+                                current buffer size needed to hold the\r
+                                statistics is returned in StatisticsSize.\r
+  @retval EFI_INVALID_PARAMETER One or more of the parameters has an\r
+                                unsupported value.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network\r
+                                interface.\r
+  @retval EFI_UNSUPPORTED       This function is not supported by the network\r
+                                interface.\r
+\r
+**/\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioNetStatistics (\r
+  IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+  IN BOOLEAN                     Reset,\r
+  IN OUT UINTN                   *StatisticsSize   OPTIONAL,\r
+  OUT EFI_NETWORK_STATISTICS     *StatisticsTable  OPTIONAL\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+\r
+/**\r
+  Performs read and write operations on the NVRAM device attached to a  network\r
+  interface.\r
+\r
+  @param  This       The protocol instance pointer.\r
+  @param  ReadWrite  TRUE for read operations, FALSE for write operations.\r
+  @param  Offset     Byte offset in the NVRAM device at which to start the read\r
+                     or write operation. This must be a multiple of\r
+                     NvRamAccessSize and less than NvRamSize.\r
+  @param  BufferSize The number of bytes to read or write from the NVRAM\r
+                     device. This must also be a multiple of NvramAccessSize.\r
+  @param  Buffer     A pointer to the data buffer.\r
+\r
+  @retval EFI_SUCCESS           The NVRAM access was performed.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_INVALID_PARAMETER One or more of the parameters has an\r
+                                unsupported value.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network\r
+                                interface.\r
+  @retval EFI_UNSUPPORTED       This function is not supported by the network\r
+                                interface.\r
+\r
+**/\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioNetNvData (\r
+  IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
+  IN BOOLEAN                     ReadWrite,\r
+  IN UINTN                       Offset,\r
+  IN UINTN                       BufferSize,\r
+  IN OUT VOID                    *Buffer\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r