/* Check whether the address is within any of the MMRAM ranges. */
BOOLEAN EFIAPI IsAddressInMmram(IN EFI_PHYSICAL_ADDRESS Address, IN EFI_MMRAM_DESCRIPTOR *MmramRanges, IN UINTN MmramRangeCount)
/* Check whether the address is within any of the MMRAM ranges. */
BOOLEAN EFIAPI IsAddressInMmram(IN EFI_PHYSICAL_ADDRESS Address, IN EFI_MMRAM_DESCRIPTOR *MmramRanges, IN UINTN MmramRangeCount)
{
  UINTN  Index;
  for (Index = 0; Index < MmramRangeCount; Index++) {
    if ((Address >= MmramRanges[Index].CpuStart) &&
        (Address < (MmramRanges[Index].CpuStart + MmramRanges[Index].PhysicalSize)))
    {
      return TRUE;
    }
  }
  return FALSE;
}