31 #ifndef __SIM_EMUL_DRIVER_HH
32 #define __SIM_EMUL_DRIVER_HH
36 #include "params/EmulatedDriver.hh"
99 int prot,
int tgtFlags,
int tgtFd, off_t
offset)
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
const std::string & filename
filename for opening this driver (under /dev)
virtual int ioctl(ThreadContext *tc, unsigned req, Addr buf)=0
Abstract method, invoked when the user program calls ioctl() on the file descriptor returned by a pre...
virtual int open(ThreadContext *tc, int mode, int flags)=0
Abstract method, invoked when the user program calls open() on the device driver.
EmulatedDriver(const EmulatedDriverParams &p)
bool match(const std::string &s) const
Check for a match with this driver's filename.
virtual Addr mmap(ThreadContext *tc, Addr start, uint64_t length, int prot, int tgtFlags, int tgtFd, off_t offset)
Virtual method, invoked when the user program calls mmap() on the file descriptor returned by a previ...
Abstract superclass for simulation objects.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.