From c2bfa357ad3b8f8d56bbd6ef895795e1d2f1dc6b Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Tue, 4 Apr 2017 15:20:47 +1000 Subject: hdata: fix reservation size The hostboot reserved ranges are [start, end] pairs rather than [start, end) so we need to stick a +1 in there to calculate the size properly. Signed-off-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- hdata/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdata/memory.c b/hdata/memory.c index 9b0c766..2df1136 100644 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -475,7 +475,8 @@ static void get_hb_reserved_mem(struct HDIF_common_hdr *ms_vpd) prlog(PR_DEBUG, "MEM: Reserve '%s' %#" PRIx64 "-%#" PRIx64 " (type/inst=0x%08x)\n", label, start_addr, end_addr, be32_to_cpu(hb_resv_mem->type_instance)); - mem_reserve_hw(label, start_addr, end_addr - start_addr); + + mem_reserve_hw(label, start_addr, end_addr - start_addr + 1); } } -- cgit v1.1