summaryrefslogtreecommitdiff
path: root/common/fmap.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-17 10:58:46 -0700
committerGerrit <chrome-bot@google.com>2012-07-17 14:41:00 -0700
commitc89edce83f1002bf221119267bc74f926c70e2c8 (patch)
tree7c13ebc3085bffa0e3c59d6575aeb0e1b6f58e28 /common/fmap.c
parenteb93d200bee773836098d9bc0b7afd77c3155b23 (diff)
downloadchrome-ec-c89edce83f1002bf221119267bc74f926c70e2c8.tar.gz
Don't waste space on vblock and root key if not doing sig-based EC vboot
BUG=chrome-os-partner:11455 TEST=dump_fmap build/link/ec.bin; shouldn't see VBLOCK or ROOT_KEY sections Change-Id: I8c1309936d86772fdf9aecdc8d95f0578ef0f65b Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27661
Diffstat (limited to 'common/fmap.c')
-rw-r--r--common/fmap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/fmap.c b/common/fmap.c
index 82a380f031..ea2b1ba93c 100644
--- a/common/fmap.c
+++ b/common/fmap.c
@@ -39,8 +39,12 @@ typedef struct _FmapAreaHeader {
uint16_t area_flags;
} __packed FmapAreaHeader;
-
+#ifdef CONFIG_VBOOT_SIG
#define NUM_EC_FMAP_AREAS 13
+#else
+#define NUM_EC_FMAP_AREAS 11
+#endif
+
const struct _ec_fmap {
FmapHeader header;
FmapAreaHeader area[NUM_EC_FMAP_AREAS];
@@ -80,12 +84,14 @@ const struct _ec_fmap {
},
/* Other RO stuff: FMAP, GBB, etc. */
+#ifdef CONFIG_VBOOT_SIG
{
.area_name = "ROOT_KEY",
.area_offset = CONFIG_VBOOT_ROOTKEY_OFF,
.area_size = CONFIG_VBOOT_ROOTKEY_SIZE,
.area_flags = FMAP_AREA_STATIC | FMAP_AREA_RO,
},
+#endif
{
.area_name = "FMAP",
.area_offset = (uint32_t)&ec_fmap,
@@ -144,11 +150,13 @@ const struct _ec_fmap {
.area_size = sizeof(version_data.version),
.area_flags = FMAP_AREA_STATIC,
},
+#ifdef CONFIG_VBOOT_SIG
{
.area_name = "VBLOCK_A",
.area_offset = CONFIG_VBLOCK_RW_OFF,
.area_size = CONFIG_VBLOCK_SIZE,
.area_flags = FMAP_AREA_STATIC,
},
+#endif
}
};