/* If the resource data element is of the large type, the Header is expected to be at least 3 bytes long. */
UINT32 EFIAPI AmlRdGetSize(IN CONST AML_RD_HEADER *Header)
/* If the resource data element is of the large type, the Header is expected to be at least 3 bytes long. */
UINT32 EFIAPI AmlRdGetSize(IN CONST AML_RD_HEADER *Header)
{
  if (Header == NULL) {
    ASSERT (0);
    return FALSE;
  }
  if (AML_RD_IS_LARGE (Header)) {
    return ((ACPI_LARGE_RESOURCE_HEADER *)Header)->Length +
           sizeof (ACPI_LARGE_RESOURCE_HEADER);
  }
  return ((ACPI_SMALL_RESOURCE_HEADER *)Header)->Bits.Length +
         sizeof (ACPI_SMALL_RESOURCE_HEADER);
}