Deleted Added
sdiff udiff text old ( 10496:0a5a8ecd0ec6 ) new ( 11624:9796e43e751d )
full compact
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * All rights reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 32 unchanged lines hidden (view full) ---

41
42/**
43 * EmulatedDriver is an abstract base class for fake SE-mode device drivers.
44 *
45 * Specific drivers that allow applications to communicate with simulated
46 * hardware inside gem5 can be created by deriving from this class and
47 * overriding the abstract virtual methods.
48 *
49 * Currently only open() and ioctl() calls are supported, but other calls
50 * (e.g., read(), write(), mmap()) could be added as needed.
51 */
52class EmulatedDriver : public SimObject
53{
54 protected:
55 /**
56 * filename for opening this driver (under /dev)
57 */
58 const std::string &filename;

--- 21 unchanged lines hidden (view full) ---

80 /**
81 * Abstract method, invoked when the user program calls ioctl() on
82 * the file descriptor returned by a previous open(). The parameters
83 * are the same as those passed in to ioctlFunc() (q.v.).
84 * @return The return code for the ioctl, or the negation of the errno
85 * (see the SyscallReturn class).
86 */
87 virtual int ioctl(LiveProcess *p, ThreadContext *tc, unsigned req) = 0;
88};
89
90#endif // __SIM_EMUL_DRIVER_HH