Add hook to call map() on Process from python.
This enables configuration scripts to set up mappings from process virtual addresses to specific physical addresses in SE mode. This feature is needed to support modeling of user-accessible memories or devices in SE mode, avoiding the complexities of FS mode and the need to write a device driver.
This commit is contained in:
@@ -39,6 +39,14 @@ class Process(SimObject):
|
||||
system = Param.System(Parent.any, "system process will run on")
|
||||
max_stack_size = Param.MemorySize('64MB', 'maximum size of the stack')
|
||||
|
||||
@classmethod
|
||||
def export_method_cxx_predecls(cls, code):
|
||||
code('#include "sim/process.hh"')
|
||||
|
||||
@classmethod
|
||||
def export_methods(cls, code):
|
||||
code('bool map(Addr vaddr, Addr paddr, int size);')
|
||||
|
||||
class LiveProcess(Process):
|
||||
type = 'LiveProcess'
|
||||
executable = Param.String('', "executable (overrides cmd[0] if set)")
|
||||
|
||||
Reference in New Issue
Block a user