]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ppi/Smbus2.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Ppi / Smbus2.h
index ce58ab310b6e030a46dfaa93d22cefa1fb0d7c52..3e386b823b65baa55e5fbdf594476abce188c475 100644 (file)
@@ -1,20 +1,13 @@
 /** @file\r
   This file declares Smbus2 PPI.\r
-  This PPI provides the basic I/O interfaces that a PEIM uses to access its \r
+  This PPI provides the basic I/O interfaces that a PEIM uses to access its\r
   SMBus controller and the slave devices attached to it.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
-  All rights reserved. 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
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Revision Reference:\r
-  This PPI is defined in PI.\r
-  Version 1.00\r
+  This PPI is introduced in PI Version 1.0.\r
 \r
 **/\r
 \r
 #define EFI_PEI_SMBUS2_PPI_GUID \\r
   { 0x9ca93627, 0xb65b, 0x4324, { 0xa2, 0x2, 0xc0, 0xb4, 0x61, 0x76, 0x45, 0x43 } }\r
 \r
-\r
 typedef struct _EFI_PEI_SMBUS2_PPI EFI_PEI_SMBUS2_PPI;\r
 \r
-//\r
-// EFI_SMBUS_DEVICE_COMMAND\r
-//\r
-typedef UINTN   EFI_SMBUS_DEVICE_COMMAND;\r
-\r
-\r
-/*\r
-  Executes an SMBus operation to an SMBus controller. Returns when either \r
+/**\r
+  Executes an SMBus operation to an SMBus controller. Returns when either\r
   the command has been executed or an error is encountered in doing the operation.\r
 \r
   @param  This            A pointer to the EFI_PEI_SMBUS2_PPI instance.\r
   @param  SlaveAddress    The SMBUS hardware address to which the SMBUS device is preassigned or\r
                           allocated.\r
-  @param  Command         This command is transmitted by the SMBus host controller to the SMBus slave \r
-                          device and the interpretation is SMBus slave device specific. \r
-                          It can mean the offset to a list of functions inside \r
+  @param  Command         This command is transmitted by the SMBus host controller to the SMBus slave\r
+                          device and the interpretation is SMBus slave device specific.\r
+                          It can mean the offset to a list of functions inside\r
                           an SMBus slave device. Not all operations or slave devices support\r
                           this command's registers.\r
-  @param  Operation       Signifies which particular SMBus hardware protocol instance that it \r
-                          will use to execute the SMBus transactions. \r
-                          This SMBus hardware protocol is defined by the System Management Bus (SMBus) \r
+  @param  Operation       Signifies which particular SMBus hardware protocol instance that it\r
+                          will use to execute the SMBus transactions.\r
+                          This SMBus hardware protocol is defined by the System Management Bus (SMBus)\r
                           Specification and is not related to UEFI.\r
   @param  PecCheck        Defines if Packet Error Code (PEC) checking is required for this operation.\r
-  @param  Length          Signifies the number of bytes that this operation will do. \r
+  @param  Length          Signifies the number of bytes that this operation will do.\r
                           The maximum number of bytes can be revision specific and operation specific.\r
                           This parameter will contain the actual number of bytes that are executed\r
                           for this operation. Not all operations require this argument.\r
-  @param  Buffer          Contains the value of data to execute to the SMBus slave device. \r
-                          Not all operations require this argument. \r
+  @param  Buffer          Contains the value of data to execute to the SMBus slave device.\r
+                          Not all operations require this argument.\r
                           The length of this buffer is identified by Length.\r
 \r
 \r
@@ -87,11 +73,11 @@ EFI_STATUS
   IN        BOOLEAN                   PecCheck,\r
   IN OUT    UINTN                     *Length,\r
   IN OUT    VOID                      *Buffer\r
-);\r
+  );\r
 \r
 /**\r
-  The ArpDevice() function enumerates the entire bus or enumerates a specific \r
-  device that is identified by SmbusUdid. \r
+  The ArpDevice() function enumerates the entire bus or enumerates a specific\r
+  device that is identified by SmbusUdid.\r
 \r
   @param  This           A pointer to the EFI_PEI_SMBUS2_PPI instance.\r
   @param  ArpAll         A Boolean expression that indicates if the host drivers need\r
@@ -118,27 +104,13 @@ EFI_STATUS
 (EFIAPI *EFI_PEI_SMBUS2_PPI_ARP_DEVICE)(\r
   IN CONST  EFI_PEI_SMBUS2_PPI        *This,\r
   IN        BOOLEAN                   ArpAll,\r
-  IN        EFI_SMBUS_UDID            *SmbusUdid,   OPTIONAL\r
+  IN        EFI_SMBUS_UDID            *SmbusUdid    OPTIONAL,\r
   IN OUT    EFI_SMBUS_DEVICE_ADDRESS  *SlaveAddress OPTIONAL\r
-);\r
-\r
-\r
-typedef struct {\r
-  ///\r
-  /// The SMBUS hardware address to which the SMBUS device is preassigned or\r
-  /// allocated. Type EFI_SMBUS_DEVICE_ADDRESS is defined in EFI_PEI_SMBUS2_PPI.Execute().\r
-  ///\r
-  EFI_SMBUS_DEVICE_ADDRESS  SmbusDeviceAddress;\r
-  ///\r
-  /// The SMBUS Unique Device Identifier (UDID) as defined in EFI_SMBUS_UDID.\r
-  /// Type EFI_SMBUS_UDID is defined in EFI_PEI_SMBUS2_PPI.ArpDevice().\r
-  ///\r
-  EFI_SMBUS_UDID            SmbusDeviceUdid;\r
-} EFI_SMBUS_DEVICE_MAP;\r
+  );\r
 \r
 /**\r
-  The GetArpMap() function returns the mapping of all the SMBus devices \r
-  that are enumerated by the SMBus host driver. \r
+  The GetArpMap() function returns the mapping of all the SMBus devices\r
+  that are enumerated by the SMBus host driver.\r
 \r
   @param  This           A pointer to the EFI_PEI_SMBUS2_PPI instance.\r
   @param  Length         Size of the buffer that contains the SMBus device map.\r
@@ -155,7 +127,7 @@ EFI_STATUS
   IN CONST  EFI_PEI_SMBUS2_PPI    *This,\r
   IN OUT    UINTN                 *Length,\r
   IN OUT    EFI_SMBUS_DEVICE_MAP  **SmbusDeviceMap\r
-);\r
+  );\r
 \r
 /**\r
   CallBack function can be registered in EFI_PEI_SMBUS2_PPI_NOTIFY.\r
@@ -177,10 +149,10 @@ EFI_STATUS
   IN CONST  EFI_PEI_SMBUS2_PPI        *SmbusPpi,\r
   IN        EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress,\r
   IN        UINTN                     Data\r
-);\r
+  );\r
 \r
 /**\r
-  The Notify() function registers all the callback functions to allow the \r
+  The Notify() function registers all the callback functions to allow the\r
   bus driver to call these functions when the SlaveAddress/Data pair happens.\r
 \r
   @param  This           A pointer to the EFI_PEI_SMBUS2_PPI instance.\r
@@ -202,23 +174,23 @@ EFI_STATUS
   IN       EFI_SMBUS_DEVICE_ADDRESS        SlaveAddress,\r
   IN       UINTN                           Data,\r
   IN       EFI_PEI_SMBUS_NOTIFY2_FUNCTION  NotifyFunction\r
-);\r
+  );\r
 \r
 ///\r
-///  Provides the basic I/O interfaces that a PEIM uses to access \r
+///  Provides the basic I/O interfaces that a PEIM uses to access\r
 ///  its SMBus controller and the slave devices attached to it.\r
 ///\r
 struct _EFI_PEI_SMBUS2_PPI {\r
-  EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION  Execute;\r
-  EFI_PEI_SMBUS2_PPI_ARP_DEVICE         ArpDevice;\r
-  EFI_PEI_SMBUS2_PPI_GET_ARP_MAP        GetArpMap;\r
-  EFI_PEI_SMBUS2_PPI_NOTIFY             Notify;\r
+  EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION    Execute;\r
+  EFI_PEI_SMBUS2_PPI_ARP_DEVICE           ArpDevice;\r
+  EFI_PEI_SMBUS2_PPI_GET_ARP_MAP          GetArpMap;\r
+  EFI_PEI_SMBUS2_PPI_NOTIFY               Notify;\r
   ///\r
   /// Identifier which uniquely identifies this SMBus controller in a system.\r
   ///\r
-  EFI_GUID                              Identifier;\r
+  EFI_GUID                                Identifier;\r
 };\r
 \r
-extern EFI_GUID gEfiPeiSmbus2PpiGuid;\r
+extern EFI_GUID  gEfiPeiSmbus2PpiGuid;\r
 \r
 #endif\r