diff mbox series

[10/10] mmc-utils: Doc: new secure write protect commands

Message ID 20250407082833.108616-11-avri.altman@sandisk.com
State New
Headers show
Series mmc-utils: Secure Write Protect Mode Enhancements | expand

Commit Message

Avri Altman April 7, 2025, 8:28 a.m. UTC
From: Avri Altman <avri.altman@wdc.com>

This patch updates the tool's man and HOWTO pages with secure write
protect commands documentation.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
---
 docs/HOWTO.rst | 14 ++++++++++++++
 mmc.1          | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)
diff mbox series

Patch

diff --git a/docs/HOWTO.rst b/docs/HOWTO.rst
index 7a27a50..f2f2f35 100644
--- a/docs/HOWTO.rst
+++ b/docs/HOWTO.rst
@@ -93,3 +93,17 @@  Running mmc-utils
 
     ``mmc rpmb read-block <rpmb device> <address> <blocks count> <output file> [key file]``
         Reads blocks of data from the RPMB partition.
+
+    ``mmc rpmb secure-wp-mode-on <rpmb device> <key file>``
+        Enable Secure Write Protection mode.
+
+    ``mmc rpmb secure-wp-mode-off <rpmb device> <key file>``
+        Disable Secure Write Protection mode = legacy mode.
+
+    ``mmc rpmb secure-wp-disable <rpmb device> <key file>``
+        Enable updating WP related EXT_CSD and CSD fields.
+        Applicable only if secure write protect mode is enabled.
+
+    ``mmc rpmb secure-wp-enable <rpmb device> <key file>``
+        Disable updating WP related EXT_CSD and CSD fields.
+        Applicable only if secure write protect mode is enabled.
diff --git a/mmc.1 b/mmc.1
index 921ca19..e4ac7bd 100644
--- a/mmc.1
+++ b/mmc.1
@@ -166,6 +166,45 @@  Block of 256 bytes will be written from data file to
 .br
 Also you can specify '-' instead of key file path or data file to read the data from stdin.
 .TP
+.BI rpmb " " secure\-wp\-mode\-on " " \fIrpmb\-device\fR " " \fIkey\-file\fR
+Enable Secure Write Protection mode.
+.br
+The access to the write protection related EXT_CSD and
+CSD fields depends on the value of SECURE_WP_MASK bit in
+SECURE_WP_MODE_CONFIG field.
+.br
+You can specify '-' instead of key.
+.TP
+.BI rpmb " " secure\-wp\-mode\-off " " \fIrpmb\-device\fR " " \fIkey\-file\fR
+Disable Secure Write Protection mode = legacy mode.
+.br
+TMP_WRITE_PROTECT[12] and PERM_WRITE_PROTECT[13] are updated by CMD27.
+.br
+USER_WP[171], BOOT_WP[173], and BOOT_WP_STATUS[174] are updated by CMD6.
+.br
+You can specify '-' instead of key.
+.TP
+.BI rpmb " " secure\-wp\-disable " " \fIrpmb\-device\fR " " \fIkey\-file\fR
+Enabling updating WP related EXT_CSD and CSD fields.
+.br
+Applicable only if secure wp mode is enabled.
+.br
+You can specify '-' instead of key.
+.TP
+.BI rpmb " " secure\-wp\-enable " " \fIrpmb\-device\fR " " \fIkey\-file\fR
+Disabling updating WP related EXT_CSD and CSD fields.
+.br
+Applicable only if secure wp mode is enabled.
+.br
+You can specify '-' instead of key.
+.TP
+.BI rpmb " " secure\-wp\-en\-read " " \fIrpmb\-device\fR " " [\fIkey\-file\fR]
+Reads the status of the SECURE_WP_EN & SECURE_WP_MASK fields
+.br
+Applicable only if secure wp mode is enabled.
+.br
+You can specify '-' instead of key.
+.TP
 .BI cache " " enable " " \fIdevice\fR
 Enable the eMMC cache feature on the device.
 .br