/* If any reserved bits in StartAddress are set, then ASSERT(). If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT(). If Size > 0 and Buffer is NULL, then ASSERT(). */
UINTN EFIAPI S3PciSegmentWriteBuffer(IN UINT64 StartAddress, IN UINTN Size, IN VOID *Buffer)
/* If any reserved bits in StartAddress are set, then ASSERT(). If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT(). If Size > 0 and Buffer is NULL, then ASSERT(). */
UINTN EFIAPI S3PciSegmentWriteBuffer(IN UINT64 StartAddress, IN UINTN Size, IN VOID *Buffer)
{
  RETURN_STATUS  Status;
  Status = S3BootScriptSavePciCfg2Write (
             S3BootScriptWidthUint8,
             RShiftU64 (StartAddress, 32) & 0xffff,
             PCI_SEGMENT_LIB_ADDRESS_TO_S3_BOOT_SCRIPT_PCI_ADDRESS (StartAddress),
             PciSegmentWriteBuffer (StartAddress, Size, Buffer),
             Buffer
             );
  ASSERT_RETURN_ERROR (Status);
  return Size;
}