summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-09-28 02:11:59 -0700
committerSimon Glass <sjg@chromium.org>2015-09-28 21:56:27 -0700
commit196193a4d4963a8dde00c7cdd0ec83b60ea61e61 (patch)
tree5690f39a5d2c2684d78fa701893904bc89a23aae /arch/x86/lib
parentc1446ac6c11dab19490a552f16ab39df8d5b3de3 (diff)
downloadu-boot-imx-196193a4d4963a8dde00c7cdd0ec83b60ea61e61.zip
u-boot-imx-196193a4d4963a8dde00c7cdd0ec83b60ea61e61.tar.gz
u-boot-imx-196193a4d4963a8dde00c7cdd0ec83b60ea61e61.tar.bz2
x86: fsp: Report correct number of E820 table entries
The logic to calculate the number of E820 table entries is wrong when walking through the FSP HOB tables. Fix it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Jian Luo <jian.luo4@boschrexroth.de> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/fsp/fsp_dram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 28552fa..e51ca96 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -72,9 +72,10 @@ unsigned install_e820_map(unsigned max_entries, struct e820entry *entries)
entries[num_entries].type = E820_RAM;
else if (res_desc->type == RES_MEM_RESERVED)
entries[num_entries].type = E820_RESERVED;
+
+ num_entries++;
}
hdr = get_next_hob(hdr);
- num_entries++;
}
/* Mark PCIe ECAM address range as reserved */