diff options
author | Sol Boucher <solb@chromium.org> | 2015-05-07 02:39:22 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-05-13 22:23:37 +0200 |
commit | 67d5998d9778ef6f740aac4ed1c93fb311b32ebe (patch) | |
tree | d28f767a9f8f4230125a34914b9005bd3601fdea /util/cbfstool/partitioned_file.c | |
parent | 67a0a864be0e8b81f22ebb9d6f090d77d1da2924 (diff) | |
download | coreboot-67d5998d9778ef6f740aac4ed1c93fb311b32ebe.tar.gz coreboot-67d5998d9778ef6f740aac4ed1c93fb311b32ebe.tar.bz2 coreboot-67d5998d9778ef6f740aac4ed1c93fb311b32ebe.zip |
cbfstool: Support top-aligned addresses for new-format images
The cbfstool handling of new-style FMAP-driven "partitioned" images
originally disallowed the use of x86-style top-aligned addresses with
the add.* and layout actions because it wasn't obvious how they should
work, especially since the normal addressing is done relative to each
individual region for these types of images. Not surprisingly,
however, the x86 portions of the build system make copious use of
top-aligned addresses, so this allows their use with new images and
specifies their behavior as being relative to the *image* end---not
the region end---just as it is for legacy images.
Change-Id: Icecc843f4f8b6bb52aa0ea16df771faa278228d2
Signed-off-by: Sol Boucher <solb@chromium.org>
Reviewed-on: http://review.coreboot.org/10136
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/cbfstool/partitioned_file.c')
-rw-r--r-- | util/cbfstool/partitioned_file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/cbfstool/partitioned_file.c b/util/cbfstool/partitioned_file.c index 700a2d34c1be..3f47a26deac8 100644 --- a/util/cbfstool/partitioned_file.c +++ b/util/cbfstool/partitioned_file.c @@ -290,6 +290,13 @@ bool partitioned_file_is_partitioned(const partitioned_file_t *file) return partitioned_file_get_fmap(file) != NULL; } +size_t partitioned_file_total_size(const partitioned_file_t *file) +{ + assert(file); + + return file->buffer.size; +} + bool partitioned_file_region_check_magic(const partitioned_file_t *file, const char *region, const char *magic, size_t magic_len) { |