/* Helper function to allocate pages without Guard for internal uses. */
VOID* PageAlloc(IN UINTN Pages)
/* Helper function to allocate pages without Guard for internal uses. */
VOID* PageAlloc(IN UINTN Pages)
{
  EFI_STATUS            Status;
  EFI_PHYSICAL_ADDRESS  Memory;
  Status = SmmInternalAllocatePages (
             AllocateAnyPages,
             EfiRuntimeServicesData,
             Pages,
             &Memory,
             FALSE
             );
  if (EFI_ERROR (Status)) {
    Memory = 0;
  }
  return (VOID *)(UINTN)Memory;
}