EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c File Reference

#include <PiPei.h>
#include <Library/IoLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseLib.h>
#include <Library/PeiServicesTablePointerLib.h>

Go to the source code of this file.

Functions

UINT8 *EFIAPI MmioReadBuffer8 (IN UINTN StartAddress, IN UINTN Length, OUT UINT8 *Buffer)
UINT16 *EFIAPI MmioReadBuffer16 (IN UINTN StartAddress, IN UINTN Length, OUT UINT16 *Buffer)
UINT32 *EFIAPI MmioReadBuffer32 (IN UINTN StartAddress, IN UINTN Length, OUT UINT32 *Buffer)
UINT64 *EFIAPI MmioReadBuffer64 (IN UINTN StartAddress, IN UINTN Length, OUT UINT64 *Buffer)
UINT8 *EFIAPI MmioWriteBuffer8 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT8 *Buffer)
UINT16 *EFIAPI MmioWriteBuffer16 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT16 *Buffer)
UINT32 *EFIAPI MmioWriteBuffer32 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT32 *Buffer)
UINT64 *EFIAPI MmioWriteBuffer64 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT64 *Buffer)

Detailed Description

I/O Library MMIO Buffer Functions. The implementations are based on EFI_PEI_SERVICE->CpuIo interface.

Copyright (c) 2007 - 2009, 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.

Definition in file IoLibMmioBuffer.c.


Function Documentation

UINT16* EFIAPI MmioReadBuffer16 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT16 Buffer 
)

Copy data from MMIO region to system memory by using 16-bit access.

Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 16-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If StartAddress is not aligned on a 16-bit boundary, then ASSERT().

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().

If Length is not aligned on a 16-bit boundary, then ASSERT(). If Buffer is not aligned on a 16-bit boundary, then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns:
Buffer

Definition at line 88 of file IoLibMmioBuffer.c.

UINT32* EFIAPI MmioReadBuffer32 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT32 Buffer 
)

Copy data from MMIO region to system memory by using 32-bit access.

Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 32-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If StartAddress is not aligned on a 32-bit boundary, then ASSERT().

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().

If Length is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns:
Buffer

Definition at line 139 of file IoLibMmioBuffer.c.

UINT64* EFIAPI MmioReadBuffer64 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT64 Buffer 
)

Copy data from MMIO region to system memory by using 64-bit access.

Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 64-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If StartAddress is not aligned on a 64-bit boundary, then ASSERT().

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().

If Length is not aligned on a 64-bit boundary, then ASSERT(). If Buffer is not aligned on a 64-bit boundary, then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns:
Buffer

Definition at line 190 of file IoLibMmioBuffer.c.

UINT8* EFIAPI MmioReadBuffer8 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT8 Buffer 
)

Copy data from MMIO region to system memory by using 8-bit access.

Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 8-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns:
Buffer

Definition at line 44 of file IoLibMmioBuffer.c.

UINT16* EFIAPI MmioWriteBuffer16 ( IN UINTN  StartAddress,
IN UINTN  Length,
IN CONST UINT16 Buffer 
)

Copy data from system memory to MMIO region by using 16-bit access.

Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 16-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If StartAddress is not aligned on a 16-bit boundary, then ASSERT().

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().

If Length is not aligned on a 16-bit boundary, then ASSERT().

If Buffer is not aligned on a 16-bit boundary, then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns:
Buffer

Definition at line 284 of file IoLibMmioBuffer.c.

UINT32* EFIAPI MmioWriteBuffer32 ( IN UINTN  StartAddress,
IN UINTN  Length,
IN CONST UINT32 Buffer 
)

Copy data from system memory to MMIO region by using 32-bit access.

Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 32-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If StartAddress is not aligned on a 32-bit boundary, then ASSERT().

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().

If Length is not aligned on a 32-bit boundary, then ASSERT().

If Buffer is not aligned on a 32-bit boundary, then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns:
Buffer

Definition at line 338 of file IoLibMmioBuffer.c.

UINT64* EFIAPI MmioWriteBuffer64 ( IN UINTN  StartAddress,
IN UINTN  Length,
IN CONST UINT64 Buffer 
)

Copy data from system memory to MMIO region by using 64-bit access.

Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 64-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If StartAddress is not aligned on a 64-bit boundary, then ASSERT().

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().

If Length is not aligned on a 64-bit boundary, then ASSERT().

If Buffer is not aligned on a 64-bit boundary, then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns:
Buffer

Definition at line 391 of file IoLibMmioBuffer.c.

UINT8* EFIAPI MmioWriteBuffer8 ( IN UINTN  StartAddress,
IN UINTN  Length,
IN CONST UINT8 Buffer 
)

Copy data from system memory to MMIO region by using 8-bit access.

Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 8-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.

If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().

Parameters:
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns:
Buffer

Definition at line 238 of file IoLibMmioBuffer.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines