summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-10-16 13:57:12 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-17 13:02:49 -0700
commit465eaf4d7ec68bd19b6f1ab9d7e50bb0ed2f0c9e (patch)
tree308f2b08dec3b4aca8f5e09e660b69d1305bcf6e
parent20c94b726e548c47a5237d60ac78c6f1e166e97b (diff)
downloadchrome-ec-465eaf4d7ec68bd19b6f1ab9d7e50bb0ed2f0c9e.tar.gz
Fizz: Add EC_RW_B in FMAP
This patch adds EC_RW_B entry in the FMAP. This allows FAFT to locate the RW_B image and manipulate it. BUG=b:64614832,b:67748602 BRANCH=none TEST=Run futility dump_fmap ec.bin. Change-Id: I03aec945e0c8c3e08fc629a34ea6e5183bcccb61 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/722024 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/fmap.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/common/fmap.c b/common/fmap.c
index 9b649c7db2..b2dc24e9b8 100644
--- a/common/fmap.c
+++ b/common/fmap.c
@@ -73,10 +73,16 @@ struct fmap_area_header {
#else
#define NUM_EC_FMAP_AREAS_ROLLBACK 0
#endif
+#ifdef CONFIG_RW_B
+#define NUM_EC_FMAP_AREAS_RW_B 1
+#else
+#define NUM_EC_FMAP_AREAS_RW_B 0
+#endif
#define NUM_EC_FMAP_AREAS (7 + \
NUM_EC_FMAP_AREAS_RWSIG + \
- NUM_EC_FMAP_AREAS_ROLLBACK)
+ NUM_EC_FMAP_AREAS_ROLLBACK + \
+ NUM_EC_FMAP_AREAS_RW_B)
const struct _ec_fmap {
struct fmap_header header;
@@ -217,5 +223,17 @@ const struct _ec_fmap {
.area_flags = FMAP_AREA_STATIC | FMAP_AREA_RO,
},
#endif
+#ifdef CONFIG_RW_B
+ /* RW Firmware */
+ {
+ /* The range of RW firmware to be auto-updated. */
+ .area_name = "EC_RW_B",
+ .area_offset = CONFIG_EC_WRITABLE_STORAGE_OFF -
+ FMAP_REGION_START + CONFIG_RW_STORAGE_OFF +
+ CONFIG_RW_SIZE,
+ .area_size = CONFIG_RW_SIZE,
+ .area_flags = FMAP_AREA_STATIC | FMAP_AREA_RO,
+ },
+#endif
}
};