/* This is done by changing the page table attribute to be NOT PRSENT. */
VOID EFIAPI SetGuardPage(IN EFI_PHYSICAL_ADDRESS BaseAddress)
/* This is done by changing the page table attribute to be NOT PRSENT. */
VOID EFIAPI SetGuardPage(IN EFI_PHYSICAL_ADDRESS BaseAddress)
{
  EFI_STATUS  Status;
  if (gCpu == NULL) {
    return;
  }
  mOnGuarding = TRUE;
  Status = gCpu->SetMemoryAttributes (gCpu, BaseAddress, EFI_PAGE_SIZE, EFI_MEMORY_RP);
  ASSERT_EFI_ERROR (Status);
  mOnGuarding = FALSE;
}