sim: Use off_t for mmap offset arguments
authorMatthew Poremba <matthew.poremba@amd.com>
Wed, 1 Apr 2020 23:56:55 +0000 (16:56 -0700)
committerMatthew Poremba <matthew.poremba@amd.com>
Fri, 17 Apr 2020 20:45:07 +0000 (20:45 +0000)
commitf6b1d9f8cadfc66d136c8baf466970943ed15093
tree53cf7e9734a97648393da2949e1bb57235643355
parent0be2496dd5aedeeca98d1273d39c5e4bb935a254
sim: Use off_t for mmap offset arguments

The GuestABI used to call the system-calls infers the size of values
read from the registers based on the function signature of the system
call. For mmap this was causing offset to be truncated to a 32-bit
value. In the GPUComputeDriver mmap, the offset must be a 64-bit
value. This fixes a bug where the doorbell memory was not setup and
causing GPU applications to fail.

Change-Id: I75d9b32c0470d1907c68826ef81cf6cd46f60ea7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27367
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
src/arch/x86/linux/linux.hh
src/sim/syscall_emul.hh