diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-10-09 00:15:50 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-10-09 00:15:50 -0700 |
commit | f338d60930e973d330d13715b8617c22b980dcca (patch) | |
tree | d0980316aa40ff6f15699b752a2087035a634c65 /src/arch/power | |
parent | 020e923ba7f027b7b3b18ccf8ac208c576d75b95 (diff) | |
download | gem5-f338d60930e973d330d13715b8617c22b980dcca.tar.xz |
SE/FS: Build the Interrupt objects in SE mode.
Diffstat (limited to 'src/arch/power')
-rw-r--r-- | src/arch/power/PowerInterrupts.py | 33 | ||||
-rw-r--r-- | src/arch/power/SConscript | 3 | ||||
-rw-r--r-- | src/arch/power/interrupts.cc | 37 | ||||
-rw-r--r-- | src/arch/power/interrupts.hh | 105 |
4 files changed, 178 insertions, 0 deletions
diff --git a/src/arch/power/PowerInterrupts.py b/src/arch/power/PowerInterrupts.py new file mode 100644 index 000000000..82d614077 --- /dev/null +++ b/src/arch/power/PowerInterrupts.py @@ -0,0 +1,33 @@ +# Copyright (c) 2011 Google +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Authors: Gabe Black + +from m5.SimObject import SimObject + +class PowerInterrupts(SimObject): + type = 'PowerInterrupts' + cxx_class = 'PowerISA::Interrupts' diff --git a/src/arch/power/SConscript b/src/arch/power/SConscript index f96f12757..dc1f8b491 100644 --- a/src/arch/power/SConscript +++ b/src/arch/power/SConscript @@ -40,11 +40,14 @@ if env['TARGET_ISA'] == 'power': Source('insts/floating.cc') Source('insts/condition.cc') Source('insts/static_inst.cc') + Source('interrupts.cc') Source('pagetable.cc') Source('tlb.cc') Source('utility.cc') + SimObject('PowerInterrupts.py') SimObject('PowerTLB.py') + DebugFlag('Power') if not env['FULL_SYSTEM']: diff --git a/src/arch/power/interrupts.cc b/src/arch/power/interrupts.cc new file mode 100644 index 000000000..c9ef36824 --- /dev/null +++ b/src/arch/power/interrupts.cc @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2011 Google + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Gabe Black + */ + +#include "arch/power/interrupts.hh" + +PowerISA::Interrupts * +PowerInterruptsParams::create() +{ + return new PowerISA::Interrupts(this); +} diff --git a/src/arch/power/interrupts.hh b/src/arch/power/interrupts.hh new file mode 100644 index 000000000..9c11c8e8a --- /dev/null +++ b/src/arch/power/interrupts.hh @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2011 Google + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Gabe Black + */ + +#ifndef __ARCH_POWER_INTERRUPT_HH__ +#define __ARCH_POWER_INTERRUPT_HH__ + +#include "base/misc.hh" +#include "params/PowerInterrupts.hh" +#include "sim/sim_object.hh" + +class ThreadContext; + +namespace PowerISA { + +class Interrupts : public SimObject +{ + private: + BaseCPU * cpu; + + public: + typedef PowerInterruptsParams Params; + + const Params * + params() const + { + return dynamic_cast<const Params *>(_params); + } + + Interrupts(Params * p) : SimObject(p), cpu(NULL) + {} + + void + setCPU(BaseCPU * _cpu) + { + cpu = _cpu; + } + + void + post(int int_num, int index) + { + panic("Interrupts::post not implemented.\n"); + } + + void + clear(int int_num, int index) + { + panic("Interrupts::clear not implemented.\n"); + } + + void + clearAll() + { + panic("Interrupts::clearAll not implemented.\n"); + } + + bool + checkInterrupts(ThreadContext *tc) const + { + panic("Interrupts::checkInterrupts not implemented.\n"); + } + + Fault + getInterrupt(ThreadContext *tc) + { + panic("Interrupts::getInterrupt not implemented.\n"); + } + + void + updateIntrInfo(ThreadContext *tc) + { + panic("Interrupts::updateIntrInfo not implemented.\n"); + } +}; + +} // namespace PowerISA + +#endif // __ARCH_POWER_INTERRUPT_HH__ + |