/* If Length is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT(). */
UINT32* EFIAPI MmioReadBuffer32(IN UINTN StartAddress, IN UINTN Length, OUT UINT32 *Buffer)
/* If Length is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT(). */
UINT32* EFIAPI MmioReadBuffer32(IN UINTN StartAddress, IN UINTN Length, OUT UINT32 *Buffer)
{
  UINT32  *ReturnBuffer;
  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN)Buffer));
  ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
  ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0);
  ReturnBuffer = Buffer;
  while (Length != 0) {
    *(Buffer++)   = MmioRead32 (StartAddress);
    StartAddress += sizeof (UINT32);
    Length       -= sizeof (UINT32);
  }
  return ReturnBuffer;
}