dev,cpu,configs: Get rid of the IntrControl device.

This vestigial device provides a thin layer of indirection between
devices and the CPUs in a system. It's basically a collection of helper
functions, but since it's a SimObject it needs to be instantiated in
python and added to configurations.

Change-Id: I029d2314ae0bb890678e1e68dafcdab4bfe49beb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43347
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-03-22 04:06:48 -07:00
parent fc9b1b5089
commit 5f95d7a89a
42 changed files with 88 additions and 370 deletions

View File

@@ -50,7 +50,6 @@ class MaltaIO(BasicPioDevice):
class Malta(Platform):
type = 'Malta'
cxx_header = "dev/mips/malta.hh"
system = Param.System(Parent.any, "system")
cchip = MaltaCChip(pio_addr=0x801a0000000)
io = MaltaIO(pio_addr=0x801fc000000)
uart = Uart8250(pio_addr=0xBFD003F8)

View File

@@ -36,7 +36,6 @@
#include <string>
#include <vector>
#include "cpu/intr_control.hh"
#include "debug/Malta.hh"
#include "dev/mips/malta_cchip.hh"
#include "dev/mips/malta_io.hh"
@@ -44,7 +43,7 @@
#include "sim/system.hh"
Malta::Malta(const Params &p)
: Platform(p), system(p.system)
: Platform(p)
{
for (int i = 0; i < Malta::Max_CPUs; i++)
intr_sum_type[i] = 0;

View File

@@ -56,9 +56,6 @@ class Malta : public Platform
/** Max number of CPUs in a Malta */
static const int Max_CPUs = 64;
/** Pointer to the system */
System *system;
/** Pointer to the MaltaIO device which has the RTC */
MaltaIO *io;
@@ -72,12 +69,6 @@ class Malta : public Platform
int ipi_pending[Malta::Max_CPUs];
public:
/**
* Constructor for the Malta Class.
* @param name name of the object
* @param s system the object belongs to
* @param intctrl pointer to the interrupt controller
*/
typedef MaltaParams Params;
Malta(const Params &p);

View File

@@ -37,7 +37,7 @@
#include <vector>
#include "base/trace.hh"
#include "cpu/intr_control.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
#include "debug/Malta.hh"
#include "dev/mips/malta.hh"
@@ -106,7 +106,8 @@ MaltaCChip::postIntr(uint32_t interrupt)
for (int i=0; i < size; i++) {
//Note: Malta does not use index, but this was added to use the
//pre-existing implementation
malta->intrctrl->post(i, interrupt, 0);
auto tc = sys->threads[i];
tc->getCpuPtr()->postInterrupt(tc->threadId(), interrupt, 0);
DPRINTF(Malta, "posting interrupt to cpu %d, interrupt %d\n",
i, interrupt);
}
@@ -121,7 +122,8 @@ MaltaCChip::clearIntr(uint32_t interrupt)
for (int i=0; i < size; i++) {
//Note: Malta does not use index, but this was added to use the
//pre-existing implementation
malta->intrctrl->clear(i, interrupt, 0);
auto tc = sys->threads[i];
tc->getCpuPtr()->clearInterrupt(tc->threadId(), interrupt, 0);
DPRINTF(Malta, "clearing interrupt to cpu %d, interrupt %d\n",
i, interrupt);
}