/* Calculate the last (inclusive) address of a range. */
STATIC UINT64 GetRangeEnd(IN UINT64 Start, IN UINT64 Size, IN UINT64 MaxValue)
/* Calculate the last (inclusive) address of a range. */
STATIC UINT64 GetRangeEnd(IN UINT64 Start, IN UINT64 Size, IN UINT64 MaxValue)
{
  if (IS_RANGE_INVALID (Start, Size, MaxValue)) {
    return 0;
  }
  return Start + Size - 1;
}