summaryrefslogtreecommitdiff
path: root/src/arch/x86/mmap_boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/mmap_boot.c')
-rw-r--r--src/arch/x86/mmap_boot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/x86/mmap_boot.c b/src/arch/x86/mmap_boot.c
index 0c2b45dd18..ae35451b3c 100644
--- a/src/arch/x86/mmap_boot.c
+++ b/src/arch/x86/mmap_boot.c
@@ -55,8 +55,9 @@ static int cbfs_master_header_props(struct cbfs_props *props)
props->offset = header.offset;
if (CONFIG_ROM_SIZE != header.romsize)
- props->offset += CONFIG_ROM_SIZE - header.romsize;
- props->size = CONFIG_ROM_SIZE;
+ props->size = CONFIG_ROM_SIZE;
+ else
+ props->size = header.romsize;
props->size -= props->offset;
props->size -= header.bootblocksize;
props->size = ALIGN_DOWN(props->size, 64);