coreboot-kgpe-d16/util/cbfstool
Hung-Te Lin e4ea2ca18d cbfstool locate: Implement alignment switch --align/-a
cbfstool usage change:
 "-a" for "cbfstool locate" can specify base address alignment.

To support putting a blob in aligned location (ex, microcode needs to be aligned
in 0x10), alignment (-a) is implemented into "locate" command.

Verified by manually testing a file (324 bytes) with alignment=0x10:
 cbfstool coreboot.rom locate -f test -n test -a 0x10
 # output: 0x71fdd0
 cbfstool coreboot.rom add -f test -n test -t raw -b 0x71fdd0
 cbfstool coreboot.rom print -v -v
 # output: test                           0x71fd80   raw          324
 # output:  cbfs_file=0x71fd80, offset=0x50, content_address=0x71fdd0+0x144

Also verified to be compatible with old behavior by building i386/axus/tc320
(with page limitation 0x40000):
 cbfstool coreboot.rom locate -f romstage_null.bin -n romstage -P 0x40000
 # output: 0x44
 cbfstool coreboot.rom locate -f x.bin -n romstage -P 0x40000 -a 0x30
 # output: 0x60

Change-Id: I78b549fe6097ce5cb6162b09f064853827069637
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2824
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
2013-03-20 05:47:32 +01:00
..
lzma cbfstool: Update LZMA encoder to LZMA SDK 9.12 2012-11-12 18:35:52 +01:00
EXAMPLE cbfstool: Update example file. 2013-02-04 11:12:15 +01:00
Makefile cbfstool: Add `-Werror` to make all warnings into errors 2013-02-18 12:10:44 +01:00
Makefile.inc cbfstool: Add cbfs_image new CBFS image manipulation API. 2013-02-05 22:25:02 +01:00
cbfs-mkpayload.c cbfstool: Fix compile warnings caused by incorrect data types. 2013-02-18 12:28:43 +01:00
cbfs-mkstage.c cbfstool: Use cbfs_image API for "add-*" (add-payload, add-stage, ...) commands. 2013-02-05 22:27:20 +01:00
cbfs.h cbfstool: Use cbfs_image API for "print" command. 2013-02-05 22:25:13 +01:00
cbfs_image.c cbfstool locate: Implement alignment switch --align/-a 2013-03-20 05:47:32 +01:00
cbfs_image.h cbfstool locate: Implement alignment switch --align/-a 2013-03-20 05:47:32 +01:00
cbfstool.c cbfstool locate: Implement alignment switch --align/-a 2013-03-20 05:47:32 +01:00
coff.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
common.c cbfstool: Add buffer management API. 2013-02-05 22:24:45 +01:00
common.h cbfstool: support parsing UEFI firmware volumes 2013-02-05 22:43:23 +01:00
compress.c cbfstool: Add -v (verbose) output. 2013-02-01 05:54:24 +01:00
elf.h fix some wrong versions of the FSF's address (trivial) 2009-09-23 21:52:45 +00:00
fv.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
swab.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00