From 44ec1d212499246be3cef40ce7c96a3f65286153 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 22 Oct 2014 15:53:34 -0700 Subject: syscall_emul: add EmulatedDriver object Fake SE-mode device drivers can now be added by deriving from this abstract object. --- src/sim/Process.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sim/Process.py') diff --git a/src/sim/Process.py b/src/sim/Process.py index 6f2322805..7e5f75363 100644 --- a/src/sim/Process.py +++ b/src/sim/Process.py @@ -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') + -- cgit v1.2.3