summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2015-12-28 20:17:13 +0100
committerMartin Roth <martinroth@google.com>2015-12-29 21:45:23 +0100
commit65e33c08a9a88c52baaadaf515b9591856115a77 (patch)
tree42eb84e45c4bad4c5ead30b69871435c88556f84 /src/arch
parent173fe0732b262a6c3e2b91ca7fe341a50d01f3f8 (diff)
downloadcoreboot-65e33c08a9a88c52baaadaf515b9591856115a77.tar.xz
x86: Align CBFS on top of ROM
Since the introduction of the new (interim?) master header, coreboot searches the whole ROM for CBFS entries. Fix that by aligning it on top of the ROM. Change-Id: I080cd4b746169a36462a49baff5e114b1f6f224a Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/12810 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/mmap_boot.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/arch/x86/mmap_boot.c b/src/arch/x86/mmap_boot.c
index ae35451b3c..0c2b45dd18 100644
--- a/src/arch/x86/mmap_boot.c
+++ b/src/arch/x86/mmap_boot.c
@@ -55,9 +55,8 @@ static int cbfs_master_header_props(struct cbfs_props *props)
props->offset = header.offset;
if (CONFIG_ROM_SIZE != header.romsize)
- props->size = CONFIG_ROM_SIZE;
- else
- props->size = header.romsize;
+ props->offset += CONFIG_ROM_SIZE - header.romsize;
+ props->size = CONFIG_ROM_SIZE;
props->size -= props->offset;
props->size -= header.bootblocksize;
props->size = ALIGN_DOWN(props->size, 64);