From e70471b6454a3c4842e2ddd932ed2a6b0a7d86cd Mon Sep 17 00:00:00 2001 From: Thomas Jourdan Date: Mon, 17 Aug 2009 15:19:52 +0000 Subject: Move CBFS header to a safer place. Signed-off-by: Thomas Jourdan Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4547 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/cbfstool/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/cbfstool/util.c b/util/cbfstool/util.c index 054436d8ca..aa7c2183fc 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); -- cgit v1.2.3