Commit Graph

28 Commits

Author SHA1 Message Date
d3d2faf680 globally rename Fail* to FAIL*
Change-Id: Ief2cb687cc69dd92c2e04f9314f0f1347e0a84ed
2016-07-26 17:41:32 +02:00
4cb97a7fa5 formatting, typos, comments, details
Change-Id: Iae5f1acb653a694622e9ac2bad93efcfca588f3a
2014-01-22 13:08:13 +01:00
3c7861ff06 core/sal: Added features that indicate whether FAIL* is initialized
GEM5 throws a reset trap during initialization.
This happens before the startup function is called.
This leads to problems because the startup function fills the m_CPUs list.
m_CPUs is needed for the TrapListener.
Therefore, we only react on traps after initialization.
This is needed in the following commit (see gem5/src/arch/arm/faults.cc).

Change-Id: I9ec6fd453705feb54b4f8a87d024181323a2d7ef
2014-01-14 13:07:21 +01:00
6d4dfeb913 shutdown cleanups revisited
This change became necessary as we observed weird fail-client SIGSEGV
crashes with both Bochs and Gem5 backends and different experiments.

Some Fail* components are instantiated statically: the
SimulatorController instance "simulator", containing the
ListenerManager and the CoroutineManager, and the active
ExperimentFlow subclass(es)
(experiments/instantiate-experiment*.ah.in).  The experiment(s) is
registered as an active flow in the CoroutineManager at startup.

As plugins (which are ExperimentFlows themselves) are often created on
an experiment's stack, ExperimentFlows deregister themselves on
destruction (e.g., when leaving the plugin variable's scope).  The
core problem is, that the creation and destruction order of statically
instantiated objects depends on the link order; if the experiment is
destroyed after the CoroutineManager, its automatic self-deregistering
feature talks to the smoking ruins of the latter.

This change removes all static instantiations of ExperimentFlow and
replaces them with constructions on the heap.  Additionally it makes
sure that the CoroutineManager recognizes that a shutdown is in
progress, and refrains from touching potentially already destroyed
data structures when a (mistakenly globally instantiated)
ExperimentFlow deregisters in this case.

Change-Id: I8a7d42fb141222cd2cce6040ab1a01f9de61be24
2013-09-04 10:13:48 +02:00
3fb58de4a5 core/sal: pass commandline parameters by reference
This allows the commandline parameter parser to modify argc, as it finds
arguments for the Fail* client.  Additionally argv is correctly null
terminated when removing arguments.

This fixes a bug introduced in eb17e9ef82.

Change-Id: Iabe84530790ecb7c587b0af139127015aad868d5
2013-04-02 21:47:39 +02:00
f0e26a9b63 Optionparser: Fix for non-Bochs builds. 2013-03-20 17:16:57 +01:00
739a62c60b Optionparser: FAILS for non-bochs builds!
bx_startup_flags are only present in a bochs build!
2013-03-20 16:07:02 +01:00
eb17e9ef82 core/sal: move command-line parameter passing to SC::startup() 2013-03-14 22:29:43 +01:00
9f53d3348b SimulatorController: no need for return type bool of addCPU().
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1975 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-12-12 13:08:21 +00:00
b052c0494b Architecture changes (only gem5 implementation right now):
- The register manager is gone. It's functionality is now encapsulated in the
  CPU classes.
- For the client, there is the ConcreteCPU class that encapsulates the access
  to the CPU state (including registers) and architecture details. The
  correspondig objects for the CPUs inside the simulator can be accessed
  through the SimulatorController.getCPU() function.
- Listener got a new ConcreteCPU* member to filter for which CPU the events
  should fire. The default NULL is used as wildcard for all aviable CPUs. The
  events respectively got a ConcreteCPU* member to indicate which CPU really
  fired the event.
- For the server, there is CPUArchitecture to access the architecture details.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1966 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-12-02 17:50:46 +00:00
0b8710872b Removed BochController debug stuff. Merged: BochsController::onBreakpoint -> SimCon::onBreakpoint.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1883 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-11-06 11:40:05 +00:00
31aa3aa925 bugfixes in overall coroutine handling to allow the overwriting of onTrigger.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1721 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-10-05 11:48:39 +00:00
7d49b6f063 Simulator specific listener are now implemented using aspects instead of an additional inheritance level
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1706 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-10-02 11:42:18 +00:00
0cb6b39490 Aspect-based implementation of fast breakpoints added (optional).
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1685 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-09-25 10:10:02 +00:00
hsc
2fed94ae49 global interrupt_to_fire seems not to be Bochs-specific at the moment
FIXME: This shouldn't be a global variable (probably a SimulatorController
member?).  Reconsider interrupt generation being part of the generic
interface.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1612 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-09-11 17:10:11 +00:00
hsc
cfddb311f6 simulator.resume() should resume even if no listeners active
The experiment developer has full control over the number of active
listeners.  simulator.resume() therefore should resume simulation even if
it won't ever return.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1574 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-08-28 09:06:50 +00:00
36e4a77b4e SimulatorController.cc: Tiny code simplification.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1509 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-08-27 12:00:26 +00:00
9a23dbbb42 comments and coding-style fixed.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1498 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-08-16 14:26:11 +00:00
6b540d738c event data outsourced, SAL config flags revised, tiny coding-style fixes.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1462 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-07-30 13:39:25 +00:00
hsc
e4570d95bd Bochs aspects -> BochsController interface renamings
SimulatorController::on...Listener() does not really make sense: These
functions are called when a specific event occurs in the simulator.  A
"Listener" cannot occur.  Renaming these to "on..." for now; we could
alternatively use "on...Event" later.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1455 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-07-16 18:21:06 +00:00
hsc
b245327b7e adding interval matching to memory-access listeners
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1454 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-07-16 18:21:03 +00:00
a78911702a Events -> Listeners, waitAny -> resume, addEventAndWait -> addListenerAndResume, ... (refactoring), updated experiments/plugin accordingly, coding-style fixed.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1448 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-07-12 10:37:54 +00:00
e4a60e8408 Removed internal (event-)ID stuff (no need for ID's ATM).
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1445 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-07-11 11:46:11 +00:00
74c4f1cfd1 Typos + Coding-Style fixed, TODO revisited.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1422 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-07-04 11:25:26 +00:00
ac5dee6549 Renamed EventList -> EventManager (refactoring).
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1387 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-06-27 11:15:42 +00:00
d143d6ae50 EvendId -> event_id_t (refactoring).
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1370 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-06-21 11:18:38 +00:00
ad0cfb9b11 Pre-/postprocessing is done within the event objects (Bochs-specific event added), ++coding-style.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1366 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-06-21 10:47:22 +00:00
2575604b41 Fail* directories reorganized, Code-cleanup (-> coding-style), Typos+comments fixed.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1321 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-06-08 20:09:43 +00:00