]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add Bluetooth related definition.
authorShumin Qiu <shumin.qiu@intel.com>
Wed, 15 Apr 2015 03:07:08 +0000 (03:07 +0000)
committershenshushi <shenshushi@Edk2>
Wed, 15 Apr 2015 03:07:08 +0000 (03:07 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17180 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/IndustryStandard/Bluetooth.h [new file with mode: 0644]
MdePkg/Include/Protocol/BluetoothConfig.h [new file with mode: 0644]
MdePkg/Include/Protocol/BluetoothHc.h [new file with mode: 0644]
MdePkg/Include/Protocol/BluetoothIo.h [new file with mode: 0644]
MdePkg/Include/Protocol/DevicePath.h
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/IndustryStandard/Bluetooth.h b/MdePkg/Include/IndustryStandard/Bluetooth.h
new file mode 100644 (file)
index 0000000..7dc9d55
--- /dev/null
@@ -0,0 +1,47 @@
+/** @file\r
+  This file contains the Bluetooth definitions that are consumed by drivers.\r
+  These definitions are from Bluetooth Core Specification Version 4.0 June, 2010\r
+\r
+  Copyright (c) 2015, 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
+**/\r
+\r
+#ifndef _BLUETOOTH_H_\r
+#define _BLUETOOTH_H_\r
+\r
+#pragma pack(1)\r
+\r
+///\r
+/// BLUETOOTH_ADDRESS\r
+///\r
+typedef struct {\r
+  ///\r
+  /// 48bit Bluetooth device address.\r
+  ///\r
+  UINT8      Address[6];\r
+} BLUETOOTH_ADDRESS;\r
+\r
+///\r
+/// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail.\r
+///\r
+typedef struct {\r
+  UINT8      FormatType:2;\r
+  UINT8      MinorDeviceClass: 6;\r
+  UINT16     MajorDeviceClass: 5;\r
+  UINT16     MajorServiceClass:11;\r
+} BLUETOOTH_CLASS_OF_DEVICE;\r
+\r
+#pragma pack()\r
+\r
+#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE    248\r
+\r
+#define BLUETOOTH_HCI_LINK_KEY_SIZE                           16\r
+\r
+#endif\r
diff --git a/MdePkg/Include/Protocol/BluetoothConfig.h b/MdePkg/Include/Protocol/BluetoothConfig.h
new file mode 100644 (file)
index 0000000..b1b3f55
--- /dev/null
@@ -0,0 +1,514 @@
+/** @file\r
+  EFI Bluetooth Configuration Protocol as defined in UEFI 2.5.\r
+  This protocol abstracts user interface configuration for Bluetooth device.\r
+\r
+  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under \r
+  the terms and conditions of the BSD License that accompanies this distribution.  \r
+  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.5\r
+\r
+**/\r
+\r
+#ifndef __EFI_BLUETOOTH_CONFIG_PROTOCOL_H__\r
+#define __EFI_BLUETOOTH_CONFIG_PROTOCOL_H__\r
+\r
+#include <IndustryStandard/Bluetooth.h>\r
+\r
+#define EFI_BLUETOOTH_CONFIG_PROTOCOL_GUID \\r
+  { \\r
+    0x62960cf3, 0x40ff, 0x4263, { 0xa7, 0x7c, 0xdf, 0xde, 0xbd, 0x19, 0x1b, 0x4b } \\r
+  }\r
+  \r
+typedef struct _EFI_BLUETOOTH_CONFIG_PROTOCOL EFI_BLUETOOTH_CONFIG_PROTOCOL;\r
+\r
+typedef UINT32      EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE;\r
+#define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_CONNECTED    0x1\r
+#define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_PAIRED       0x2\r
+\r
+///\r
+/// EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION\r
+///\r
+typedef struct {\r
+  ///\r
+  /// 48bit Bluetooth device address.\r
+  ///\r
+  BLUETOOTH_ADDRESS         BDAddr;\r
+  ///\r
+  /// State of the remote deive \r
+  ///\r
+  UINT8                     RemoteDeviceState;\r
+  ///\r
+  /// Bluetooth ClassOfDevice. See Bluetooth specification for detail.\r
+  ///\r
+  BLUETOOTH_CLASS_OF_DEVICE ClassOfDevice;\r
+  ///\r
+  /// Remote device name\r
+  ///\r
+  UINT8                     RemoteDeviceName[BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE];\r
+} EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION;\r
+\r
+///\r
+/// EFI_BLUETOOTH_CONFIG_DATA_TYPE\r
+///\r
+typedef enum {\r
+  ///\r
+  /// Local/Remote Bluetooth device name. Data structure is zero terminated CHAR8[].\r
+  ///\r
+  EfiBluetoothConfigDataTypeDeviceName,\r
+  ///\r
+  /// Local/Remote Bluetooth device ClassOfDevice. Data structure is BLUETOOTH_CLASS_OF_DEVICE.\r
+  ///\r
+  EfiBluetoothConfigDataTypeClassOfDevice,\r
+  ///\r
+  /// Remote Bluetooth device state. Data structure is EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE.\r
+  ///\r
+  EfiBluetoothConfigDataTypeRemoteDeviceState,\r
+  ///\r
+  /// Local/Remote Bluetooth device SDP information. Data structure is UINT8[].\r
+  ///\r
+  EfiBluetoothConfigDataTypeSdpInfo,\r
+  ///\r
+  /// Local Bluetooth device address. Data structure is BLUETOOTH_ADDRESS.\r
+  ///\r
+  EfiBluetoothConfigDataTypeBDADDR,\r
+  ///\r
+  /// Local Bluetooth discoverable state. Data structure is UINT8. (Page scan and/or Inquiry scan)\r
+  ///\r
+  EfiBluetoothConfigDataTypeDiscoverable,\r
+  ///\r
+  /// Local Bluetooth controller stored paired device list. Data structure is BLUETOOTH_ADDRESS[].\r
+  ///\r
+  EfiBluetoothConfigDataTypeControllerStoredPairedDeviceList,\r
+  ///\r
+  /// Local available device list. Data structure is BLUETOOTH_ADDRESS[].\r
+  ///\r
+  EfiBluetoothConfigDataTypeAvailableDeviceList,\r
+  EfiBluetoothConfigDataTypeMax,\r
+} EFI_BLUETOOTH_CONFIG_DATA_TYPE;\r
+\r
+///\r
+/// EFI_BLUETOOTH_PIN_CALLBACK_TYPE.\r
+///\r
+typedef enum {\r
+  ///\r
+  /// For SSP - passkey entry. Input buffer is Passkey (4 bytes). No output buffer. \r
+  /// See Bluetooth HCI command for detail.\r
+  ///\r
+  EfiBluetoothCallbackTypeUserPasskeyNotification,\r
+  ///\r
+  /// For SSP - just work and numeric comparison. Input buffer is numeric value (4 bytes). \r
+  /// Output buffer is BOOLEAN (1 byte). See Bluetooth HCI command for detail.\r
+  ///\r
+  EfiBluetoothCallbackTypeUserConfirmationRequest,\r
+  ///\r
+  /// For SSP - OOB. See Bluetooth HCI command for detail.\r
+  ///\r
+  EfiBluetoothCallbackTypeOOBDataRequest,\r
+  ///\r
+  /// For legacy paring. No input buffer. Output buffer is PIN code( <= 16 bytes). \r
+  /// See Bluetooth HCI command for detail.\r
+  ///\r
+  EfiBluetoothCallbackTypePinCodeRequest,\r
+  EfiBluetoothCallbackTypeMax\r
+} EFI_BLUETOOTH_PIN_CALLBACK_TYPE;\r
+\r
+///\r
+/// EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE.\r
+///\r
+typedef enum {\r
+  ///\r
+  /// This callback is called when Bluetooth receive Disconnection_Complete event. Input buffer is Event \r
+  /// Parameters of Disconnection_Complete Event defined in Bluetooth specification.\r
+  ///\r
+  EfiBluetoothConnCallbackTypeDisconnected,\r
+  ///\r
+  /// This callback is called when Bluetooth receive Connection_Complete event. Input buffer is Event \r
+  /// Parameters of Connection_Complete Event defined in Bluetooth specification.\r
+  ///\r
+  EfiBluetoothConnCallbackTypeConnected,\r
+  ///\r
+  /// This callback is called when Bluetooth receive Authentication_Complete event. Input buffer is Event \r
+  /// Parameters of Authentication_Complete Event defined in Bluetooth specification.\r
+  ///\r
+  EfiBluetoothConnCallbackTypeAuthenticated,\r
+  ///\r
+  /// This callback is called when Bluetooth receive Encryption_Change event. Input buffer is Event \r
+  /// Parameters of Encryption_Change Event defined in Bluetooth specification.\r
+  ///\r
+  EfiBluetoothConnCallbackTypeEncrypted\r
+} EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE;\r
+\r
+  \r
+/**\r
+  Initialize Bluetooth host controller and local device.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth host controller and local device is initialized successfully.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to initialize the Bluetooth host controller \r
+                                and local device.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_INIT)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL  *This\r
+  );\r
+  \r
+/**\r
+  Callback function, it is called if a Bluetooth device is found during scan process.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Context         Context passed from scan request.\r
+  @param  CallbackInfo    Data related to scan result. NULL CallbackInfo means scan complete.\r
+\r
+  @retval EFI_SUCCESS       The callback function complete successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION) (\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL            *This,\r
+  IN VOID                                     *Context,\r
+  IN EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION  *CallbackInfo\r
+  );\r
+  \r
+/**\r
+  Scan Bluetooth device.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  ReScan        If TRUE, a new scan request is submitted no matter there is scan result before. \r
+                        If FALSE and there is scan result, the previous scan result is returned and no scan request \r
+                        is submitted.\r
+  @param  ScanType      Bluetooth scan type, Inquiry and/or Page. See Bluetooth specification for detail.\r
+  @param  Callback      The callback function. This function is called if a Bluetooth device is found during scan \r
+                        process.\r
+  @param  Context       Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth scan request is submitted.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to scan the Bluetooth device.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN BOOLEAN                                        ReScan,\r
+  IN UINT8                                          ScanType,\r
+  IN EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION    Callback,\r
+  IN VOID                                           *Context\r
+  );\r
+  \r
+/**\r
+  Connect a Bluetooth device.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  BD_ADDR       The address of Bluetooth device to be connected.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth device is connected successfully.\r
+  @retval EFI_ALREADY_STARTED   The Bluetooth device is already connected.\r
+  @retval EFI_NOT_FOUND         The Bluetooth device is not found.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to connect the Bluetooth device.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_CONNECT)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN BLUETOOTH_ADDRESS                              *BD_ADDR\r
+  );\r
+\r
+/**\r
+  Disconnect a Bluetooth device.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  BD_ADDR       The address of Bluetooth device to be connected.\r
+  @param  Reason        Bluetooth disconnect reason. See Bluetooth specification for detail.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth device is disconnected successfully.\r
+  @retval EFI_NOT_STARTED       The Bluetooth device is not connected.\r
+  @retval EFI_NOT_FOUND         The Bluetooth device is not found.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to disconnect the Bluetooth device.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_DISCONNECT)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN BLUETOOTH_ADDRESS                              *BD_ADDR,\r
+  IN UINT8                                          Reason\r
+  );\r
+  \r
+/**\r
+  Get Bluetooth configuration data.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  DataType      Configuration data type.\r
+  @param  DataSize      On input, indicates the size, in bytes, of the data buffer specified by Data.\r
+                        On output, indicates the amount of data actually returned.\r
+  @param  Data          A pointer to the buffer of data that will be returned.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth configuration data is returned successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - DataSize is NULL.\r
+                                - *DataSize is 0.\r
+                                - Data is NULL.\r
+  @retval EFI_UNSUPPORTED       The DataType is unsupported.\r
+  @retval EFI_NOT_FOUND         The DataType is not found.\r
+  @retval EFI_BUFFER_TOO_SMALL  The buffer is too small to hold the buffer.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_GET_DATA)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN EFI_BLUETOOTH_CONFIG_DATA_TYPE                 DataType,\r
+  IN OUT UINTN                                      *DataSize,\r
+  IN OUT VOID                                       *Data\r
+  );\r
+  \r
+/**\r
+  Set Bluetooth configuration data.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  DataType      Configuration data type.\r
+  @param  DataSize      Indicates the size, in bytes, of the data buffer specified by Data.\r
+  @param  Data          A pointer to the buffer of data that will be set.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth configuration data is set successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - DataSize is 0.\r
+                                - Data is NULL.\r
+  @retval EFI_UNSUPPORTED       The DataType is unsupported.\r
+  @retval EFI_BUFFER_TOO_SMALL  Cannot set configuration data.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_SET_DATA)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN EFI_BLUETOOTH_CONFIG_DATA_TYPE                 DataType,\r
+  IN UINTN                                          DataSize,\r
+  IN VOID                                           *Data\r
+  );\r
+  \r
+/**\r
+  Get remove Bluetooth device configuration data.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  DataType      Configuration data type.\r
+  @param  BDAddr        Remote Bluetooth device address.\r
+  @param  DataSize      On input, indicates the size, in bytes, of the data buffer specified by Data.\r
+                        On output, indicates the amount of data actually returned.\r
+  @param  Data          A pointer to the buffer of data that will be returned.\r
+\r
+  @retval EFI_SUCCESS           The remote Bluetooth device configuration data is returned successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - DataSize is NULL.\r
+                                - *DataSize is 0.\r
+                                - Data is NULL.\r
+  @retval EFI_UNSUPPORTED       The DataType is unsupported.\r
+  @retval EFI_NOT_FOUND         The DataType is not found.\r
+  @retval EFI_BUFFER_TOO_SMALL  The buffer is too small to hold the buffer.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN EFI_BLUETOOTH_CONFIG_DATA_TYPE                 DataType,\r
+  IN BLUETOOTH_ADDRESS                              BDAddr,\r
+  IN OUT UINTN                                      *DataSize,\r
+  IN OUT VOID                                       *Data\r
+  );\r
+  \r
+/**\r
+  The callback function for PIN code.\r
+\r
+  @param  This                Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Context             Context passed from registration.\r
+  @param  CallbackType        Callback type in EFI_BLUETOOTH_PIN_CALLBACK_TYPE.\r
+  @param  InputBuffer         A pointer to the buffer of data that is input from callback caller.\r
+  @param  InputBufferSize     Indicates the size, in bytes, of the data buffer specified by InputBuffer.\r
+  @param  OutputBuffer        A pointer to the buffer of data that will be output from callback callee. \r
+                              Callee allocates this buffer by using EFI Boot Service AllocatePool().\r
+  @param  OutputBufferSize    Indicates the size, in bytes, of the data buffer specified by OutputBuffer.\r
+\r
+  @retval EFI_SUCCESS   The callback function complete successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK_FUNCTION)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                        *This,\r
+  IN VOID                                                 *Context,\r
+  IN EFI_BLUETOOTH_PIN_CALLBACK_TYPE                      CallbackType,\r
+  IN VOID                                                 *InputBuffer,\r
+  IN UINTN                                                InputBufferSize,\r
+  OUT VOID                                                **OutputBuffer,\r
+  OUT UINTN                                               *OutputBufferSize\r
+  );\r
+  \r
+/**\r
+  Register PIN callback function.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Callback      The callback function. NULL means unregister.\r
+  @param  Context       Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS   The PIN callback function is registered successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                        *This,\r
+  IN EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK_FUNCTION  Callback,\r
+  IN VOID                                                 *Context\r
+  );\r
+\r
+/**\r
+  The callback function to get link key.\r
+\r
+  @param  This                Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Context             Context passed from registration.\r
+  @param  BDAddr              A pointer to Bluetooth device address.\r
+  @param  LinkKey             A pointer to the buffer of link key.\r
+\r
+  @retval EFI_SUCCESS   The callback function complete successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK_FUNCTION)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL        *This,\r
+  IN VOID                                 *Context,\r
+  IN BLUETOOTH_ADDRESS                    *BDAddr,\r
+  OUT UINT8                               LinkKey[BLUETOOTH_HCI_LINK_KEY_SIZE]\r
+  );\r
+  \r
+/**\r
+  Register get link key callback function.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Callback      The callback function. NULL means unregister.\r
+  @param  Context       Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS   The link key callback function is registered successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                                  *This,\r
+  IN EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK_FUNCTION   Callback,\r
+  IN VOID                                                           *Context\r
+  );\r
+  \r
+/**\r
+  The callback function to set link key.\r
+\r
+  @param  This                Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Context             Context passed from registration.\r
+  @param  BDAddr              A pointer to Bluetooth device address.\r
+  @param  LinkKey             A pointer to the buffer of link key.\r
+\r
+  @retval EFI_SUCCESS   The callback function complete successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK_FUNCTION)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL        *This,\r
+  IN VOID                                 *Context,\r
+  IN BLUETOOTH_ADDRESS                    *BDAddr,\r
+  IN UINT8                                LinkKey[BLUETOOTH_HCI_LINK_KEY_SIZE]\r
+  );\r
+  \r
+/**\r
+  Register set link key callback function.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Callback      The callback function. NULL means unregister.\r
+  @param  Context       Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS   The link key callback function is registered successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                                  *This,\r
+  IN EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK_FUNCTION   Callback,\r
+  IN VOID                                                           *Context\r
+  );\r
+  \r
+/**\r
+  The callback function. It is called after connect completed.\r
+\r
+  @param  This                Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Context             Context passed from registration.\r
+  @param  CallbackType        Callback type in EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE.\r
+  @param  BDAddr              A pointer to Bluetooth device address.\r
+  @param  InputBuffer         A pointer to the buffer of data that is input from callback caller.\r
+  @param  InputBufferSize     Indicates the size, in bytes, of the data buffer specified by InputBuffer.\r
+\r
+  @retval EFI_SUCCESS   The callback function complete successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK_FUNCTION)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
+  IN VOID                                           *Context,\r
+  IN EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE   CallbackType,\r
+  IN BLUETOOTH_ADDRESS                              *BDAddr,\r
+  IN VOID                                           *InputBuffer,\r
+  IN UINTN                                          InputBufferSize\r
+  );\r
+  \r
+/**\r
+  Register link connect complete callback function.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
+  @param  Callback      The callback function. NULL means unregister.\r
+  @param  Context       Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS   The link connect complete callback function is registered successfully.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK)(\r
+  IN EFI_BLUETOOTH_CONFIG_PROTOCOL                                      *This,\r
+  IN EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK_FUNCTION   Callback,\r
+  IN VOID                                                               *Context\r
+  );\r
+  \r
+///\r
+/// This protocol abstracts user interface configuration for Bluetooth device.\r
+///\r
+struct _EFI_BLUETOOTH_CONFIG_PROTOCOL {\r
+  EFI_BLUETOOTH_CONFIG_INIT                               Init;\r
+  EFI_BLUETOOTH_CONFIG_SCAN                               Scan;\r
+  EFI_BLUETOOTH_CONFIG_CONNECT                            Connect;\r
+  EFI_BLUETOOTH_CONFIG_DISCONNECT                         Disconnect;\r
+  EFI_BLUETOOTH_CONFIG_GET_DATA                           GetData;\r
+  EFI_BLUETOOTH_CONFIG_SET_DATA                           SetData;\r
+  EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA                    GetRemoteData;\r
+  EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK              RegisterPinCallback;\r
+  EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK     RegisterGetLinkKeyCallback;\r
+  EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK     RegisterSetLinkKeyCallback;\r
+  EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback;\r
+};\r
+\r
+extern EFI_GUID gEfiBluetoothConfigProtocolGuid;\r
+\r
+#endif\r
diff --git a/MdePkg/Include/Protocol/BluetoothHc.h b/MdePkg/Include/Protocol/BluetoothHc.h
new file mode 100644 (file)
index 0000000..37b7602
--- /dev/null
@@ -0,0 +1,328 @@
+/** @file\r
+  EFI Bluetooth Host Controller Protocol as defined in UEFI 2.5.\r
+  This protocol abstracts the Bluetooth host controller layer message transmit and receive.\r
+\r
+  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under \r
+  the terms and conditions of the BSD License that accompanies this distribution.  \r
+  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.5\r
+\r
+**/\r
+\r
+#ifndef __EFI_BLUETOOTH_HC_PROTOCOL_H__\r
+#define __EFI_BLUETOOTH_HC_PROTOCOL_H__\r
+\r
+#define EFI_BLUETOOTH_HC_PROTOCOL_GUID \\r
+  { \\r
+    0xb3930571, 0xbeba, 0x4fc5, { 0x92, 0x3, 0x94, 0x27, 0x24, 0x2e, 0x6a, 0x43 } \\r
+  }\r
+  \r
+typedef struct _EFI_BLUETOOTH_HC_PROTOCOL EFI_BLUETOOTH_HC_PROTOCOL;\r
+\r
+/**\r
+  Send HCI command packet.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  BufferSize    On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                        On output, indicates the amount of data actually transferred.\r
+  @param  Buffer        A pointer to the buffer of data that will be transmitted to Bluetooth host \r
+                        controller.\r
+  @param  Timeout       Indicating the transfer should be completed within this time frame. The units are \r
+                        in milliseconds. If Timeout is 0, then the caller must wait for the function to \r
+                        be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS           The HCI command packet is sent successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - BufferSize is NULL.\r
+                                - *BufferSize is 0.\r
+                                - Buffer is NULL.\r
+  @retval EFI_TIMEOUT           Sending HCI command packet fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR      Sending HCI command packet fail due to host controller or device error.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_SEND_COMMAND)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  IN VOID                       *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+\r
+/**\r
+  Receive HCI event packet.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  BufferSize    On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                        On output, indicates the amount of data actually transferred.\r
+  @param  Buffer        A pointer to the buffer of data that will be received from Bluetooth host controller.\r
+  @param  Timeout       Indicating the transfer should be completed within this time frame. The units are \r
+                        in milliseconds. If Timeout is 0, then the caller must wait for the function to \r
+                        be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS           The HCI event packet is received successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - BufferSize is NULL.\r
+                                - *BufferSize is 0.\r
+                                - Buffer is NULL.\r
+  @retval EFI_TIMEOUT           Receiving HCI event packet fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR      Receiving HCI event packet fail due to host controller or device error.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_RECEIVE_EVENT)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  OUT VOID                      *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Callback function, it is called when asynchronous transfer is completed.\r
+\r
+  @param  Data              Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  DataLength        Specifies the length, in bytes, of the data to be received.\r
+  @param  Context           Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS             The callback function complete successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK) (\r
+  IN VOID                       *Data,\r
+  IN UINTN                      DataLength,\r
+  IN VOID                       *Context\r
+  );\r
+  \r
+/**\r
+  Receive HCI event packet in non-blocking way.\r
+\r
+  @param  This              Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  IsNewTransfer     If TRUE, a new transfer will be submitted. If FALSE, the request is deleted.\r
+  @param  PollingInterval   Indicates the periodic rate, in milliseconds, that the transfer is to be executed.\r
+  @param  DataLength        Specifies the length, in bytes, of the data to be received.\r
+  @param  Callback          The callback function. This function is called if the asynchronous transfer is \r
+                            completed.\r
+  @param  Context           Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS           The HCI asynchronous receive request is submitted successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - DataLength is 0.\r
+                                - If IsNewTransfer is TRUE, and an asynchronous receive request already exists.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_EVENT)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL            *This,\r
+  IN BOOLEAN                              IsNewTransfer,\r
+  IN UINTN                                PollingInterval,\r
+  IN UINTN                                DataLength,\r
+  IN EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK Callback,\r
+  IN VOID                                 *Context\r
+  );\r
+  \r
+/**\r
+  Send HCI ACL data packet.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  BufferSize    On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                        On output, indicates the amount of data actually transferred.\r
+  @param  Buffer        A pointer to the buffer of data that will be transmitted to Bluetooth host \r
+                        controller.\r
+  @param  Timeout       Indicating the transfer should be completed within this time frame. The units are \r
+                        in milliseconds. If Timeout is 0, then the caller must wait for the function to \r
+                        be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS           The HCI ACL data packet is sent successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - BufferSize is NULL.\r
+                                - *BufferSize is 0.\r
+                                - Buffer is NULL.\r
+  @retval EFI_TIMEOUT           Sending HCI ACL data packet fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR      Sending HCI ACL data packet fail due to host controller or device error.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_SEND_ACL_DATA)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  IN VOID                       *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Receive HCI ACL data packet.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  BufferSize    On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                        On output, indicates the amount of data actually transferred.\r
+  @param  Buffer        A pointer to the buffer of data that will be received from Bluetooth host controller.\r
+  @param  Timeout       Indicating the transfer should be completed within this time frame. The units are \r
+                        in milliseconds. If Timeout is 0, then the caller must wait for the function to \r
+                        be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS           The HCI ACL data packet is received successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - BufferSize is NULL.\r
+                                - *BufferSize is 0.\r
+                                - Buffer is NULL.\r
+  @retval EFI_TIMEOUT           Receiving HCI ACL data packet fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR      Receiving HCI ACL data packet fail due to host controller or device error.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_RECEIVE_ACL_DATA)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  OUT VOID                      *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+\r
+/**\r
+  Receive HCI ACL data packet in non-blocking way.\r
+\r
+  @param  This              Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  IsNewTransfer     If TRUE, a new transfer will be submitted. If FALSE, the request is deleted.\r
+  @param  PollingInterval   Indicates the periodic rate, in milliseconds, that the transfer is to be executed.\r
+  @param  DataLength        Specifies the length, in bytes, of the data to be received.\r
+  @param  Callback          The callback function. This function is called if the asynchronous transfer is \r
+                            completed.\r
+  @param  Context           Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS           The HCI asynchronous receive request is submitted successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - DataLength is 0.\r
+                                - If IsNewTransfer is TRUE, and an asynchronous receive request already exists.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_ACL_DATA) (\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL            *This,\r
+  IN BOOLEAN                              IsNewTransfer,\r
+  IN UINTN                                PollingInterval,\r
+  IN UINTN                                DataLength,\r
+  IN EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK Callback,\r
+  IN VOID                                 *Context\r
+  );\r
+  \r
+/**\r
+  Send HCI SCO data packet.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  BufferSize    On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                        On output, indicates the amount of data actually transferred.\r
+  @param  Buffer        A pointer to the buffer of data that will be transmitted to Bluetooth host \r
+                        controller.\r
+  @param  Timeout       Indicating the transfer should be completed within this time frame. The units are \r
+                        in milliseconds. If Timeout is 0, then the caller must wait for the function to \r
+                        be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS           The HCI SCO data packet is sent successfully.\r
+  @retval EFI_UNSUPPORTED       The implementation does not support HCI SCO transfer.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - BufferSize is NULL.\r
+                                - *BufferSize is 0.\r
+                                - Buffer is NULL.\r
+  @retval EFI_TIMEOUT           Sending HCI SCO data packet fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR      Sending HCI SCO data packet fail due to host controller or device error.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_SEND_SCO_DATA)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  IN VOID                       *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Receive HCI SCO data packet.\r
+\r
+  @param  This          Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  BufferSize    On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                        On output, indicates the amount of data actually transferred.\r
+  @param  Buffer        A pointer to the buffer of data that will be received from Bluetooth host controller.\r
+  @param  Timeout       Indicating the transfer should be completed within this time frame. The units are \r
+                        in milliseconds. If Timeout is 0, then the caller must wait for the function to \r
+                        be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS           The HCI SCO data packet is received successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - BufferSize is NULL.\r
+                                - *BufferSize is 0.\r
+                                - Buffer is NULL.\r
+  @retval EFI_TIMEOUT           Receiving HCI SCO data packet fail due to timeout\r
+  @retval EFI_DEVICE_ERROR      Receiving HCI SCO data packet fail due to host controller or device error.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_RECEIVE_SCO_DATA)(\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  OUT VOID                      *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+\r
+/**\r
+  Receive HCI SCO data packet in non-blocking way.\r
+\r
+  @param  This              Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.\r
+  @param  IsNewTransfer     If TRUE, a new transfer will be submitted. If FALSE, the request is deleted.\r
+  @param  PollingInterval   Indicates the periodic rate, in milliseconds, that the transfer is to be executed.\r
+  @param  DataLength        Specifies the length, in bytes, of the data to be received.\r
+  @param  Callback          The callback function. This function is called if the asynchronous transfer is \r
+                            completed.\r
+  @param  Context           Data passed into Callback function. This is optional parameter and may be NULL.\r
+\r
+  @retval EFI_SUCCESS           The HCI asynchronous receive request is submitted successfully.\r
+  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+                                - DataLength is 0.\r
+                                - If IsNewTransfer is TRUE, and an asynchronous receive request already exists.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA) (\r
+  IN EFI_BLUETOOTH_HC_PROTOCOL            *This,\r
+  IN BOOLEAN                              IsNewTransfer,\r
+  IN UINTN                                PollingInterval,\r
+  IN UINTN                                DataLength,\r
+  IN EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK Callback,\r
+  IN VOID                                 *Context\r
+  );\r
+  \r
+///\r
+/// This protocol abstracts the Bluetooth host controller layer message transmit and receive.\r
+///\r
+struct _EFI_BLUETOOTH_HC_PROTOCOL {\r
+  EFI_BLUETOOTH_HC_SEND_COMMAND               SendCommand;\r
+  EFI_BLUETOOTH_HC_RECEIVE_EVENT              ReceiveEvent;\r
+  EFI_BLUETOOTH_HC_ASYNC_RECEIVE_EVENT        AsyncReceiveEvent;\r
+  EFI_BLUETOOTH_HC_SEND_ACL_DATA              SendACLData;\r
+  EFI_BLUETOOTH_HC_RECEIVE_ACL_DATA           ReceiveACLData;\r
+  EFI_BLUETOOTH_HC_ASYNC_RECEIVE_ACL_DATA     AsyncReceiveACLData;\r
+  EFI_BLUETOOTH_HC_SEND_SCO_DATA              SendSCOData;\r
+  EFI_BLUETOOTH_HC_RECEIVE_SCO_DATA           ReceiveSCOData;\r
+  EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA     AsyncReceiveSCOData;\r
+};\r
+  \r
+extern EFI_GUID gEfiBluetoothHcProtocolGuid;\r
+\r
+#endif\r
diff --git a/MdePkg/Include/Protocol/BluetoothIo.h b/MdePkg/Include/Protocol/BluetoothIo.h
new file mode 100644 (file)
index 0000000..d750767
--- /dev/null
@@ -0,0 +1,416 @@
+/** @file\r
+  EFI Bluetooth IO Service Binding Protocol as defined in UEFI 2.5.\r
+  EFI Bluetooth IO Protocol as defined in UEFI 2.5.\r
+  The EFI Bluetooth IO Service Binding Protocol is used to locate EFI Bluetooth IO Protocol drivers to \r
+  create and destroy child of the driver to communicate with other Bluetooth device by using Bluetooth IO protocol.\r
+\r
+  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under \r
+  the terms and conditions of the BSD License that accompanies this distribution.  \r
+  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.5\r
+\r
+**/\r
+\r
+#ifndef __EFI_BLUETOOTH_IO_PROTOCOL_H__\r
+#define __EFI_BLUETOOTH_IO_PROTOCOL_H__\r
+\r
+#include <IndustryStandard/Bluetooth.h>\r
+\r
+#define EFI_BLUETOOTH_IO_SERVICE_BINDING_PROTOCOL_GUID \\r
+  { \\r
+    0x388278d3, 0x7b85, 0x42f0, { 0xab, 0xa9, 0xfb, 0x4b, 0xfd, 0x69, 0xf5, 0xab   } \\r
+  }\r
+  \r
+#define EFI_BLUETOOTH_IO_PROTOCOL_GUID \\r
+  { \\r
+    0x467313de, 0x4e30, 0x43f1, { 0x94, 0x3e, 0x32, 0x3f, 0x89, 0x84, 0x5d, 0xb5  } \\r
+  }\r
+  \r
+typedef struct _EFI_BLUETOOTH_IO_PROTOCOL EFI_BLUETOOTH_IO_PROTOCOL;\r
+\r
+///\r
+/// EFI_BLUETOOTH_DEVICE_INFO\r
+///\r
+typedef struct {\r
+  ///\r
+  /// The version of the structure\r
+  ///\r
+  UINT32                      Version;\r
+  ///\r
+  /// 48bit Bluetooth device address.\r
+  ///\r
+  BLUETOOTH_ADDRESS           BD_ADDR;\r
+  ///\r
+  /// Bluetooth PageScanRepetitionMode. See Bluetooth specification for detail.\r
+  ///\r
+  UINT8                       PageScanRepetitionMode;\r
+  ///\r
+  /// Bluetooth ClassOfDevice. See Bluetooth specification for detail.\r
+  ///\r
+  BLUETOOTH_CLASS_OF_DEVICE   ClassOfDevice;\r
+  ///\r
+  /// Bluetooth CloseOffset. See Bluetooth specification for detail.\r
+  ///\r
+  UINT16                      ClockOffset;\r
+  ///\r
+  /// Bluetooth RSSI. See Bluetooth specification for detail.\r
+  ///\r
+  UINT8                       RSSI;\r
+  ///\r
+  /// Bluetooth ExtendedInquiryResponse. See Bluetooth specification for detail.\r
+  ///\r
+  UINT8                       ExtendedInquiryResponse[240];\r
+} EFI_BLUETOOTH_DEVICE_INFO;\r
+\r
+/**\r
+  Get Bluetooth device information.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  DeviceInfoSize  A pointer to the size, in bytes, of the DeviceInfo buffer.\r
+  @param  DeviceInfo      A pointer to a callee allocated buffer that returns Bluetooth device information.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth device information is returned successfully.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to retrieve the Bluetooth device information.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_GET_DEVICE_INFO)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL  *This,\r
+  OUT UINTN                     *DeviceInfoSize,\r
+  OUT VOID                      **DeviceInfo\r
+  );\r
+  \r
+/**\r
+  Get Bluetooth SDP information.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  SdpInfoSize     A pointer to the size, in bytes, of the SdpInfo buffer.\r
+  @param  SdpInfo         A pointer to a callee allocated buffer that returns Bluetooth SDP information.\r
+\r
+  @retval EFI_SUCCESS           The Bluetooth device information is returned successfully.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to retrieve the Bluetooth SDP information.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_GET_SDP_INFO)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL  *This,\r
+  OUT UINTN                     *SdpInfoSize,\r
+  OUT VOID                      **SdpInfo\r
+  );\r
+  \r
+/**\r
+  Send L2CAP message (including L2CAP header).\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  BufferSize      On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                          On output, indicates the amount of data actually transferred.\r
+  @param  Buffer          A pointer to the buffer of data that will be transmitted to Bluetooth L2CAP layer.\r
+  @param  Timeout         Indicating the transfer should be completed within this time frame. The units are in \r
+                          milliseconds. If Timeout is 0, then the caller must wait for the function to be completed \r
+                          until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS             The L2CAP message is sent successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - BufferSize is NULL.\r
+                                  - *BufferSize is 0.\r
+                                  - Buffer is NULL.\r
+  @retval EFI_TIMEOUT             Sending L2CAP message fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR        Sending L2CAP message fail due to host controller or device error.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_RAW_SEND)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  IN VOID                       *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Receive L2CAP message (including L2CAP header).\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  BufferSize      On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                          On output, indicates the amount of data actually transferred.\r
+  @param  Buffer          A pointer to the buffer of data that will be received from Bluetooth L2CAP layer.\r
+  @param  Timeout         Indicating the transfer should be completed within this time frame. The units are in \r
+                          milliseconds. If Timeout is 0, then the caller must wait for the function to be completed \r
+                          until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS             The L2CAP message is received successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - BufferSize is NULL.\r
+                                  - *BufferSize is 0.\r
+                                  - Buffer is NULL.\r
+  @retval EFI_TIMEOUT             Receiving L2CAP message fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR        Receiving L2CAP message fail due to host controller or device error.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_RAW_RECEIVE)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL  *This,\r
+  IN OUT UINTN                  *BufferSize,\r
+  OUT VOID                      *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Callback function, it is called when asynchronous transfer is completed.\r
+\r
+  @param  ChannelID         Bluetooth L2CAP message channel ID.\r
+  @param  Data              Data received via asynchronous transfer.\r
+  @param  DataLength        The length of Data in bytes, received via asynchronous transfer.\r
+  @param  Context           Context passed from asynchronous transfer request.\r
+\r
+  @retval EFI_SUCCESS       The callback function complete successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK) (\r
+  IN UINT16                     ChannelID,\r
+  IN VOID                       *Data,\r
+  IN UINTN                      DataLength,\r
+  IN VOID                       *Context\r
+  );\r
+  \r
+/**\r
+  Receive L2CAP message (including L2CAP header) in non-blocking way.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  IsNewTransfer   If TRUE, a new transfer will be submitted. If FALSE, the request is deleted.\r
+  @param  PollingInterval Indicates the periodic rate, in milliseconds, that the transfer is to be executed.\r
+  @param  DataLength      Specifies the length, in bytes, of the data to be received.\r
+  @param  Callback        The callback function. This function is called if the asynchronous transfer is \r
+                          completed.\r
+  @param  Context         Data passed into Callback function. This is optional parameter and may be NULL. \r
+  \r
+  @retval EFI_SUCCESS             The L2CAP asynchronous receive request is submitted successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - DataLength is 0.\r
+                                  - If IsNewTransfer is TRUE, and an asynchronous receive request already exists.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_RAW_ASYNC_RECEIVE)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL              *This,\r
+  IN BOOLEAN                                IsNewTransfer,\r
+  IN UINTN                                  PollingInterval,\r
+  IN UINTN                                  DataLength,\r
+  IN EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK   Callback,\r
+  IN VOID                                   *Context\r
+  );\r
+\r
+/**\r
+  Send L2CAP message (excluding L2CAP header) to a specific channel.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  Handle          A handle created by EFI_BLUETOOTH_IO_PROTOCOL.L2CapConnect indicates which channel to send.\r
+  @param  BufferSize      On input, indicates the size, in bytes, of the data buffer specified by Buffer. \r
+                          On output, indicates the amount of data actually transferred.\r
+  @param  Buffer          A pointer to the buffer of data that will be transmitted to Bluetooth L2CAP layer.\r
+  @param  Timeout         Indicating the transfer should be completed within this time frame. The units are in \r
+                          milliseconds. If Timeout is 0, then the caller must wait for the function to be completed \r
+                          until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS             The L2CAP message is sent successfully.\r
+  @retval EFI_NOT_FOUND           Handle is invalid or not found.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - BufferSize is NULL.\r
+                                  - *BufferSize is 0.\r
+                                  - Buffer is NULL.\r
+  @retval EFI_TIMEOUT             Sending L2CAP message fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR        Sending L2CAP message fail due to host controller or device error.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_SEND)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL  *This,\r
+  IN EFI_HANDLE                 Handle,\r
+  IN OUT UINTN                  *BufferSize,\r
+  IN VOID                       *Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Receive L2CAP message (excluding L2CAP header) from a specific channel.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  Handle          A handle created by EFI_BLUETOOTH_IO_PROTOCOL.L2CapConnect indicates which channel to receive.\r
+  @param  BufferSize      Indicates the size, in bytes, of the data buffer specified by Buffer.\r
+  @param  Buffer          A pointer to the buffer of data that will be received from Bluetooth L2CAP layer.\r
+  @param  Timeout         Indicating the transfer should be completed within this time frame. The units are in \r
+                          milliseconds. If Timeout is 0, then the caller must wait for the function to be completed \r
+                          until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+\r
+  @retval EFI_SUCCESS             The L2CAP message is received successfully.\r
+  @retval EFI_NOT_FOUND           Handle is invalid or not found.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - BufferSize is NULL.\r
+                                  - *BufferSize is 0.\r
+                                  - Buffer is NULL.\r
+  @retval EFI_TIMEOUT             Receiving L2CAP message fail due to timeout.\r
+  @retval EFI_DEVICE_ERROR        Receiving L2CAP message fail due to host controller or device error.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_RECEIVE)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL  *This,\r
+  IN EFI_HANDLE                 Handle,\r
+  OUT UINTN                     *BufferSize,\r
+  OUT VOID                      **Buffer,\r
+  IN UINTN                      Timeout\r
+  );\r
+  \r
+/**\r
+  Callback function, it is called when asynchronous transfer is completed.\r
+\r
+  @param  Data              Data received via asynchronous transfer.\r
+  @param  DataLength        The length of Data in bytes, received via asynchronous transfer.\r
+  @param  Context           Context passed from asynchronous transfer request.\r
+\r
+  @retval EFI_SUCCESS       The callback function complete successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK) (\r
+  IN VOID                       *Data,\r
+  IN UINTN                      DataLength,\r
+  IN VOID                       *Context\r
+  );\r
+  \r
+/**\r
+  Receive L2CAP message (excluding L2CAP header) in non-blocking way from a specific channel.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  Handel          A handle created by EFI_BLUETOOTH_IO_PROTOCOL.L2CapConnect indicates which channel to receive.\r
+  @param  Callback        The callback function. This function is called if the asynchronous transfer is \r
+                          completed.\r
+  @param  Context         Data passed into Callback function. This is optional parameter and may be NULL. \r
+  \r
+  @retval EFI_SUCCESS             The L2CAP asynchronous receive request is submitted successfully.\r
+  @retval EFI_NOT_FOUND           Handle is invalid or not found.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - DataLength is 0.\r
+                                  - If an asynchronous receive request already exists on same Handle.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_ASYNC_RECEIVE)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL                    *This,\r
+  IN EFI_HANDLE                                   Handle,\r
+  IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK    Callback,\r
+  IN VOID                                         *Context\r
+  );\r
+  \r
+/**\r
+  Do L2CAP connection.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  Handel          A handle to indicate this L2CAP connection.\r
+  @param  Psm             Bluetooth PSM. See Bluetooth specification for detail.\r
+  @param  Mtu             Bluetooth MTU. See Bluetooth specification for detail.\r
+  @param  Callback        The callback function. This function is called whenever there is message received \r
+                          in this channel.\r
+  @param  Context         Data passed into Callback function. This is optional parameter and may be NULL.\r
+  \r
+  @retval EFI_SUCCESS             The Bluetooth L2CAP layer connection is created successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  - Handle is NULL.\r
+  @retval EFI_DEVICE_ERROR        A hardware error occurred trying to do Bluetooth L2CAP connection.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_CONNECT)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL                    *This,\r
+  OUT EFI_HANDLE                                  *Handle,\r
+  IN UINT16                                       Psm,\r
+  IN UINT16                                       Mtu,\r
+  IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK    Callback,\r
+  IN VOID                                         *Context\r
+  );\r
+  \r
+/**\r
+  Do L2CAP disconnection.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  Handel          A handle to indicate this L2CAP connection.\r
+  \r
+  @retval EFI_SUCCESS             The Bluetooth L2CAP layer is disconnected successfully.\r
+  @retval EFI_NOT_FOUND           Handle is invalid or not found.\r
+  @retval EFI_DEVICE_ERROR        A hardware error occurred trying to do Bluetooth L2CAP disconnection.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_DISCONNECT)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL                    *This,\r
+  IN EFI_HANDLE                                   Handle\r
+  );\r
+  \r
+/**\r
+  Register L2CAP callback function for special channel.\r
+\r
+  @param  This            Pointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.\r
+  @param  Handel          A handle to indicate this L2CAP connection.\r
+  @param  Psm             Bluetooth PSM. See Bluetooth specification for detail.\r
+  @param  Mtu             Bluetooth MTU. See Bluetooth specification for detail.\r
+  @param  Callback        The callback function. This function is called whenever there is message received \r
+                          in this channel. NULL means unregister.\r
+  @param  Context         Data passed into Callback function. This is optional parameter and may be NULL.\r
+  \r
+  @retval EFI_SUCCESS             The Bluetooth L2CAP callback function is registered successfully.\r
+  @retval EFI_ALREADY_STARTED     The callback function already exists when register.\r
+  @retval EFI_NOT_FOUND           The callback function does not exist when unregister.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *EFI_BLUETOOTH_IO_L2CAP_REGISTER_SERVICE)(\r
+  IN EFI_BLUETOOTH_IO_PROTOCOL                    *This,\r
+  OUT EFI_HANDLE                                  *Handle,\r
+  IN UINT16                                       Psm,\r
+  IN UINT16                                       Mtu,\r
+  IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK    Callback,\r
+  IN VOID                                         *Context\r
+  );\r
+  \r
+///\r
+/// This protocol provides service for Bluetooth L2CAP (Logical Link Control and Adaptation Protocol) \r
+/// and SDP (Service Discovery Protocol).\r
+///\r
+struct _EFI_BLUETOOTH_IO_PROTOCOL {\r
+  EFI_BLUETOOTH_IO_GET_DEVICE_INFO            GetDeviceInfo;\r
+  EFI_BLUETOOTH_IO_GET_SDP_INFO               GetSdpInfo;\r
+  EFI_BLUETOOTH_IO_L2CAP_RAW_SEND             L2CapRawSend;\r
+  EFI_BLUETOOTH_IO_L2CAP_RAW_RECEIVE          L2CapRawReceive;\r
+  EFI_BLUETOOTH_IO_L2CAP_RAW_ASYNC_RECEIVE    L2CapRawAsyncReceive;\r
+  EFI_BLUETOOTH_IO_L2CAP_SEND                 L2CapSend;\r
+  EFI_BLUETOOTH_IO_L2CAP_RECEIVE              L2CapReceive;\r
+  EFI_BLUETOOTH_IO_L2CAP_ASYNC_RECEIVE        L2CapAsyncReceive;\r
+  EFI_BLUETOOTH_IO_L2CAP_CONNECT              L2CapConnect;\r
+  EFI_BLUETOOTH_IO_L2CAP_DISCONNECT           L2CapDisconnect;\r
+  EFI_BLUETOOTH_IO_L2CAP_REGISTER_SERVICE     L2CapRegisterService;\r
+};\r
+\r
+extern EFI_GUID gEfiBluetoothIoServiceBindingProtocolGuid;\r
+extern EFI_GUID gEfiBluetoothIoProtocolGuid;\r
+\r
+#endif\r
index 7cf711302079ba2336076ddbdc89b345bef868e2..05e0d019b719ac7612921e1b551e72d9f855c782 100644 (file)
@@ -5,7 +5,7 @@
   from a software point of view. The path must persist from boot to boot, so \r
   it can not contain things like PCI bus numbers that change from boot to boot.\r
 \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define __EFI_DEVICE_PATH_PROTOCOL_H__\r
 \r
 #include <Guid/PcAnsi.h>\r
-\r
+#include <IndustryStandard/Bluetooth.h>\r
 ///\r
 /// Device Path protocol.\r
 ///\r
@@ -846,6 +846,18 @@ typedef struct {
   UINT16                          VlanId;\r
 } VLAN_DEVICE_PATH;\r
 \r
+///\r
+/// Bluetooth Device Path SubType.\r
+///\r
+#define MSG_BLUETOOTH_DP     0x1b\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// 48bit Bluetooth device address.\r
+  ///\r
+  BLUETOOTH_ADDRESS               BD_ADDR;\r
+} BLUETOOTH_DEVICE_PATH;\r
+\r
 //\r
 // Media Device Path\r
 //\r
@@ -1094,6 +1106,7 @@ typedef union {
   SAS_DEVICE_PATH                            Sas;\r
   SASEX_DEVICE_PATH                          SasEx;\r
   NVME_NAMESPACE_DEVICE_PATH                 NvmeNamespace;\r
+  BLUETOOTH_DEVICE_PATH                      Bluetooth;\r
   HARDDRIVE_DEVICE_PATH                      HardDrive;\r
   CDROM_DEVICE_PATH                          CD;\r
 \r
@@ -1144,6 +1157,7 @@ typedef union {
   SAS_DEVICE_PATH                            *Sas;\r
   SASEX_DEVICE_PATH                          *SasEx;\r
   NVME_NAMESPACE_DEVICE_PATH                 *NvmeNamespace;\r
+  BLUETOOTH_DEVICE_PATH                      *Bluetooth;\r
   HARDDRIVE_DEVICE_PATH                      *HardDrive;\r
   CDROM_DEVICE_PATH                          *CD;\r
 \r
index 494dfba0394b9e5c54a63f4831f21cec23f24126..dfc8e90aae8da30592cdbef9e5799ae52c7e706f 100644 (file)
 \r
   ## Include/Protocol/AdapterInformation.h\r
   gEfiAdapterInformationProtocolGuid    = { 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 }}\r
+  \r
+  #\r
+  # Protocols defined in UEFI2.5\r
+  #\r
+  ## Include/Protocol/BluetoothHc.h\r
+  gEfiBluetoothHcProtocolGuid         = { 0xb3930571, 0xbeba, 0x4fc5, { 0x92, 0x3, 0x94, 0x27, 0x24, 0x2e, 0x6a, 0x43 }}\r
+  \r
+  ## Include/Protocol/BluetoothIo.h\r
+  gEfiBluetoothIoServiceBindingProtocolGuid   = { 0x388278d3, 0x7b85, 0x42f0, { 0xab, 0xa9, 0xfb, 0x4b, 0xfd, 0x69, 0xf5, 0xab }}\r
+  gEfiBluetoothIoProtocolGuid                 = { 0x467313de, 0x4e30, 0x43f1, { 0x94, 0x3e, 0x32, 0x3f, 0x89, 0x84, 0x5d, 0xb5 }}\r
+  \r
+  ## Include/Protocol/BluetoothConfig.h\r
+  gEfiBluetoothConfigProtocolGuid             = { 0x62960cf3, 0x40ff, 0x4263, { 0xa7, 0x7c, 0xdf, 0xde, 0xbd, 0x19, 0x1b, 0x4b }}\r
+  \r
 \r
 #\r
 # [Error.gEfiMdePkgTokenSpaceGuid]\r