/* This function finds MAX AML buffer size. It will search the ACPI table installed by ACPI_TABLE protocol. */
EFI_STATUS SdtGetMaxAmlBufferSize(IN VOID *Buffer, OUT UINTN *MaxSize)
/* This function finds MAX AML buffer size. It will search the ACPI table installed by ACPI_TABLE protocol. */
EFI_STATUS SdtGetMaxAmlBufferSize(IN VOID *Buffer, OUT UINTN *MaxSize)
{
  EFI_ACPI_TABLE_LIST  *CurrentTableList;
  CurrentTableList = FindTableByBuffer (Buffer);
  if (CurrentTableList == NULL) {
    return EFI_NOT_FOUND;
  }
  *MaxSize = (UINTN)CurrentTableList->Table + CurrentTableList->Table->Length - (UINTN)Buffer;
  return EFI_SUCCESS;
}