syscall_emul: add EmulatedDriver object

Fake SE-mode device drivers can now be added by
deriving from this abstract object.
This commit is contained in:
Steve Reinhardt
2014-10-22 15:53:34 -07:00
parent 6523aad25c
commit 44ec1d2124
5 changed files with 157 additions and 11 deletions

View File

@@ -46,6 +46,12 @@ class Process(SimObject):
def export_methods(cls, code):
code('bool map(Addr vaddr, Addr paddr, int size);')
class EmulatedDriver(SimObject):
type = 'EmulatedDriver'
cxx_header = "sim/emul_driver.hh"
abstract = True
filename = Param.String("device file name (under /dev)")
class LiveProcess(Process):
type = 'LiveProcess'
cxx_header = "sim/process.hh"
@@ -60,3 +66,5 @@ class LiveProcess(Process):
pid = Param.Int(100, 'process id')
ppid = Param.Int(99, 'parent process id')
simpoint = Param.UInt64(0, 'simulation point at which to start simulation')
drivers = VectorParam.EmulatedDriver([], 'Available emulated drivers')