summaryrefslogtreecommitdiffstats
path: root/util/cbfstool
diff options
context:
space:
mode:
authorThomas Jourdan <thomas.jourdan@gmail.com>2009-08-17 15:19:52 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-08-17 15:19:52 +0000
commite70471b6454a3c4842e2ddd932ed2a6b0a7d86cd (patch)
treeb0a02f72cc10b16fbb23253f7b2b36ae28802158 /util/cbfstool
parentb5034d4703df3d9232be2c02dc805a18196b06d2 (diff)
downloadcoreboot-staging-e70471b6454a3c4842e2ddd932ed2a6b0a7d86cd.zip
coreboot-staging-e70471b6454a3c4842e2ddd932ed2a6b0a7d86cd.tar.gz
Move CBFS header to a safer place.
Signed-off-by: Thomas Jourdan <thomas.jourdan@gmail.com> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4547 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/util.c b/util/cbfstool/util.c
index 054436d..aa7c218 100644
--- a/util/cbfstool/util.c
+++ b/util/cbfstool/util.c
@@ -220,7 +220,7 @@ int create_rom(struct rom *rom, const unsigned char *filename,
/* This is a pointer to the header for easy access */
rom->header = (struct cbfs_header *)
- ROM_PTR(rom, rom->size - 16 - bootblocksize - sizeof(struct cbfs_header));
+ ROM_PTR(rom, rom->size - bootblocksize - sizeof(struct cbfs_header));
rom->header->magic = htonl(HEADER_MAGIC);
rom->header->romsize = htonl(romsize);
rom->header->bootblocksize = htonl(bootblocksize);
@@ -233,7 +233,7 @@ int create_rom(struct rom *rom, const unsigned char *filename,
/* Write the cbfs master header address at the end of the ROM. */
ROM_WRITEL(rom, rom->size - 4,
- 0xFFFFFFF0 - bootblocksize - sizeof(struct cbfs_header));
+ 0xFFFFFFFF - bootblocksize - sizeof(struct cbfs_header) + 1);
/* write the empty header */
rom_set_header(rom, (struct cbfs_file *)rom->ptr, "", -1, CBFS_COMPONENT_NULL);
OpenPOWER on IntegriCloud