/* If StartAddress > 0x0FFFFFFF, then ASSERT(). If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT(). If Size > 0 and Buffer is NULL, then ASSERT(). */
UINTN EFIAPI S3PciReadBuffer(IN UINTN StartAddress, IN UINTN Size, OUT VOID *Buffer)
/* If StartAddress > 0x0FFFFFFF, then ASSERT(). If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT(). If Size > 0 and Buffer is NULL, then ASSERT(). */
UINTN EFIAPI S3PciReadBuffer(IN UINTN StartAddress, IN UINTN Size, OUT VOID *Buffer)
{
  RETURN_STATUS  Status;
  Status = S3BootScriptSavePciCfgWrite (
             S3BootScriptWidthUint8,
             PCILIB_TO_COMMON_ADDRESS (StartAddress),
             PciReadBuffer (StartAddress, Size, Buffer),
             Buffer
             );
  ASSERT (Status == RETURN_SUCCESS);
  return Size;
}