/* Allocate one page for creating 4KB-page based on 2MB-page. */
VOID AcquirePage(UINT64 *Uplink)
/* Allocate one page for creating 4KB-page based on 2MB-page. */
VOID AcquirePage(UINT64 *Uplink)
{
  UINT64  Address;
  Address = mPFPageBuffer + EFI_PAGES_TO_SIZE (mPFPageIndex);
  ZeroMem ((VOID *)(UINTN)Address, EFI_PAGE_SIZE);
  if ((mPFPageUplink[mPFPageIndex] != NULL) && ((*mPFPageUplink[mPFPageIndex] & ~mAddressEncMask & PHYSICAL_ADDRESS_MASK) == Address)) {
    *mPFPageUplink[mPFPageIndex] = 0;
  }
  *Uplink                     = Address | mAddressEncMask | PAGE_ATTRIBUTE_BITS;
  mPFPageUplink[mPFPageIndex] = Uplink;
  mPFPageIndex = (mPFPageIndex + 1) % MAX_PF_PAGE_COUNT;
}