4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/** @file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Smbus Library Services that conduct SMBus transactions and enable the operatation
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to be replayed during an S3 resume. This library class maps directly on top
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the SmbusLib class.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are licensed and made available under the terms and conditions
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the BSD License which accompanies this distribution. The
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync http://opensource.org/licenses/bsd-license.php
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#ifndef __S3_SMBUS_LIB_H__
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define __S3_SMBUS_LIB_H__
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS quick read command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS quick read command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address field of SmBusAddress is required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PEC is set in SmBusAddress, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Command in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVOID
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusQuickRead (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS quick write command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS quick write command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address field of SmBusAddress is required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PEC is set in SmBusAddress, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Command in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVOID
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusQuickWrite (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS receive byte command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS receive byte command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address field of SmBusAddress is required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The byte received from the SMBUS is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Command in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The byte received from the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT8
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusReceiveByte (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS send byte command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS send byte command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The byte specified by Value is sent.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address field of SmBusAddress is required. Value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Command in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Value The 8-bit value to send.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus errors (collisions).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The parameter of Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT8
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusSendByte (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT8 Value,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS read data byte command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS read data byte command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address and SMBUS command fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The 8-bit value read from the SMBUS is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The byte read from the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT8
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusReadDataByte (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS write data byte command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS write data byte command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The 8-bit value specified by Value is written.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address and SMBUS command fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Value The 8-bit value to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The parameter of Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT8
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusWriteDataByte (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT8 Value,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS read data word command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS read data word command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address and SMBUS command fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The 16-bit value read from the SMBUS is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The byte read from the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT16
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusReadDataWord (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS write data word command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS write data word command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The 16-bit value specified by Value is written.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address and SMBUS command fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Value is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Value The 16-bit value to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The parameter of Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT16
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusWriteDataWord (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT16 Value,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS process call command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS process call command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The 16-bit value specified by Value is written.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address and SMBUS command fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The 16-bit value returned by the process call command is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Value The 16-bit value to write.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The 16-bit value returned by the process call command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINT16
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusProcessCall (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT16 Value,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS read block command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS read block command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Only the SMBUS slave address and SMBUS command fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Bytes are read from the SMBUS and stored in Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of bytes read is returned, and will never return a value larger than 32-bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not need to be any larger than 32 bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is not zero, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Buffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Buffer The pointer to the buffer to store the bytes read from the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_SUCCESS The SMBUS command was executed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of bytes read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINTN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusReadBlock (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT VOID *Buffer,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS write block command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS write block command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Bytes are written to the SMBUS from Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of bytes written is returned, and will never return a value larger than 32-bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is zero or greater than 32, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Buffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Buffer The pointer to the buffer to store the bytes read from the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of bytes written.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINTN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusWriteBlock (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT VOID *Buffer,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS block process call command, and saves the value in the S3 script to be replayed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync on S3 resume.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Executes an SMBUS block process call command on the SMBUS device specified by SmBusAddress.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBusAddress are required.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Bytes are written to the SMBUS from WriteBuffer. Bytes are then read from the SMBUS into ReadBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Status is not NULL, then the status of the executed command is returned in Status.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync It is the caller's responsibility to make sure ReadBuffer is large enough for the total number of bytes read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not need to be any larger than 32 bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length in SmBusAddress is zero or greater than 32, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If WriteBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If ReadBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If any reserved bits of SmBusAddress are set, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] SmBusAddress The address that encodes the SMBUS Slave Address,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMBUS Command, SMBUS Data Length, and PEC.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] WriteBuffer The pointer to the buffer of bytes to write to the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] ReadBuffer The pointer to the buffer of bytes to read from the SMBUS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Status The return status for the executed command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This is an optional parameter and may be NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_DEVICE_ERROR The request was not completed because a failure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync was recorded in the Host Status Register bit. Device errors are a result
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a transaction collision, illegal command field, unclaimed cycle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (host initiated), or bus error (collision).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RETURN_UNSUPPORTED The SMBus operation is not supported.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of bytes written.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINTN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncS3SmBusBlockProcessCall (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINTN SmBusAddress,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN VOID *WriteBuffer,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT VOID *ReadBuffer,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT RETURN_STATUS *Status OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync );
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#endif