8#ifndef _EMMC_BLOCK_IO_PEI_H_
9#define _EMMC_BLOCK_IO_PEI_H_
36#define EMMC_PEIM_SIG SIGNATURE_32 ('E', 'M', 'C', 'P')
37#define EMMC_PEIM_SLOT_SIG SIGNATURE_32 ('E', 'M', 'C', 'S')
39#define EMMC_PEIM_MAX_SLOTS 6
40#define EMMC_PEIM_MAX_PARTITIONS 8
46 EMMC_PARTITION_TYPE PartitionType[EMMC_PEIM_MAX_PARTITIONS];
52 BOOLEAN SectorAddressing;
71 UINT8 TotalBlkIoDevices;
74#define EMMC_TIMEOUT MultU64x32((UINT64)(3), 1000000)
75#define GET_EMMC_PEIM_HC_PRIVATE_DATA_FROM_THIS(a) CR (a, EMMC_PEIM_HC_PRIVATE_DATA, BlkIoPpi, EMMC_PEIM_SIG)
76#define GET_EMMC_PEIM_HC_PRIVATE_DATA_FROM_THIS2(a) CR (a, EMMC_PEIM_HC_PRIVATE_DATA, BlkIo2Ppi, EMMC_PEIM_SIG)
77#define GET_EMMC_PEIM_HC_PRIVATE_DATA_FROM_THIS_NOTIFY(a) CR (a, EMMC_PEIM_HC_PRIVATE_DATA, EndOfPeiNotifyList, EMMC_PEIM_SIG)
89 EMMC_HC_TRANSFER_MODE Mode;
430 IN VOID *HostAddress,
471 OUT VOID **HostAddress,
491 IN VOID *HostAddress,
EFI_STATUS EFIAPI EmmcBlockIoPeimReadBlocks2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, IN UINTN DeviceIndex, IN EFI_PEI_LBA StartLBA, IN UINTN BufferSize, OUT VOID *Buffer)
EFI_STATUS EFIAPI EmmcBlockIoPeimGetDeviceNo(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, OUT UINTN *NumberBlockDevices)
EFI_STATUS EFIAPI EmmcBlockIoPeimGetMediaInfo2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, IN UINTN DeviceIndex, OUT EFI_PEI_BLOCK_IO2_MEDIA *MediaInfo)
EFI_STATUS IoMmuUnmap(IN VOID *Mapping)
EFI_STATUS EFIAPI EmmcBlockIoPeimGetDeviceNo2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, OUT UINTN *NumberBlockDevices)
EFI_STATUS IoMmuAllocateBuffer(IN UINTN Pages, OUT VOID **HostAddress, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
EFI_STATUS IoMmuMap(IN EDKII_IOMMU_OPERATION Operation, IN VOID *HostAddress, IN OUT UINTN *NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
EFI_STATUS EFIAPI EmmcBlockIoPeimGetMediaInfo(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, IN UINTN DeviceIndex, OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo)
EFI_STATUS EmmcPeimFreeMemPool(IN EMMC_PEIM_MEM_POOL *Pool)
VOID EmmcPeimFreeMem(IN EMMC_PEIM_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size)
VOID * EmmcPeimAllocateMem(IN EMMC_PEIM_MEM_POOL *Pool, IN UINTN Size)
EFI_STATUS EmmcPeimInitMemPool(IN EMMC_PEIM_HC_PRIVATE_DATA *Private)
EFI_STATUS EFIAPI EmmcBlockIoPeimEndOfPei(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
EFI_STATUS EFIAPI EmmcBlockIoPeimReadBlocks(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)
EFI_STATUS IoMmuFreeBuffer(IN UINTN Pages, IN VOID *HostAddress, IN VOID *Mapping)
UINT64 EFI_PHYSICAL_ADDRESS