Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mmt/nvidia: fix gpu map/unmap ioctl for addresses above 4GB

  • Loading branch information...
commit f14c9185fa6d16ba0dd68747ea2e53e97fbed69b 1 parent 2fb1a5b
@mslusarz mslusarz authored
Showing with 10 additions and 8 deletions.
  1. +10 −8 mmt/mmt_nv_ioctl.c
View
18 mmt/mmt_nv_ioctl.c
@@ -861,37 +861,39 @@ void mmt_nv_ioctl_post(UWord *args)
}
break;
case 0xc0384657: // map GPU address
+ addr = (((Off64T)data[11]) << 32) | data[10];
if (mmt_binary_output)
{
mmt_bin_write_1('n');
- mmt_bin_write_1('g');
+ mmt_bin_write_1('G');
mmt_bin_write_4(data[1]);
mmt_bin_write_4(data[2]);
mmt_bin_write_4(data[3]);
- mmt_bin_write_4(data[10]);
+ mmt_bin_write_8(addr);
mmt_bin_write_4(data[6]);
mmt_bin_end();
}
else
VG_(message) (Vg_DebugMsg,
- "gpu map 0x%08x:0x%08x:0x%08x, addr 0x%08x, len 0x%08x\n",
- data[1], data[2], data[3], data[10], data[6]);
+ "gpu map 0x%08x:0x%08x:0x%08x, addr 0x%08llx, len 0x%08x\n",
+ data[1], data[2], data[3], addr, data[6]);
break;
case 0xc0284658: // unmap GPU address
+ addr = (((Off64T)data[7]) << 32) | data[6];
if (mmt_binary_output)
{
mmt_bin_write_1('n');
- mmt_bin_write_1('h');
+ mmt_bin_write_1('H');
mmt_bin_write_4(data[1]);
mmt_bin_write_4(data[2]);
mmt_bin_write_4(data[3]);
- mmt_bin_write_4(data[6]);
+ mmt_bin_write_8(addr);
mmt_bin_end();
}
else
VG_(message) (Vg_DebugMsg,
- "gpu unmap 0x%08x:0x%08x:0x%08x addr 0x%08x\n", data[1],
- data[2], data[3], data[6]);
+ "gpu unmap 0x%08x:0x%08x:0x%08x addr 0x%08llx\n", data[1],
+ data[2], data[3], addr);
break;
case 0xc0304654: // create DMA object [3] is some kind of flags, [6] is an offset?
if (mmt_binary_output)
Please sign in to comment.
Something went wrong with that request. Please try again.