/* Hook function used to set all Guard pages after entering SMM mode.  */
VOID SmmEntryPointMemoryManagementHook(VOID)
/* Hook function used to set all Guard pages after entering SMM mode.  */
VOID SmmEntryPointMemoryManagementHook(VOID)
{
  EFI_STATUS  Status;
  if (mSmmMemoryAttribute == NULL) {
    Status = SmmLocateProtocol (
               &gEdkiiSmmMemoryAttributeProtocolGuid,
               NULL,
               (VOID **)&mSmmMemoryAttribute
               );
    if (!EFI_ERROR (Status)) {
      SetAllGuardPages ();
    }
  }
}