diff options
-rw-r--r-- | common/fmap.c | 20 |
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 } }; |