From: Bin Meng Date: Mon, 28 Sep 2015 09:11:59 +0000 (-0700) Subject: x86: fsp: Report correct number of E820 table entries X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=196193a4d4963a8dde00c7cdd0ec83b60ea61e61;p=u-boot.git 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 Tested-by: Jian Luo Acked-by: Simon Glass --- diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index 28552fa15a..e51ca96eb7 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 */