summaryrefslogtreecommitdiff
path: root/chip/g/flash_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'chip/g/flash_info.h')
-rw-r--r--chip/g/flash_info.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/chip/g/flash_info.h b/chip/g/flash_info.h
index 9ff730b39e..e07fac1ed7 100644
--- a/chip/g/flash_info.h
+++ b/chip/g/flash_info.h
@@ -11,17 +11,24 @@
#include "signed_header.h"
/*
- * Info1 space available to the app firmware is split in several areas. Of
- * interest are the two spaces used for rollback prevention of RO and RW image
- * versions.
+ * Info1 space available to the app firmware is split in four equal size
+ * areas, used as follows:
*
- * Each bit in the image infomap header section is mapped into a 4 byte word
- * in the Info1 space.
+ * Area 0 - RO rollback prevention
+ * Area 1 - RW rollback prevention
+ * Area 2 - Board specific stuff
+ * Area 3 - Crypto scratch
*/
+#define INFO_AREA_SIZE (INFO_MAX * 4)
+#define INFO_TOTAL_SIZE (INFO_AREA_SIZE * 4)
+
#define INFO_RO_MAP_OFFSET 0
-#define INFO_RO_MAP_SIZE (INFO_MAX * 4)
-#define INFO_RW_MAP_OFFSET INFO_RO_MAP_SIZE
-#define INFO_RW_MAP_SIZE (INFO_MAX * 4)
+#define INFO_RO_MAP_SIZE INFO_AREA_SIZE
+
+#define INFO_RW_MAP_OFFSET (INFO_RO_MAP_OFFSET + INFO_RO_MAP_SIZE)
+#define INFO_RW_MAP_SIZE INFO_AREA_SIZE
+
+#define INFO_BOARD_SPACE_OFFSET (INFO_RW_MAP_OFFSET + INFO_RW_MAP_SIZE)
int flash_info_read_enable(uint32_t offset, size_t size);
/* This in fact enables both read and write. */