cpu: Introduce sanity checks when switching between CPUs
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>
Mon, 7 Jan 2013 18:05:44 +0000 (13:05 -0500)
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>
Mon, 7 Jan 2013 18:05:44 +0000 (13:05 -0500)
commita7e0cbeb36394eec3960dc0e2fb15377880e9e98
tree3aa15e38997aeabd2f39158252687a73a9da2fea
parent901258c22b631cd7c14e564bd5f1cde36347515e
cpu: Introduce sanity checks when switching between CPUs

This patch introduces the following sanity checks when switching
between CPUs:

 * Check that the set of new and old CPUs do not overlap. Having an
   overlap between the set of new CPUs and the set of old CPUs is
   currently not supported. Doing such a switch used to result in the
   following assertion error:
     BaseCPU::takeOverFrom(BaseCPU*): \
       Assertion `!new_itb_port->isConnected()' failed.

 * Check that all new CPUs are in the switched out state.

 * Check that all old CPUs are in the switched in state.
src/cpu/BaseCPU.py
src/cpu/base.cc
src/cpu/base.hh
src/python/m5/simulate.py