TianoCore EDK2 master
|
Go to the source code of this file.
Macros | |
#define | MMCI0_BLOCKLEN 512 |
#define | MMCI0_TIMEOUT 10000 |
Copyright (c) 2011-2020, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MmcBlockIo.c.
#define MMCI0_BLOCKLEN 512 |
Definition at line 123 of file MmcBlockIo.c.
#define MMCI0_TIMEOUT 10000 |
Definition at line 124 of file MmcBlockIo.c.
EFI_STATUS MmcDetectCard | ( | EFI_MMC_HOST_PROTOCOL * | MmcHost | ) |
Definition at line 94 of file MmcBlockIo.c.
EFI_STATUS EFIAPI MmcFlushBlocks | ( | IN EFI_BLOCK_IO_PROTOCOL * | This | ) |
Flushes all modified data to a physical block device.
This | Indicates a pointer to the calling context. |
EFI_SUCCESS | All outstanding data were written correctly to the device. |
EFI_DEVICE_ERROR | The device reported an error while attempting to write data. |
EFI_NO_MEDIA | There is no media in the device. |
Definition at line 400 of file MmcBlockIo.c.
EFI_STATUS EFIAPI MmcGetCardStatus | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance | ) |
Definition at line 25 of file MmcBlockIo.c.
EFI_STATUS MmcIoBlocks | ( | IN EFI_BLOCK_IO_PROTOCOL * | This, |
IN UINTN | Transfer, | ||
IN UINT32 | MediaId, | ||
IN EFI_LBA | Lba, | ||
IN UINTN | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Definition at line 234 of file MmcBlockIo.c.
EFI_STATUS MmcNotifyState | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance, |
IN MMC_STATE | State | ||
) |
Definition at line 14 of file MmcBlockIo.c.
EFI_STATUS EFIAPI MmcReadBlocks | ( | IN EFI_BLOCK_IO_PROTOCOL * | This, |
IN UINT32 | MediaId, | ||
IN EFI_LBA | Lba, | ||
IN UINTN | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Reads the requested number of blocks from the device.
This function implements EFI_BLOCK_IO_PROTOCOL.ReadBlocks(). It reads the requested number of blocks from the device. All the blocks are read, or an error is returned.
This | Indicates a pointer to the calling context. |
MediaId | The media ID that the read request is for. |
Lba | The starting logical block address to read from on the device. |
BufferSize | The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device. |
Buffer | A pointer to the destination buffer for the data. The caller is responsible for either having implicit or explicit ownership of the buffer. |
EFI_SUCCESS | The data was read correctly from the device. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the read operation. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_BAD_BUFFER_SIZE | The BufferSize parameter is not a multiple of the intrinsic block size of the device. |
EFI_INVALID_PARAMETER | The read request contains LBAs that are not valid, or the buffer is not on proper alignment. |
Definition at line 374 of file MmcBlockIo.c.
EFI_STATUS EFIAPI MmcReset | ( | IN EFI_BLOCK_IO_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Reset the block device.
This function implements EFI_BLOCK_IO_PROTOCOL.Reset(). It resets the block device hardware. ExtendedVerification is ignored in this implementation.
This | Indicates a pointer to the calling context. |
ExtendedVerification | Indicates that the driver may perform a more exhaustive verification operation of the device during reset. |
EFI_SUCCESS | The block device was reset. |
EFI_DEVICE_ERROR | The block device is not functioning correctly and could not be reset. |
Definition at line 61 of file MmcBlockIo.c.
EFI_STATUS MmcStopTransmission | ( | EFI_MMC_HOST_PROTOCOL * | MmcHost | ) |
Definition at line 106 of file MmcBlockIo.c.
STATIC EFI_STATUS MmcTransferBlock | ( | IN EFI_BLOCK_IO_PROTOCOL * | This, |
IN UINTN | Cmd, | ||
IN UINTN | Transfer, | ||
IN UINT32 | MediaId, | ||
IN EFI_LBA | Lba, | ||
IN UINTN | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Definition at line 128 of file MmcBlockIo.c.
EFI_STATUS EFIAPI MmcWriteBlocks | ( | IN EFI_BLOCK_IO_PROTOCOL * | This, |
IN UINT32 | MediaId, | ||
IN EFI_LBA | Lba, | ||
IN UINTN | BufferSize, | ||
IN VOID * | Buffer | ||
) |
Writes a specified number of blocks to the device.
This function implements EFI_BLOCK_IO_PROTOCOL.WriteBlocks(). It writes a specified number of blocks to the device. All blocks are written, or an error is returned.
This | Indicates a pointer to the calling context. |
MediaId | The media ID that the write request is for. |
Lba | The starting logical block address to be written. |
BufferSize | The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device. |
Buffer | Pointer to the source buffer for the data. |
EFI_SUCCESS | The data were written correctly to the device. |
EFI_WRITE_PROTECTED | The device cannot be written to. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the write operation. |
EFI_BAD_BUFFER_SIZE | The BufferSize parameter is not a multiple of the intrinsic block size of the device. |
EFI_INVALID_PARAMETER | The write request contains LBAs that are not valid, or the buffer is not on proper alignment. |
Definition at line 387 of file MmcBlockIo.c.