--- /dev/null
+/** @file\r
+ EFI Adapter Information Protocol definition.\r
+ The EFI Adapter Information Protocol is used to dynamically and quickly discover\r
+ or set device information for an adapter.\r
+\r
+ Copyright (c) 2014, 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
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ @par Revision Reference:\r
+ This Protocol is introduced in UEFI Specification 2.4\r
+\r
+**/\r
+\r
+#ifndef __EFI_ADAPTER_INFORMATION_PROTOCOL_H__\r
+#define __EFI_ADAPTER_INFORMATION_PROTOCOL_H__\r
+\r
+\r
+#define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \\r
+ { \\r
+ 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \\r
+ }\r
+\r
+#define EFI_ADAPTER_INFO_MEDIA_STATE_GUID \\r
+ { \\r
+ 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 } \\r
+ }\r
+\r
+#define EFI_ADAPTER_INFO_NETWORK_BOOT_GUID \\r
+ { \\r
+ 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C } \\r
+ }\r
+\r
+#define EFI_ADAPTER_INFO_SAN_MAC_ADDRESS_GUID \\r
+ { \\r
+ 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 } \\r
+ }\r
+\r
+typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL;\r
+\r
+///\r
+/// EFI_ADAPTER_INFO_MEDIA_STATE\r
+///\r
+typedef struct {\r
+ ///\r
+ /// Returns the current media state status. MediaState can have any of the following values: \r
+ /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state. \r
+ /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is \r
+ /// not any media attached to the network.\r
+ ///\r
+ EFI_STATUS MediaState;\r
+}EFI_ADAPTER_INFO_MEDIA_STATE;\r
+\r
+///\r
+/// EFI_ADAPTER_INFO_NETWORK_BOOT\r
+///\r
+typedef struct {\r
+ ///\r
+ /// TRUE if the adapter supports booting from iSCSI IPv4 targets.\r
+ ///\r
+ BOOLEAN iSsciIpv4BootCapablity;\r
+ ///\r
+ /// TRUE if the adapter supports booting from iSCSI IPv6 targets.\r
+ ///\r
+ BOOLEAN iScsiIpv6BootCapablity;\r
+ ///\r
+ /// TRUE if the adapter supports booting from FCoE targets.\r
+ ///\r
+ BOOLEAN FCoeBootCapablity;\r
+ ///\r
+ /// TRUE if the adapter supports an offload engine (such as TCP\r
+ /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.\r
+ ///\r
+ BOOLEAN OffloadCapability;\r
+ ///\r
+ /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI\r
+ /// boot operations.\r
+ ///\r
+ BOOLEAN iScsiMpioCapability;\r
+ ///\r
+ /// TRUE if the adapter is currently configured to boot from iSCSI\r
+ /// IPv4 targets.\r
+ ///\r
+ BOOLEAN iScsiIpv4Boot;\r
+ ///\r
+ /// TRUE if the adapter is currently configured to boot from iSCSI\r
+ /// IPv6 targets.\r
+ ///\r
+ BOOLEAN iScsiIpv6Boot;\r
+ ///\r
+ /// TRUE if the adapter is currently configured to boot from FCoE targets.\r
+ ///\r
+ BOOLEAN FCoeBoot;\r
+}EFI_ADAPTER_INFO_NETWORK_BOOT;\r
+\r
+///\r
+/// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS\r
+///\r
+typedef struct {\r
+ ///\r
+ /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet\r
+ /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.\r
+ ///\r
+ EFI_MAC_ADDRESS SanMacAddress;\r
+}EFI_ADAPTER_INFO_SAN_MAC_ADDRESS;\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
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ADAPTER_INFO_GET_INFO)(\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
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ADAPTER_INFO_SET_INFO)(\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
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES)(\r
+ IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
+ OUT EFI_GUID **InfoTypesBuffer,\r
+ OUT UINTN *InfoTypesBufferCount\r
+ );\r
+\r
+///\r
+/// EFI_ADAPTER_INFORMATION_PROTOCOL\r
+/// The protocol for adapter provides the following services.\r
+/// - Gets device state information from adapter.\r
+/// - Sets device information for adapter.\r
+/// - Gets a list of supported information types for this instance of the protocol.\r
+///\r
+typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL {\r
+ EFI_ADAPTER_INFO_GET_INFO GetInformation;\r
+ EFI_ADAPTER_INFO_SET_INFO SetInformation;\r
+ EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes;\r
+};\r
+\r
+extern EFI_GUID gEfiAdapterInformationProtocolGuid;\r
+\r
+extern EFI_GUID gEfiAdapterInfoMediaStateGuid;\r
+\r
+extern EFI_GUID gEfiAdapterInfoNetworkBootGuid;\r
+\r
+extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid;\r
+\r
+#endif\r