/* This is done by changing the page table attribute to be PRESENT. */
VOID EFIAPI UnsetGuardPage(IN EFI_PHYSICAL_ADDRESS BaseAddress)
/* This is done by changing the page table attribute to be PRESENT. */
VOID EFIAPI UnsetGuardPage(IN EFI_PHYSICAL_ADDRESS BaseAddress)
{
  EFI_STATUS  Status;
  if (mSmmMemoryAttribute != NULL) {
    mOnGuarding = TRUE;
    Status      = mSmmMemoryAttribute->ClearMemoryAttributes (
                                         mSmmMemoryAttribute,
                                         BaseAddress,
                                         EFI_PAGE_SIZE,
                                         EFI_MEMORY_RP|EFI_MEMORY_RO|EFI_MEMORY_XP
                                         );
    ASSERT_EFI_ERROR (Status);
    if (gST == NULL) {
      Status = mSmmMemoryAttribute->SetMemoryAttributes (
                                      mSmmMemoryAttribute,
                                      BaseAddress,
                                      EFI_PAGE_SIZE,
                                      EFI_MEMORY_XP
                                      );
      ASSERT_EFI_ERROR (Status);
    }
    mOnGuarding = FALSE;
  }
}