summaryrefslogtreecommitdiff
path: root/tools/binman/fmap_util.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-02-12 17:11:15 -0700
committerSimon Glass <sjg@chromium.org>2023-03-08 11:38:48 -0800
commit9dbb02b9d124e03a141de1244c8b4f4843d58840 (patch)
tree34d2b3caae1d50c2ab29786a6e613fdd2041b49d /tools/binman/fmap_util.py
parent139c464c2ac5027b200ef9b4a66024a9daa39969 (diff)
binman: Support marking FMAP areas as preserved
Add an entry flag called 'preserve' to indicate that an entry should be preserved by firmware updates. Propagate this to FMAP too. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/fmap_util.py')
-rw-r--r--tools/binman/fmap_util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/binman/fmap_util.py b/tools/binman/fmap_util.py
index 1ce63d1a832..82e0f74d50f 100644
--- a/tools/binman/fmap_util.py
+++ b/tools/binman/fmap_util.py
@@ -45,6 +45,9 @@ FMAP_AREA_NAMES = (
'flags',
)
+# Flags supported by areas (bits 2:0 are unused so not included here)
+FMAP_AREA_PRESERVE = 1 << 3 # Preserved by any firmware updates
+
# These are the two data structures supported by flashrom, a header (which
# appears once at the start) and an area (which is repeated until the end of
# the list of areas)