Skip to contentSkip to conversation

x86: fsp: Report correct number of E820 table entries

PATCH New Bin Meng 1 participant 1 message Sep 24, 2015 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 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.

---
Simon, I think we need get this fix in v2015.10 release.

 arch/x86/lib/fsp/fsp_dram.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/lib/fsp/fsp_dram.c +2 -1
index 28552fa..e51ca96 100644
@@ -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 */
Signature · 1 line
1.8.2.1