summaryrefslogtreecommitdiff
path: root/src/sim
AgeCommit message (Collapse)Author
2010-08-17misc: add some AMD copyright noticesSteve Reinhardt
Meant to add these with the previous batch of csets.
2010-08-17sim: revamp unserialization procedureSteve Reinhardt
Replace direct call to unserialize() on each SimObject with a pair of calls for better control over initialization in both ckpt and non-ckpt cases. If restoring from a checkpoint, loadState(ckpt) is called on each SimObject. The default implementation simply calls unserialize() if there is a corresponding checkpoint section, so we get backward compatibility for existing objects. However, objects can override loadState() to get other behaviors, e.g., doing other programmed initializations after unserialize(), or complaining if no checkpoint section is found. (Note that the default warning for a missing checkpoint section is now gone.) If not restoring from a checkpoint, we call the new initState() method on each SimObject instead. This provides a hook for state initializations that are only required when *not* restoring from a checkpoint. Given this new framework, do some cleanup of LiveProcess subclasses and X86System, which were (in some cases) emulating initState() behavior in startup via a local flag or (in other cases) erroneously doing initializations in startup() that clobbered state loaded earlier by unserialize().
2010-08-17sim: move iterating over SimObjects into Python.Steve Reinhardt
2010-08-17sim: make Python Root object a singletonSteve Reinhardt
Enforce that the Python Root SimObject is instantiated only once. The C++ Root object already panics if more than one is created. This change avoids the need to track what the root object is, since it's available from Root.getInstance() (if it exists). It's now redundant to have the user pass the root object to functions like instantiate(), checkpoint(), and restoreCheckpoint(), so that arg is gone. Users who use configs/common/Simulate.py should not notice.
2010-07-22Syscall: Don't close the simulator's standard file descriptors.Timothy M. Jones
2010-07-21python: Add mechanism to override code compiled into the exectuableNathan Binkert
If the user sets the environment variable M5_OVERRIDE_PY_SOURCE to True, then imports that would normally find python code compiled into the executable will instead first check in the absolute location where the code was found during the build of the executable. This only works for files in the src (or extras) directories, not automatically generated files. This is a developer feature!
2010-07-05checkpointing: another small overload fixSteve Reinhardt
On Nate's advice, overload 'char' as well as 'signed char' and 'unsigned char'.
2010-07-05sim: fold StartupCallback into SimObjectSteve Reinhardt
There used to be a reason to have StartupCallback be a separate object, but not any more. Now it's just confusing.
2010-07-05checkpointing: minor cleanup.Steve Reinhardt
Move some static checkpoint stuff into the Checkpoint object namespace.
2010-07-05checkpointing: fix minor bugSteve Reinhardt
Somehow we now need to explicitly specialize on 'signed char' and not just 'char' to catch cases like int8_t
2010-07-05process: get rid of some unused code & varsSteve Reinhardt
2010-07-05process: minor format/style cleanupSteve Reinhardt
2010-06-14stats: get rid of the never-really-used event stuffNathan Binkert
2010-06-09flags: add comment to avoid future deletions since code appears redundant.Lisa Hsu
2010-06-08flags: Unserializing old checkpoints before the introductionLisa Hsu
of the Initialized flag would break, set Initialized for events upon unserialization.
2010-06-03More minor gdb-related cleanup.Steve Reinhardt
Found several more stale includes and forward decls.
2010-06-03Minor remote GDB cleanup.Steve Reinhardt
Expand the help text on the --remote-gdb-port option so people know you can use it to disable remote gdb without reading the source code, and thus don't waste any time trying to add a separate option to do that. Clean up some gdb-related cruft I found while looking for where one would add a gdb disable option, before I found the comment that told me that I didn't need to do that.
2010-06-02ARM: Allow ARM processes to start in Thumb mode.Gabe Black
2010-06-02ARM: Detect thumb mode elf images.Gabe Black
2010-05-06compile: don't #include unnecessary stuffNathan Binkert
Time from base/time.hh has a name clash with Time from Ruby's TypeDefines.hh. Eventually Ruby's Time should go away, so instead of fixing this properly just try to avoid the clash.
2010-04-18stats: make simTicks and simFreq accessible from stats.hhNathan Binkert
2010-04-18event: Allow EventWrapper to take an object referenceNathan Binkert
2010-04-15tick: rename Clock namespace to SimClockNathan Binkert
2010-04-15eventq: move EventQueue constructor to cc fileNathan Binkert
Also make copy constructor and assignment operator private.
2010-04-02eventq: allow an implicit cast from an EventManager to an EventQueue *Nathan Binkert
2010-04-02eventq: Clean up some flagsNathan Binkert
- Make the initialized flag always available, not just in debug mode. - Make the Initialized flag actually use several bits so it is very unlikely that something that's uninitialized accidentally looks initialized. - Add an initialized() function that tells you if the current event is indeed initialized. - Clear the flags on delete so it can't be accidentally thought of as initialized. - Fix getFlags assert statement. "How did this ever work?"
2010-04-02eventq: Make priorities just an integer instead of an enum.Nathan Binkert
Symbolic names should still be used, but this makes it easier to do things like: Event::Priority MyObject_Pri = Event::Default_Pri + 1 Remember that higher numbers are lower priority (should we fix this?)
2010-03-12eventq: rearrange a little bit so I can add some stuffNathan Binkert
2010-03-12eventq: remove some unused includesNathan Binkert
2010-02-26events: Give EventWrapped a default name and descriptionNathan Binkert
2010-01-19util: do checkpoint aggregation more cleanly, fix last changeset.Lisa Hsu
1) Move alpha-specific code out of page_table.cc:serialize(). 2) Begin serializing M5_pid and unserializing it, but adding an function to do optional paramIn so that old checkpoints don't need to be fixed up. 3) Fix up alpha startup code so that the unserialized M5_pid value is properly written to DTB_IPR_ASN. 4) Fix the memory unserialize that I forgot somehow in the last changeset. 5) Add in an agg_se.py to handle aggregated checkpoints. --bench foo-bar plus positional arguments foo bar are the only changes in usage from se.py. Note this aggregation stuff has only been tested for Alpha and nothing else, though it should take a very minimal amount of work to get it to work with another ISA.
2010-01-18 util: make a generic checkpoint aggregator that can aggregate different ↵Lisa Hsu
cpts into one multi-programmed cpt. Make minor changes to serialization/unserialization to get it to work properly. Note that checkpoints were made with a comment at the beginning with // - this must be changed to ## to work properly with the python config parser in the aggregator.
2010-01-12faults: i think these fault invocations should be panic and not fatal. it ↵Lisa Hsu
definitely made implementing a trace cpu easier this way.
2009-11-14SE: Fix SE mode OS X compilation.Ali Saidi
2009-11-09syscall: missing initializer in getcwd callVince Weaver
This one case was missed during the update to stack-based arguments. Without this fix, m5 will crash during a gwtcwd call, at least with X86.
2009-11-04build: fix compile problems pointed out by gcc 4.4Nathan Binkert
2009-10-30SysCalls: Implement truncate64 system callVince Weaver
This uses the new stack-based argument infrastructure. Tested on x86 and x86_64.
2009-10-31Syscalls: Fix a warning turned error about an unused variable in m5.fast.Gabe Black
2009-10-30Syscalls: Make system calls access arguments like a stack, not an array.Gabe Black
When accessing arguments for a syscall, the position of an argument depends on the policies of the ISA, how much space preceding arguments took up, and the "alignment" of the index for this particular argument into the number of possible storate locations. This change adjusts getSyscallArg to take its index parameter by reference instead of value and to adjust it to point to the possible location of the next argument on the stack, basically just after the current one. This way, the rules for the new argument can be applied locally without knowing about other arguments since those have already been taken into account implicitly. All system calls have also been changed to reflect the new interface. In a number of cases this made the implementation clearer since it encourages arguments to be collected in one place in order and then used as necessary later, as opposed to scattering them throughout the function or using them in place in long expressions. It also discourages using getSyscallArg over and over to retrieve the same value when a temporary would do the job.
2009-10-27POWER: Add support for the Power ISATimothy M. Jones
This adds support for the 32-bit, big endian Power ISA. This supports both integer and floating point instructions based on the Power ISA Book I v2.06.
2009-10-24syscall: Addition of an ioctl command code for Power.Timothy M. Jones
2009-10-24syscall: Zero out memory that already exists during the brk system call.Timothy M. Jones
Glibc often assumes that memory it receives from the kernel after a brk system call will contain only zeros. This is important during a calloc, because it won't clear the new memory itself. In the simulator, if the new page exists, it will be cleared using this patch, to mimic the kernel's functionality.
2009-10-24syscall: Fix conversion of the stat64 buffer during system calls.Timothy M. Jones
2009-10-24syscall: Implementation of the ftruncate64 system call.Timothy M. Jones
2009-10-24syscall: Implementation of the time system call.Timothy M. Jones
2009-10-24syscall: Implementation of the times system callTimothy M. Jones
2009-10-02SE mode: Make the direction anonymous mmaps move through memory configurable.Gabe Black
2009-09-23arch: nuke arch/isa_specific.hh and move stuff to generated config/the_isa.hhNathan Binkert
2009-09-22python: Move more code into m5.util allow SCons to use that code.Nathan Binkert
Get rid of misc.py and just stick misc things in __init__.py Move utility functions out of SCons files and into m5.util Move utility type stuff from m5/__init__.py to m5/util/__init__.py Remove buildEnv from m5 and allow access only from m5.defines Rename AddToPath to addToPath while we're moving it to m5.util Rename read_command to readCommand while we're moving it Rename compare_versions to compareVersions while we're moving it. --HG-- rename : src/python/m5/convert.py => src/python/m5/util/convert.py rename : src/python/m5/smartdict.py => src/python/m5/util/smartdict.py
2009-09-15Syscalls: Implement sysinfo() syscall.Vince Weaver