1287c1287,1297
< sim_fd = p->getSimFD(tgt_fd);
---
> // Check for EmulatedDriver mmap
> FDEntry *fde = p->getFDEntry(tgt_fd);
> if (fde == NULL)
> return -EBADF;
>
> if (fde->driver != NULL) {
> return fde->driver->mmap(p, tc, start, length, prot,
> tgt_flags, tgt_fd, offset);
> }
> sim_fd = fde->fd;
>