/* Check if Execute Disable Bit (IA32_EFER.NXE) should be enabled or not. */
BOOLEAN IsEnableNonExecNeeded(VOID)
/* Check if Execute Disable Bit (IA32_EFER.NXE) should be enabled or not. */
BOOLEAN IsEnableNonExecNeeded(VOID)
{
  if (!IsExecuteDisableBitAvailable ()) {
    return FALSE;
  }
  return (PcdGetBool (PcdSetNxForStack) ||
          PcdGet64 (PcdDxeNxMemoryProtectionPolicy) != 0 ||
          PcdGet32 (PcdImageProtectionPolicy) != 0);
}