From 6b0da6fa391db2ec2bc1e0bec9325f4e74b5286c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 12 Aug 2014 10:38:16 -0500 Subject: [PATCH] tegra132: fix carveout address calculation >= 4GiB The high address field was being shifted in the wrong direction resulting in the lower 12 bits of the upper address being dropped. BUG=chrome-os-partner:30572 BRANCH=None TEST=Was able to run on ryu and not hang while wiping memory. Change-Id: I7bf173bb0373d2d25ce9014c80236fb55cc8e17e Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/211941 Reviewed-by: Tom Warren --- src/soc/nvidia/tegra132/addressmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/nvidia/tegra132/addressmap.c b/src/soc/nvidia/tegra132/addressmap.c index 1227f41e66..5b0a81f7c7 100644 --- a/src/soc/nvidia/tegra132/addressmap.c +++ b/src/soc/nvidia/tegra132/addressmap.c @@ -61,7 +61,7 @@ static void carveout_from_regs(uintptr_t *base_mib, size_t *size_mib, *size_mib = size; bom >>= 20; - bom |= bom_hi >> (32 - 20); + bom |= bom_hi << (32 - 20); *base_mib = bom; }