]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/UndiRuntimeDxe/Undi32.h
UefiCpuPkg/SmmCpuFeatureLib: Add more CPU ID for SmmFeatureControl.
[mirror_edk2.git] / OptionRomPkg / UndiRuntimeDxe / Undi32.h
index c35f4f3eab3bf7e24b71cd18885dc765accb4fa9..00b48f6ae09f763bcaa4b7700e137aaca014d8f4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI internal structures for the EFI UNDI driver.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/PciIo.h>\r
 #include <Protocol/NetworkInterfaceIdentifier.h>\r
 #include <Protocol/DevicePath.h>\r
+#include <Protocol/AdapterInformation.h>\r
 \r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/UefiRuntimeLib.h>\r
@@ -30,12 +31,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/DevicePathLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 \r
 #include <IndustryStandard/Pci.h>\r
 \r
 \r
 #include "E100b.h"\r
 \r
+extern EFI_DRIVER_BINDING_PROTOCOL  gUndiDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL  gUndiComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gUndiComponentName2;\r
+\r
 #define MAX_NIC_INTERFACES 16\r
 \r
 #define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION_31 0x00010001\r
@@ -53,10 +59,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define UNDI_DEV_SIGNATURE   SIGNATURE_32('u','n','d','i')\r
 #define UNDI_DEV_FROM_THIS(a) CR(a, UNDI32_DEV, NIIProtocol_31, UNDI_DEV_SIGNATURE)\r
 #define UNDI_DEV_FROM_NIC(a) CR(a, UNDI32_DEV, NicInfo, UNDI_DEV_SIGNATURE)\r
+#define UNDI_DEV_FROM_AIP(a) CR(a, UNDI32_DEV, Aip, UNDI_DEV_SIGNATURE)\r
 \r
 typedef struct {\r
   UINTN                                     Signature;\r
   EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL NIIProtocol_31;\r
+  EFI_ADAPTER_INFORMATION_PROTOCOL          Aip;\r
   EFI_HANDLE                                DeviceHandle;\r
   EFI_DEVICE_PATH_PROTOCOL                  *Undi32BaseDevPath;\r
   EFI_DEVICE_PATH_PROTOCOL                  *Undi32DevPath;\r
@@ -172,13 +180,6 @@ UNDI_notify_virtual (
   VOID      *context\r
   );\r
 \r
-VOID\r
-EFIAPI\r
-UndiNotifyExitBs (\r
-  EFI_EVENT Event,\r
-  VOID      *Context\r
-  );\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 UndiDriverSupported (\r
@@ -337,7 +338,7 @@ UNDI_Receive (
   IN  NIC_DATA_INSTANCE *AdapterInfo\r
   );\r
 \r
-VOID UNDI_APIEntry_new(UINT64);\r
+VOID EFIAPI UNDI_APIEntry_new(UINT64);\r
 VOID UNDI_APIEntry_Common(UINT64);\r
 \r
 PXE_IPV4 convert_mcip(PXE_MAC_ADDR *);\r
@@ -346,4 +347,99 @@ INT32 validate_mcip (PXE_MAC_ADDR *MCastAddr);
 VOID PxeStructInit (PXE_SW_UNDI *PxePtr);\r
 VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);\r
 \r
+//\r
+// functions defined in UndiAipImpl.c\r
+//\r
+\r
+/**\r
+  Returns the current state information for the adapter.\r
+\r
+  This function returns information of type InformationType from the adapter.\r
+  If an adapter does not support the requested informational type, then\r
+  EFI_UNSUPPORTED is returned. \r
+\r
+  @param[in]  This                   A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
+  @param[in]  InformationType        A pointer to an EFI_GUID that defines the contents of InformationBlock.\r
+  @param[out] InforamtionBlock       The service returns a pointer to the buffer with the InformationBlock\r
+                                     structure which contains details about the data specific to InformationType.\r
+  @param[out] InforamtionBlockSize   The driver returns the size of the InformationBlock in bytes.\r
+\r
+  @retval EFI_SUCCESS                The InformationType information was retrieved.\r
+  @retval EFI_UNSUPPORTED            The InformationType is not known.\r
+  @retval EFI_DEVICE_ERROR           The device reported an error.\r
+  @retval EFI_OUT_OF_RESOURCES       The request could not be completed due to a lack of resources.\r
+  @retval EFI_INVALID_PARAMETER      This is NULL. \r
+  @retval EFI_INVALID_PARAMETER      InformationBlock is NULL. \r
+  @retval EFI_INVALID_PARAMETER      InformationBlockSize is NULL.\r
+\r
+**/  \r
+EFI_STATUS\r
+EFIAPI\r
+UndiAipGetInfo (\r
+  IN   EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
+  IN   EFI_GUID                         *InformationType,\r
+  OUT  VOID                             **InformationBlock,\r
+  OUT  UINTN                            *InformationBlockSize\r
+  );\r
+\r
+/**\r
+  Sets state information for an adapter.\r
+\r
+  This function sends information of type InformationType for an adapter.\r
+  If an adapter does not support the requested information type, then EFI_UNSUPPORTED\r
+  is returned.\r
+\r
+  @param[in]  This                   A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
+  @param[in]  InformationType        A pointer to an EFI_GUID that defines the contents of InformationBlock.\r
+  @param[in]  InforamtionBlock       A pointer to the InformationBlock structure which contains details\r
+                                     about the data specific to InformationType.\r
+  @param[in]  InforamtionBlockSize   The size of the InformationBlock in bytes.\r
+\r
+  @retval EFI_SUCCESS                The information was received and interpreted successfully.\r
+  @retval EFI_UNSUPPORTED            The InformationType is not known.\r
+  @retval EFI_DEVICE_ERROR           The device reported an error.\r
+  @retval EFI_INVALID_PARAMETER      This is NULL.\r
+  @retval EFI_INVALID_PARAMETER      InformationBlock is NULL.\r
+  @retval EFI_WRITE_PROTECTED        The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().\r
+\r
+**/                        \r
+EFI_STATUS\r
+EFIAPI\r
+UndiAipSetInfo (\r
+  IN   EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
+  IN   EFI_GUID                         *InformationType,\r
+  IN   VOID                             *InformationBlock,\r
+  IN   UINTN                            InformationBlockSize\r
+  );\r
+\r
+/**\r
+  Get a list of supported information types for this instance of the protocol.\r
+\r
+  This function returns a list of InformationType GUIDs that are supported on an\r
+  adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned\r
+  in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in\r
+  InfoTypesBufferCount.\r
+\r
+  @param[in]  This                  A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
+  @param[out] InfoTypesBuffer       A pointer to the list of InformationType GUID pointers that are supported\r
+                                    by This.\r
+  @param[out] InfoTypesBufferCount  A pointer to the number of GUID pointers present in InfoTypesBuffer.\r
+\r
+  @retval EFI_SUCCESS               The list of information type GUIDs that are supported on this adapter was\r
+                                    returned in InfoTypesBuffer. The number of information type GUIDs was\r
+                                    returned in InfoTypesBufferCount.\r
+  @retval EFI_INVALID_PARAMETER     This is NULL.\r
+  @retval EFI_INVALID_PARAMETER     InfoTypesBuffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER     InfoTypesBufferCount is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES      There is not enough pool memory to store the results.\r
+\r
+**/                        \r
+EFI_STATUS\r
+EFIAPI\r
+UndiAipGetSupportedTypes (\r
+  IN    EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
+  OUT   EFI_GUID                         **InfoTypesBuffer,\r
+  OUT   UINTN                            *InfoTypesBufferCount\r
+  );\r
+\r
 #endif\r