From: Bin Meng Date: Mon, 28 Sep 2015 02:11:59 -0700 Subject: [U-Boot] [PATCH v2 02/13] x86: fsp: Report correct number of E820 table entries In-Reply-To: <1443431530-472-1-git-send-email-bmeng.cn@gmail.com> References: <1443431530-472-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1443431530-472-3-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Simon, I think we need get this fix in v2015.10 release. Changes in v2: None arch/x86/lib/fsp/fsp_dram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 1.8.2.1