From a8204dd34d90ac9ab2783e1dd486ec781d4c0dba Mon Sep 17 00:00:00 2001 From: Nikolai Artemiev Date: Thu, 11 Nov 2021 21:15:44 +1100 Subject: cli_classic: add writeprotect CLI and update man page Tested with: GD25LQ128, GD25Q32, GD25Q256. BUG=b:195381327,b:153800563 BRANCH=none TEST=flashrom -{r,w,E} TEST=flashrom --wp-{enable,disable,range,region,list,status} Change-Id: I499f521781ee8999921996517802c0c0c641d869 Signed-off-by: Nikolai Artemiev Reviewed-on: https://review.coreboot.org/c/flashrom/+/58738 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Edward O'Callaghan Reviewed-by: Sergii Dmytruk --- flashrom.8.tmpl | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'flashrom.8.tmpl') diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl index bf8960fb9..db6d619f5 100644 --- a/flashrom.8.tmpl +++ b/flashrom.8.tmpl @@ -48,8 +48,10 @@ flashrom \- detect, read, write, verify and erase flash chips \fB\-p\fR [:] [\fB\-c\fR ] (\fB\-\-flash\-name\fR|\fB\-\-flash\-size\fR| [\fB\-E\fR|\fB\-x\fR|\fB\-r\fR |\fB\-w\fR |\fB\-v\fR ] - [(\fB\-l\fR |\fB\-\-ifd|\fB \-\-fmap\fR|\fB\-\-fmap-file\fR ) + [(\fB\-l\fR |\fB\-\-ifd\fR|\fB \-\-fmap\fR|\fB\-\-fmap-file\fR ) [\fB\-i\fR [:]]] + [\fB\-\-wp\-status\fR] [\fB\-\-wp\-list\fR] [\fB\-\-wp\-enable\fR|\fB\-\-wp\-disable\fR] + [\fB\-\-wp\-range\fR ,|\fB\-\-wp\-region\fR ] [\fB\-n\fR] [\fB\-N\fR] [\fB\-f\fR])] [\fB\-V\fR[\fBV\fR[\fBV\fR]]] [\fB-o\fR ] .SH DESCRIPTION @@ -285,11 +287,38 @@ to the ROM, run: .sp .B " flashrom \-p prog \-l \-i foo:foo.bin -i bar:bar.bin -w rom.bin .TP +.B "\-\-wp\-status" +Prints the flash's current status register protection mode and write protection +range. +.TP +.B "\-\-wp\-list" +Prints a list of all protection ranges that the flash supports. +.TP +.B "\-\-wp\-enable" +Enables hardware status register protection (SRP) if the flash supports it. +Once SRP is enabled, operations that change the flash's status registers +(including \fB\-\-wp\-disable\fR and \fB\-\-wp\-range\fR) can only be performed +if the flash's #WP pin is at an inactive logic level. +.TP +.B "\-\-wp\-disable" +Disables status register protection if the flash allows it. +.TP +.B "\-\-wp\-range ," +Configures the flash to protect a range of addresses from to ( + + - 1), bounds inclusive. The range must be supported by the flash, see +\fB\-\-wp\-list\fR. +.TP +.B "\-\-wp\-region " +Same as \fB\-\-wp\-range\fR but protects the range occupied by an image region. +This option requires a image layout to be specified, see \fB\-\-layout\fR. The +region must be supported by the flash, see +\fB\-\-wp\-list\fR. +.TP .B "\-\-flash\-name" -Prints out the detected flash chips name. +Prints out the detected flash chip's name. .TP .B "\-\-flash\-size" -Prints out the detected flash chips size. +Prints out the detected flash chip's size. .TP .B "\-\-flash\-contents " The file contents of -- cgit v1.2.3