X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FPpi%2FSmbus2.h;h=3e386b823b65baa55e5fbdf594476abce188c475;hb=HEAD;hp=1cc546782b980f6bc0478f2df65a73ffbe53e585;hpb=3909993808a3d1dd6432bde1cb186e759e8db78d;p=mirror_edk2.git diff --git a/MdePkg/Include/Ppi/Smbus2.h b/MdePkg/Include/Ppi/Smbus2.h index 1cc546782b..3e386b823b 100644 --- a/MdePkg/Include/Ppi/Smbus2.h +++ b/MdePkg/Include/Ppi/Smbus2.h @@ -1,20 +1,13 @@ /** @file This file declares Smbus2 PPI. - This PPI provides the basic I/O interfaces that a PEIM uses to access its + This PPI provides the basic I/O interfaces that a PEIM uses to access its SMBus controller and the slave devices attached to it. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: - This PPI is defined in PI. - Version 1.00 + This PPI is introduced in PI Version 1.0. **/ @@ -26,38 +19,31 @@ #define EFI_PEI_SMBUS2_PPI_GUID \ { 0x9ca93627, 0xb65b, 0x4324, { 0xa2, 0x2, 0xc0, 0xb4, 0x61, 0x76, 0x45, 0x43 } } - typedef struct _EFI_PEI_SMBUS2_PPI EFI_PEI_SMBUS2_PPI; -// -// EFI_SMBUS_DEVICE_COMMAND -// -typedef UINTN EFI_SMBUS_DEVICE_COMMAND; - - -/* - Executes an SMBus operation to an SMBus controller. Returns when either +/** + Executes an SMBus operation to an SMBus controller. Returns when either the command has been executed or an error is encountered in doing the operation. @param This A pointer to the EFI_PEI_SMBUS2_PPI instance. @param SlaveAddress The SMBUS hardware address to which the SMBUS device is preassigned or allocated. - @param Command This command is transmitted by the SMBus host controller to the SMBus slave - device and the interpretation is SMBus slave device specific. - It can mean the offset to a list of functions inside + @param Command This command is transmitted by the SMBus host controller to the SMBus slave + device and the interpretation is SMBus slave device specific. + It can mean the offset to a list of functions inside an SMBus slave device. Not all operations or slave devices support this command's registers. - @param Operation Signifies which particular SMBus hardware protocol instance that it - will use to execute the SMBus transactions. - This SMBus hardware protocol is defined by the System Management Bus (SMBus) + @param Operation Signifies which particular SMBus hardware protocol instance that it + will use to execute the SMBus transactions. + This SMBus hardware protocol is defined by the System Management Bus (SMBus) Specification and is not related to UEFI. @param PecCheck Defines if Packet Error Code (PEC) checking is required for this operation. - @param Length Signifies the number of bytes that this operation will do. + @param Length Signifies the number of bytes that this operation will do. The maximum number of bytes can be revision specific and operation specific. This parameter will contain the actual number of bytes that are executed for this operation. Not all operations require this argument. - @param Buffer Contains the value of data to execute to the SMBus slave device. - Not all operations require this argument. + @param Buffer Contains the value of data to execute to the SMBus slave device. + Not all operations require this argument. The length of this buffer is identified by Length. @@ -87,11 +73,11 @@ EFI_STATUS IN BOOLEAN PecCheck, IN OUT UINTN *Length, IN OUT VOID *Buffer -); + ); /** - The ArpDevice() function enumerates the entire bus or enumerates a specific - device that is identified by SmbusUdid. + The ArpDevice() function enumerates the entire bus or enumerates a specific + device that is identified by SmbusUdid. @param This A pointer to the EFI_PEI_SMBUS2_PPI instance. @param ArpAll A Boolean expression that indicates if the host drivers need @@ -118,27 +104,13 @@ EFI_STATUS (EFIAPI *EFI_PEI_SMBUS2_PPI_ARP_DEVICE)( IN CONST EFI_PEI_SMBUS2_PPI *This, IN BOOLEAN ArpAll, - IN EFI_SMBUS_UDID *SmbusUdid, OPTIONAL + IN EFI_SMBUS_UDID *SmbusUdid OPTIONAL, IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL -); - - -typedef struct { - /// - /// The SMBUS hardware address to which the SMBUS device is preassigned or - /// allocated. Type EFI_SMBUS_DEVICE_ADDRESS is defined in EFI_PEI_SMBUS2_PPI.Execute(). - /// - EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress; - /// - /// The SMBUS Unique Device Identifier (UDID) as defined in EFI_SMBUS_UDID. - /// Type EFI_SMBUS_UDID is defined in EFI_PEI_SMBUS2_PPI.ArpDevice(). - /// - EFI_SMBUS_UDID SmbusDeviceUdid; -} EFI_SMBUS_DEVICE_MAP; + ); /** - The GetArpMap() function returns the mapping of all the SMBus devices - that are enumerated by the SMBus host driver. + The GetArpMap() function returns the mapping of all the SMBus devices + that are enumerated by the SMBus host driver. @param This A pointer to the EFI_PEI_SMBUS2_PPI instance. @param Length Size of the buffer that contains the SMBus device map. @@ -155,7 +127,7 @@ EFI_STATUS IN CONST EFI_PEI_SMBUS2_PPI *This, IN OUT UINTN *Length, IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap -); + ); /** CallBack function can be registered in EFI_PEI_SMBUS2_PPI_NOTIFY. @@ -177,10 +149,10 @@ EFI_STATUS IN CONST EFI_PEI_SMBUS2_PPI *SmbusPpi, IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress, IN UINTN Data -); + ); /** - The Notify() function registers all the callback functions to allow the + The Notify() function registers all the callback functions to allow the bus driver to call these functions when the SlaveAddress/Data pair happens. @param This A pointer to the EFI_PEI_SMBUS2_PPI instance. @@ -202,37 +174,23 @@ EFI_STATUS IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress, IN UINTN Data, IN EFI_PEI_SMBUS_NOTIFY2_FUNCTION NotifyFunction -); + ); /// -/// Provides the basic I/O interfaces that a PEIM uses to access +/// Provides the basic I/O interfaces that a PEIM uses to access /// its SMBus controller and the slave devices attached to it. /// struct _EFI_PEI_SMBUS2_PPI { - /// - /// Executes the SMBus operation to an SMBus slave device. - /// - EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION Execute; - /// - /// Allows an SMBus 2.0 device(s) to be Address Resolution Protocol (ARP). - /// - EFI_PEI_SMBUS2_PPI_ARP_DEVICE ArpDevice; - /// - /// Allows a PEIM to retrieve the address that was allocated by the SMBus - /// host controller during enumeration/ARP. - /// - EFI_PEI_SMBUS2_PPI_GET_ARP_MAP GetArpMap; - /// - /// Allows a driver to register for a callback to the SMBus host - /// controller driver when the bus issues a notification to the bus controller PEIM. - /// - EFI_PEI_SMBUS2_PPI_NOTIFY Notify; + EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION Execute; + EFI_PEI_SMBUS2_PPI_ARP_DEVICE ArpDevice; + EFI_PEI_SMBUS2_PPI_GET_ARP_MAP GetArpMap; + EFI_PEI_SMBUS2_PPI_NOTIFY Notify; /// /// Identifier which uniquely identifies this SMBus controller in a system. /// - EFI_GUID Identifier; + EFI_GUID Identifier; }; -extern EFI_GUID gEfiPeiSmbus2PpiGuid; +extern EFI_GUID gEfiPeiSmbus2PpiGuid; #endif