/* This API function disables the variable policy enforcement. If it's already been called once, will return EFI_ALREADY_STARTED. */
EFI_STATUS EFIAPI DisableVariablePolicy(VOID)
/* This API function disables the variable policy enforcement. If it's already been called once, will return EFI_ALREADY_STARTED. */
EFI_STATUS EFIAPI DisableVariablePolicy(VOID)
{
  if (!IsVariablePolicyLibInitialized ()) {
    return EFI_NOT_READY;
  }
  if (mProtectionDisabled) {
    return EFI_ALREADY_STARTED;
  }
  if (mInterfaceLocked) {
    return EFI_WRITE_PROTECTED;
  }
  if (!PcdGetBool (PcdAllowVariablePolicyEnforcementDisable)) {
    return EFI_WRITE_PROTECTED;
  }
  mProtectionDisabled = TRUE;
  return EFI_SUCCESS;
}