cbfstool: Add attributes for position and alignment constraints.

Add functionality to cbfstool to generate file attributes
for position and alignment constraints. This new feature
can be activated with the -g option and will generate,
once the option has been enabled, additional attributes
for the files where position, xip or alignment was specified.

Change-Id: I3db9bd2c20d26b168bc7f320362ed41be349ae3a
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/12967
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Werner Zeh
2016-01-14 13:22:37 +01:00
parent c8d4abd8ba
commit e9995f1469
2 changed files with 73 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
/*
* Copyright (C) 2009 coresystems GmbH
* written by Patrick Georgi <patrick.georgi@coresystems.de>
* Copyright (C) 2016 Siemens AG
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -108,6 +109,8 @@ struct cbfs_file_attribute {
#define CBFS_FILE_ATTR_TAG_UNUSED2 0xffffffff
#define CBFS_FILE_ATTR_TAG_COMPRESSION 0x42435a4c
#define CBFS_FILE_ATTR_TAG_HASH 0x68736148
#define CBFS_FILE_ATTR_TAG_POSITION 0x42435350 /* PSCB */
#define CBFS_FILE_ATTR_TAG_ALIGNMENT 0x42434c41 /* ALCB */
struct cbfs_file_attr_compression {
uint32_t tag;
@@ -125,6 +128,18 @@ struct cbfs_file_attr_hash {
uint8_t hash_data[];
} __PACKED;
struct cbfs_file_attr_position {
uint32_t tag;
uint32_t len;
uint32_t position;
} __PACKED;
struct cbfs_file_attr_align {
uint32_t tag;
uint32_t len;
uint32_t alignment;
} __PACKED;
struct cbfs_stage {
uint32_t compression;
uint64_t entry;