diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2017-03-17 16:13:06 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-24 12:42:37 +1100 |
commit | e29613b050ad9b35f9305cc23f4cadcce4606f39 (patch) | |
tree | de7695b74051f942e4456f34f357c506eb460d8d /libflash/ffs.h | |
parent | 602dee4505cd0ceb5b69f056ec403f982b585791 (diff) | |
download | talos-skiboot-e29613b050ad9b35f9305cc23f4cadcce4606f39.tar.gz talos-skiboot-e29613b050ad9b35f9305cc23f4cadcce4606f39.zip |
libffs: Understand how to create FFS partition TOCs and entries.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash/ffs.h')
-rw-r--r-- | libflash/ffs.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libflash/ffs.h b/libflash/ffs.h index 64e5e6a1..6ba77136 100644 --- a/libflash/ffs.h +++ b/libflash/ffs.h @@ -54,6 +54,29 @@ enum ffs_type { FFS_TYPE_PARTITION = 3, }; +/* + * Flag bit definitions + */ +#define FFS_FLAGS_PROTECTED 0x0001 +#define FFS_FLAGS_U_BOOT_ENV 0x0002 + +/* Data integrity flags */ +#define FFS_ENRY_INTEG_ECC 0x8000 + +/* + * User verCheck definitions + */ +#define FFS_VERCHECK_SHA512V 0x80 +#define FFS_VERCHECK_SHA512EC 0x40 + +/* + * User miscFlags + */ +#define FFS_MISCFLAGS_PRESERVED 0x80 +#define FFS_MISCFLAGS_READONLY 0x40 +#define FFS_MISCFLAGS_BACKUP 0x20 +#define FFS_MISCFLAGS_REPROVISION 0x10 + /** * struct __ffs_entry_user - On flash user data entries * @@ -186,9 +209,12 @@ struct __ffs_hdr { */ struct ffs_hdr { uint32_t version; + uint32_t base; uint32_t size; uint32_t block_size; uint32_t block_count; + struct ffs_entry *backup; + struct ffs_hdr *side; struct list_head entries; }; |