summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2020-11-09 14:06:32 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2020-11-11 12:41:29 +0000
commitc5fdaac866c04f13313b0e2815dadabcc0bd6f82 (patch)
treec4661e32848a21805f0e54d5dbf4c46151c1976d
parent2d522ecdf26c346af22e0406e0243b2932197b34 (diff)
lib/intel_batchbuffer: Fix relocs across the 4GB address boundary
If the delta of a relocation target wrt. the object base address crosses the 4GB address boundary the upper 32bit of the target address will be incorrect, fix this. Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--lib/intel_batchbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index fc73495c..7b4cfb0d 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -1850,7 +1850,7 @@ static uint64_t __intel_bb_emit_reloc(struct intel_bb *ibb,
intel_bb_out(ibb, delta + address);
if (ibb->gen >= 8)
- intel_bb_out(ibb, address >> 32);
+ intel_bb_out(ibb, (delta + address) >> 32);
return address;
}