From 67d5998d9778ef6f740aac4ed1c93fb311b32ebe Mon Sep 17 00:00:00 2001 From: Sol Boucher Date: Thu, 7 May 2015 02:39:22 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/10136 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/cbfstool/cbfs_image.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'util/cbfstool/cbfs_image.h') diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h index 024edc5dee..5ff8a9abef 100644 --- a/util/cbfstool/cbfs_image.h +++ b/util/cbfstool/cbfs_image.h @@ -22,8 +22,6 @@ #include "common.h" #include "cbfs.h" -#define IS_TOP_ALIGNED_ADDRESS(x) ((uint32_t)(x) > 0x80000000) - /* CBFS image processing */ struct cbfs_image { @@ -88,7 +86,7 @@ int cbfs_export_entry(struct cbfs_image *image, const char *entry_name, /* Adds an entry to CBFS image by given name and type. If content_offset is * non-zero, try to align "content" (CBFS_SUBHEADER(p)) at content_offset. - * Note that top-aligned addresses are only supported for legacy CBFSes. + * Never pass this function a top-aligned address: convert it to an offset. * Returns 0 on success, otherwise non-zero. */ int cbfs_add_entry(struct cbfs_image *image, struct buffer *buffer, const char *name, uint32_t type, uint32_t content_offset); -- cgit v1.2.3