From 0bb3f7142aecdf883cc28bd9b771bdba3da5d7d9 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 29 Mar 2017 16:44:33 +0200 Subject: ich_descriptors: Draw +0xfff into ICH_FREG_LIMIT() The condition `base > limit` is still valid since `base` is always at least 4096 greater than `limit` in this case. Change-Id: I11ac0a50b3f32f47879e7cfb7a26068cd0572ede Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/19046 Reviewed-by: David Hendricks Tested-by: build bot (Jenkins) --- ich_descriptors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ich_descriptors.c') diff --git a/ich_descriptors.c b/ich_descriptors.c index 1fc8835ea..3e53ec9d6 100644 --- a/ich_descriptors.c +++ b/ich_descriptors.c @@ -246,7 +246,7 @@ static void pprint_freg(const struct ich_desc_region *reg, uint32_t i) if (base > limit) msg_pdbg2("is unused.\n"); else - msg_pdbg2("0x%08x - 0x%08x\n", base, limit | 0x0fff); + msg_pdbg2("0x%08x - 0x%08x\n", base, limit); } void prettyprint_ich_descriptor_region(const struct ich_descriptors *desc) @@ -952,7 +952,7 @@ int layout_from_ich_descriptors(struct ich_layout *const layout, const void *con size_t i, j; for (i = 0, j = 0; i < min(desc.content.NR + 1, ARRAY_SIZE(regions)); ++i) { const chipoff_t base = ICH_FREG_BASE(desc.region.FLREGs[i]); - const chipoff_t limit = ICH_FREG_LIMIT(desc.region.FLREGs[i]) + 0xfff; + const chipoff_t limit = ICH_FREG_LIMIT(desc.region.FLREGs[i]); if (limit <= base) continue; layout->entries[j].start = base; -- cgit v1.2.3