Initial directory structure of IntelFrameworkPkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2657 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
158
IntelFrameworkPkg/Include/Ppi/BlockIo.h
Normal file
158
IntelFrameworkPkg/Include/Ppi/BlockIo.h
Normal file
@@ -0,0 +1,158 @@
|
||||
/** @file
|
||||
This file declares BlockIo PPI used to access block-oriented storage devices
|
||||
|
||||
Copyright (c) 2007, 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.
|
||||
|
||||
Module Name: BlockIo.h
|
||||
|
||||
@par Revision Reference:
|
||||
This PPI is defined in Framework of EFI Recovery Spec
|
||||
Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _PEI_BLOCK_IO_H_
|
||||
#define _PEI_BLOCK_IO_H_
|
||||
|
||||
#define EFI_PEI_IDE_BLOCK_IO_PPI \
|
||||
{ \
|
||||
0x0964e5b22, 0x6459, 0x11d2, { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
|
||||
}
|
||||
|
||||
#define EFI_PEI_144_FLOPPY_BLOCK_IO_PPI \
|
||||
{ \
|
||||
0xda6855bd, 0x07b7, 0x4c05, { 0x9e, 0xd8, 0xe2, 0x59, 0xfd, 0x36, 0x0e, 0x22 } \
|
||||
}
|
||||
|
||||
#define EFI_PEI_VIRTUAL_BLOCK_IO_PPI \
|
||||
{ \
|
||||
0x695d8aa1, 0x42ee, 0x4c46, { 0x80, 0x5c, 0x6e, 0xa6, 0xbc, 0xe7, 0x99, 0xe3 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI EFI_PEI_RECOVERY_BLOCK_IO_PPI;
|
||||
|
||||
typedef UINT64 EFI_PEI_LBA;
|
||||
|
||||
typedef enum {
|
||||
LegacyFloppy = 0,
|
||||
IdeCDROM = 1,
|
||||
IdeLS120 = 2,
|
||||
UsbMassStorage= 3,
|
||||
MaxDeviceType
|
||||
} EFI_PEI_BLOCK_DEVICE_TYPE;
|
||||
|
||||
typedef struct {
|
||||
EFI_PEI_BLOCK_DEVICE_TYPE DeviceType;
|
||||
BOOLEAN MediaPresent;
|
||||
UINTN LastBlock;
|
||||
UINTN BlockSize;
|
||||
} EFI_PEI_BLOCK_IO_MEDIA;
|
||||
|
||||
/**
|
||||
Gets the count of block I/O devices that one specific block driver detects.
|
||||
|
||||
@param PeiServices General-purpose services that are available to every PEIM.
|
||||
@param This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.
|
||||
@param NumberBlockDevices The number of block I/O devices discovered.
|
||||
|
||||
@return Status code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_GET_NUMBER_BLOCK_DEVICES) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This,
|
||||
OUT UINTN *NumberBlockDevices
|
||||
);
|
||||
|
||||
/**
|
||||
Gets a block device's media information.
|
||||
|
||||
@param PeiServices General-purpose services that are available to every PEIM
|
||||
@param This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.
|
||||
@param DeviceIndex Specifies the block device to which the function
|
||||
wants to talk. Because the driver that implements Block I/O PPIs
|
||||
will manage multiple block devices, the PPIs that want to talk to a single
|
||||
device must specify the device index that was assigned during the enumeration
|
||||
process. This index is a number from one to NumberBlockDevices.
|
||||
@param MediaInfo The media information of the specified block media.
|
||||
|
||||
@retval EFI_SUCCESS Media information about the specified block device was obtained successfully.
|
||||
@retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_GET_DEVICE_MEDIA_INFORMATION) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This,
|
||||
IN UINTN DeviceIndex,
|
||||
OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo
|
||||
);
|
||||
|
||||
/**
|
||||
Reads the requested number of blocks from the specified block device.
|
||||
|
||||
@param PeiServices General-purpose services that are available to every PEIM.
|
||||
@param This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.
|
||||
@param DeviceIndex Specifies the block device to which the function wants to talk.
|
||||
@param StartLBA The starting logical block address (LBA) to read from on the device
|
||||
@param BufferSize The size of the Buffer in bytes. This number must
|
||||
be a multiple of the intrinsic block size of the device.
|
||||
@param Buffer A pointer to the destination buffer for the data.
|
||||
The caller is responsible for the ownership of the buffer.
|
||||
|
||||
@retval EFI_SUCCESS The data was read correctly from the device.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation.
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
|
||||
or the buffer is not properly aligned.
|
||||
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of
|
||||
the intrinsic block size of the device.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_READ_BLOCKS) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This,
|
||||
IN UINTN DeviceIndex,
|
||||
IN EFI_PEI_LBA StartLBA,
|
||||
IN UINTN BufferSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
@par Ppi Description:
|
||||
EFI_PEI_RECOVERY_BLOCK_IO_PPI provides the services that are required
|
||||
to access a block I/O device during PEI recovery boot mode.
|
||||
|
||||
@param GetNumberOfBlockDevices
|
||||
Gets the number of block I/O devices that the specific block driver manages.
|
||||
|
||||
@param GetBlockDeviceMediaInfo
|
||||
Gets the specified media information.
|
||||
|
||||
@param ReadBlocks
|
||||
Reads the requested number of blocks from the specified block device.
|
||||
|
||||
**/
|
||||
struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI {
|
||||
EFI_PEI_GET_NUMBER_BLOCK_DEVICES GetNumberOfBlockDevices;
|
||||
EFI_PEI_GET_DEVICE_MEDIA_INFORMATION GetBlockDeviceMediaInfo;
|
||||
EFI_PEI_READ_BLOCKS ReadBlocks;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiPeiIdeBlockIoPpiGuid;
|
||||
extern EFI_GUID gEfiPei144FloppyBlockIoPpiGuid;
|
||||
extern EFI_GUID gEfiPeiVirtualBlockIoPpiGuid;
|
||||
|
||||
#endif
|
72
IntelFrameworkPkg/Include/Ppi/BootScriptExecuter.h
Normal file
72
IntelFrameworkPkg/Include/Ppi/BootScriptExecuter.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/** @file
|
||||
This file declares Boot Script Executer PPI.
|
||||
|
||||
Copyright (c) 2007, 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.
|
||||
|
||||
Module Name: BootScriptExecuter.h
|
||||
|
||||
@par Revision Reference:
|
||||
This PPI is defined in Framework of EFI BootScript spec.
|
||||
Version 0.91.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _PEI_BOOT_SCRIPT_EXECUTER_PPI_H
|
||||
#define _PEI_BOOT_SCRIPT_EXECUTER_PPI_H
|
||||
|
||||
#define EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI_GUID \
|
||||
{ \
|
||||
0xabd42895, 0x78cf, 0x4872, {0x84, 0x44, 0x1b, 0x5c, 0x18, 0x0b, 0xfb, 0xff } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI;
|
||||
|
||||
/**
|
||||
Executes the Framework boot script table.
|
||||
|
||||
@param PeiServices A pointer to the system PEI Services Table.
|
||||
@param This A pointer to the EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI instance.
|
||||
@param Address The physical memory address where the table is stored.
|
||||
It must be zero if the table to be executed is stored in a firmware volume file.
|
||||
@param FvFile The firmware volume file name that contains the table to
|
||||
be executed. It must be NULL if the table to be executed is stored in physical memory.
|
||||
|
||||
@retval EFI_SUCCESS The boot script table was executed successfully.
|
||||
@retval EFI_INVALID_PARAMETER Address is zero and FvFile is NULL.
|
||||
@retval EFI_NOT_FOUND The file name specified in FvFile cannot be found.
|
||||
@retval EFI_UNSUPPORTED The format of the boot script table is invalid.
|
||||
Or An unsupported opcode occurred in the table.
|
||||
Or There were opcode execution errors, such as an insufficient dependency.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_BOOT_SCRIPT_EXECUTE) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI *This,
|
||||
IN EFI_PHYSICAL_ADDRESS Address,
|
||||
IN EFI_GUID *FvFile OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
@par Ppi Description:
|
||||
This PPI produces functions to interpret and execute the Framework boot script table.
|
||||
|
||||
@param Execute
|
||||
Executes a boot script table.
|
||||
|
||||
**/
|
||||
struct _EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI {
|
||||
EFI_PEI_BOOT_SCRIPT_EXECUTE Execute;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiPeiBootScriptExecuterPpiGuid;
|
||||
|
||||
#endif
|
64
IntelFrameworkPkg/Include/Ppi/RecoveryModule.h
Normal file
64
IntelFrameworkPkg/Include/Ppi/RecoveryModule.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/** @file
|
||||
This file declares Recovery Module PPI.
|
||||
|
||||
Copyright (c) 2007, 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.
|
||||
|
||||
Module Name: RecoveryModule.h
|
||||
|
||||
@par Revision Reference:
|
||||
This PPI is defined in Framework of EFI Recovery Spec.
|
||||
Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PEI_RECOVERY_MODULE_PPI_H__
|
||||
#define __PEI_RECOVERY_MODULE_PPI_H__
|
||||
|
||||
#define EFI_PEI_RECOVERY_MODULE_PPI_GUID \
|
||||
{ \
|
||||
0xFB6D9542, 0x612D, 0x4f45, {0x87, 0x2F, 0x5C, 0xFF, 0x52, 0xE9, 0x3D, 0xCF } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_PEI_RECOVERY_MODULE_PPI EFI_PEI_RECOVERY_MODULE_PPI;
|
||||
|
||||
/**
|
||||
Loads a DXE capsule from some media into memory and updates the HOB table
|
||||
with the DXE firmware volume information.
|
||||
|
||||
@param PeiServices General-purpose services that are available to every PEIM.
|
||||
@param This Indicates the EFI_PEI_RECOVERY_MODULE_PPI instance.
|
||||
|
||||
@retval EFI_SUCCESS The capsule was loaded correctly.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred.
|
||||
@retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_LOAD_RECOVERY_CAPSULE) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_RECOVERY_MODULE_PPI *This
|
||||
);
|
||||
|
||||
/**
|
||||
@par Ppi Description:
|
||||
Finds and loads the recovery files.
|
||||
|
||||
@param LoadRecoveryCapsule
|
||||
Loads a DXE binary capsule into memory.
|
||||
|
||||
**/
|
||||
struct _EFI_PEI_RECOVERY_MODULE_PPI {
|
||||
EFI_PEI_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiPeiRecoveryModulePpiGuid;
|
||||
|
||||
#endif
|
64
IntelFrameworkPkg/Include/Ppi/S3Resume.h
Normal file
64
IntelFrameworkPkg/Include/Ppi/S3Resume.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/** @file
|
||||
This file declares S3 Resume PPI.
|
||||
|
||||
Copyright (c) 2007, 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.
|
||||
|
||||
Module Name: S3Resume.h
|
||||
|
||||
@par Revision Reference:
|
||||
This PPI is defined in Framework of EFI S3 Resume Boot Path spec.
|
||||
Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __PEI_S3_RESUME_PPI_H__
|
||||
#define __PEI_S3_RESUME_PPI_H__
|
||||
|
||||
#define EFI_PEI_S3_RESUME_PPI_GUID \
|
||||
{ \
|
||||
0x4426CCB2, 0xE684, 0x4a8a, {0xAE, 0x40, 0x20, 0xD4, 0xB0, 0x25, 0xB7, 0x10 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_PEI_S3_RESUME_PPI EFI_PEI_S3_RESUME_PPI;
|
||||
|
||||
/**
|
||||
Restores the platform to its preboot configuration for an S3 resume and
|
||||
jumps to the OS waking vector.
|
||||
|
||||
@param PeiServices Pointer to the PEI Services Table
|
||||
|
||||
@retval EFI_ABORTED Execution of the S3 resume boot script table failed.
|
||||
@retval EFI_NOT_FOUND Some necessary information that is used for
|
||||
the S3 resume boot path could not be located.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG) (
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
);
|
||||
|
||||
/**
|
||||
@par Ppi Description:
|
||||
EFI_PEI_S3_RESUME_PPI accomplishes the firmware S3 resume boot
|
||||
path and transfers control to OS.
|
||||
|
||||
@param S3RestoreConfig
|
||||
Restores the platform to its preboot configuration for an S3 resume and
|
||||
jumps to the OS waking vector.
|
||||
|
||||
**/
|
||||
struct _EFI_PEI_S3_RESUME_PPI {
|
||||
EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG S3RestoreConfig;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiPeiS3ResumePpiGuid;
|
||||
|
||||
#endif
|
228
IntelFrameworkPkg/Include/Ppi/Smbus.h
Normal file
228
IntelFrameworkPkg/Include/Ppi/Smbus.h
Normal file
@@ -0,0 +1,228 @@
|
||||
/** @file
|
||||
This file declares Smbus PPI.
|
||||
|
||||
Copyright (c) 2007, 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.
|
||||
|
||||
Module Name: Smbus.h
|
||||
|
||||
@par Revision Reference:
|
||||
This PPI is defined in Framework of EFI SmBus PPI spec.
|
||||
Version 0.9
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _PEI_SMBUS_PPI_H
|
||||
#define _PEI_SMBUS_PPI_H
|
||||
|
||||
#include <IndustryStandard/SmBus.h>
|
||||
|
||||
#define EFI_PEI_SMBUS_PPI_GUID \
|
||||
{ \
|
||||
0xabd42895, 0x78cf, 0x4872, {0x84, 0x44, 0x1b, 0x5c, 0x18, 0xb, 0xfb, 0xda } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_PEI_SMBUS_PPI EFI_PEI_SMBUS_PPI;
|
||||
|
||||
/**
|
||||
Executes an SMBus operation to an SMBus controller.
|
||||
|
||||
@param PeiServices A pointer to the system PEI Services Table.
|
||||
@param This A pointer to the EFI_PEI_SMBUS_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.
|
||||
@param Operation Signifies which particular SMBus hardware protocol
|
||||
instance that it will use to execute the SMBus transactions.
|
||||
@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 Buffer Contains the value of data to execute to the SMBus slave device.
|
||||
|
||||
@retval EFI_SUCCESS The last data that was returned from the access
|
||||
matched the poll exit criteria.
|
||||
@retval EFI_CRC_ERROR The checksum is not correct (PEC is incorrect)
|
||||
@retval EFI_TIMEOUT Timeout expired before the operation was completed.
|
||||
Timeout is determined by the SMBus host controller device.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed
|
||||
due to a lack of resources.
|
||||
@retval EFI_DEVICE_ERROR The request was not completed because
|
||||
a failure reflected in the Host Status Register bit.
|
||||
@retval EFI_INVALID_PARAMETER Operation is not defined in EFI_SMBUS_OPERATION.
|
||||
Or Length/Buffer is NULL for operations except for EfiSmbusQuickRead and
|
||||
EfiSmbusQuickWrite. Length is outside the range of valid values.
|
||||
@retval EFI_UNSUPPORTED The SMBus operation or PEC is not supported.
|
||||
@retval EFI_BUFFER_TOO_SMALL Buffer is not sufficient for this operation.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_SMBUS_PPI_EXECUTE_OPERATION) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_SMBUS_PPI *This,
|
||||
IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
|
||||
IN EFI_SMBUS_DEVICE_COMMAND Command,
|
||||
IN EFI_SMBUS_OPERATION Operation,
|
||||
IN BOOLEAN PecCheck,
|
||||
IN OUT UINTN *Length,
|
||||
IN OUT VOID *Buffer
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
UINT32 VendorSpecificId;
|
||||
UINT16 SubsystemDeviceId;
|
||||
UINT16 SubsystemVendorId;
|
||||
UINT16 Interface;
|
||||
UINT16 DeviceId;
|
||||
UINT16 VendorId;
|
||||
UINT8 VendorRevision;
|
||||
UINT8 DeviceCapabilities;
|
||||
} EFI_SMBUS_UDID;
|
||||
|
||||
/**
|
||||
CallBack function can be registered in EFI_PEI_SMBUS_PPI_NOTIFY.
|
||||
|
||||
@param PeiServices A pointer to the system PEI Services Table.
|
||||
@param This A pointer to the EFI_PEI_SMBUS_PPI instance.
|
||||
@param SlaveAddress The SMBUS hardware address to which the SMBUS
|
||||
device is preassigned or allocated.
|
||||
@param Data Data of the SMBus host notify command that
|
||||
the caller wants to be called.
|
||||
|
||||
@return Status Code
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_SMBUS_NOTIFY_FUNCTION) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_SMBUS_PPI *SmbusPpi,
|
||||
IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
|
||||
IN UINTN Data
|
||||
);
|
||||
|
||||
/**
|
||||
The ArpDevice() function enumerates the entire bus or enumerates a specific
|
||||
device that is identified by SmbusUdid.
|
||||
|
||||
@param PeiServices A pointer to the system PEI Services Table.
|
||||
@param This A pointer to the EFI_PEI_SMBUS_PPI instance.
|
||||
@param ArpAll A Boolean expression that indicates if the host drivers need
|
||||
to enumerate all the devices or enumerate only the device that is identified
|
||||
by SmbusUdid. If ArpAll is TRUE, SmbusUdid and SlaveAddress are optional.
|
||||
If ArpAll is FALSE, ArpDevice will enumerate SmbusUdid and the address
|
||||
will be at SlaveAddress.
|
||||
@param SmbusUdid The targeted SMBus Unique Device Identifier (UDID).
|
||||
The UDID may not exist for SMBus devices with fixed addresses.
|
||||
@param SlaveAddress The new SMBus address for the slave device for
|
||||
which the operation is targeted.
|
||||
|
||||
@retval EFI_SUCCESS The SMBus slave device address was set.
|
||||
@retval EFI_INVALID_PARAMETER SlaveAddress is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed
|
||||
due to a lack of resources.
|
||||
@retval EFI_TIMEOUT The SMBus slave device did not respond.
|
||||
@retval EFI_DEVICE_ERROR The request was not completed because the transaction failed.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_SMBUS_PPI_ARP_DEVICE) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_SMBUS_PPI *This,
|
||||
IN BOOLEAN ArpAll,
|
||||
IN EFI_SMBUS_UDID *SmbusUdid, OPTIONAL
|
||||
IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress;
|
||||
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.
|
||||
|
||||
@param PeiServices A pointer to the system PEI Services Table.
|
||||
@param This A pointer to the EFI_PEI_SMBUS_PPI instance.
|
||||
@param Length Size of the buffer that contains the SMBus device map.
|
||||
@param SmbusDeviceMap The pointer to the device map as enumerated
|
||||
by the SMBus controller driver.
|
||||
|
||||
@retval EFI_SUCCESS The device map was returned correctly in the buffer.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_SMBUS_PPI_GET_ARP_MAP) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_SMBUS_PPI *This,
|
||||
IN OUT UINTN *Length,
|
||||
IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap
|
||||
);
|
||||
|
||||
/**
|
||||
The Notify() function registers all the callback functions to allow the
|
||||
bus driver to call these functions when the SlaveAddress/Data pair happens.
|
||||
|
||||
@param PeiServices A pointer to the system PEI Services Table.
|
||||
@param This A pointer to the EFI_PEI_SMBUS_PPI instance.
|
||||
@param SlaveAddress Address that the host controller detects as
|
||||
sending a message and calls all the registered functions.
|
||||
@param Data Data that the host controller detects as sending a message
|
||||
and calls all the registered functions.
|
||||
@param NotifyFunction The function to call when the bus driver
|
||||
detects the SlaveAddress and Data pair.
|
||||
|
||||
@retval EFI_SUCCESS NotifyFunction has been registered.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PEI_SMBUS_PPI_NOTIFY) (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_SMBUS_PPI *This,
|
||||
IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
|
||||
IN UINTN Data,
|
||||
IN EFI_PEI_SMBUS_NOTIFY_FUNCTION NotifyFunction
|
||||
);
|
||||
|
||||
/**
|
||||
@par Ppi Description:
|
||||
Provides the basic I/O interfaces that a PEIM uses to access
|
||||
its SMBus controller and the slave devices attached to it.
|
||||
|
||||
@param Execute
|
||||
Executes the SMBus operation to an SMBus slave device.
|
||||
|
||||
@param ArpDevice
|
||||
Allows an SMBus 2.0 device(s) to be Address Resolution Protocol (ARP)
|
||||
|
||||
@param GetArpMap
|
||||
Allows a PEIM to retrieve the address that was allocated by the SMBus
|
||||
host controller during enumeration/ARP.
|
||||
|
||||
@param Notify
|
||||
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.
|
||||
|
||||
**/
|
||||
struct _EFI_PEI_SMBUS_PPI {
|
||||
EFI_PEI_SMBUS_PPI_EXECUTE_OPERATION Execute;
|
||||
EFI_PEI_SMBUS_PPI_ARP_DEVICE ArpDevice;
|
||||
EFI_PEI_SMBUS_PPI_GET_ARP_MAP GetArpMap;
|
||||
EFI_PEI_SMBUS_PPI_NOTIFY Notify;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiPeiSmbusPpiGuid;
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user