// Copyright (c) 2018, Intel Corporation.
// SPDX-License-Identifier: BSD-3-Clause

ifdef::manpage[]
ipmctl-delete-pcd(1)
====================
endif::manpage[]

NAME
----
ipmctl-delete-pcd - Clears select partition data from the PCD

SYNOPSIS
--------
[verse]
ifndef::os_build[]
ipmctl delete [OPTIONS] -dimm (DimmIds) -pcd (Config|LSA)
endif::os_build[]
ifdef::os_build[]
ipmctl delete [OPTIONS] -dimm (DimmIds) -pcd (Config)
endif::os_build[]

DESCRIPTION
-----------
ifndef::os_build[]
When LSA is specified, the namespace label storage area partition in the platform configuration
data from one or more DCPMMs is cleared. This is a destructive operation which will clear
the entire namespace label storage area including all namespaces labels and the
namespace label index block in order to re-purpose the DCPMM(s) for use in a
different operating system. All data on any deleted namespace(s) becomes
inaccessible.

NOTE: Deleting PCD LSA partition data removes any logical OS namespace mapping
to the persistent memory data, but does not explicitly delete or modify user
data found in persistent memory.
endif::os_build[]

When Config is specified, the Current, Input, and Output Data Size and Start Offset values in
the Configuration header are set to zero, making those tables invalid.

NOTE: This action can be useful when moving DCPMMs from one system to another, as goal creation
rules may restrict provisioning dimms with an existing configuration.

NOTE: When Config is specified, only PCD partition 1 is modified. If the platform is rebooted
prior to creating a new goal on any targeted DCPMMs, UEFI platform firmware will detect the
missing tables and, if possible, restore previous config using the PCD partition 0 tables.

WARNING: *This command may result in data loss. Data should be backed up
to other storage before executing this command*.

OPTIONS
-------
-f::
-force::
  Deleting the PCD data is a destructive operation which
  requires confirmation from the user for each DCPMM. This option suppresses the
  confirmation.

-h::
-help::
  Displays help for the command.

TARGETS
-------
-dimm (DimmIDs)::
  Deletes the PCD data on specific DCPMMs by supplying one
  or more comma-separated DCPMM identifiers. The default is to delete the
  PCD data for all manageable DCPMMs.
ifndef::os_build[]
-pcd (Config|LSA)::
  Restricts clearing select partition data in the platform
  configuration data area.
  The default is to clear both. One of:
  - Config - Configuration management information
  - LSA - Namespace label storage area
endif::os_build[]
ifdef::os_build[]
-pcd Config::
  Clears the configuration management information
endif::os_build[]

EXAMPLES
--------
ifndef::os_build[]
Clears the namespace label storage area from all manageable DCPMMs
[verse]
delete -dimm -pcd LSA
endif::os_build[]

Clears the Cin, Cout, Ccur tables from all manageable DCPMMs
[verse]
delete -dimm -pcd Config

LIMITATIONS
-----------
The specified DCPMM(s) must be manageable by the host software, and if
data-at-rest security is enabled, the DCPMMs must be unlocked. Any existing
namespaces associated with the requested DCPMM(s) should be deleted before
running this command.

RETURN DATA
-----------
For each DCPMM, the CLI will indicate the status of the operation. If a failure occurs
when deleting the platform configuration data from multiple DCPMMs, the process will
continue deleting the remaining DCPMMs.
