diff -r 2f0e70823f80 -r d735ce2825ce build_opts/NOISA --- a/build_opts/NOISA Mon Aug 26 11:59:09 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -TARGET_ISA = 'no' -CPU_MODELS = 'no' diff -r 2f0e70823f80 -r d735ce2825ce build_opts/NULL --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build_opts/NULL Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,2 @@ +TARGET_ISA = 'null' +CPU_MODELS = '' diff -r 2f0e70823f80 -r d735ce2825ce src/arch/generic/SConscript --- a/src/arch/generic/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/arch/generic/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -28,4 +28,7 @@ Import('*') +if env['TARGET_ISA'] == 'null': + Return() + Source('decode_cache.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/arch/noisa/SConsopts --- a/src/arch/noisa/SConsopts Mon Aug 26 11:59:09 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - -Import('*') - -all_isa_list.append('no') diff -r 2f0e70823f80 -r d735ce2825ce src/arch/noisa/cpu_dummy.hh --- a/src/arch/noisa/cpu_dummy.hh Mon Aug 26 11:59:09 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - -class BaseCPU -{ - public: - static int numSimulatedInsts() { return 0; } - static int numSimulatedOps() { return 0; } -}; diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/SConscript --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,43 @@ +# -*- mode:python -*- + +# Copyright (c) 2013 ARM Limited +# All rights reserved +# +# The license below extends only to copyright in the software and shall +# not be construed as granting a license to any other intellectual +# property including but not limited to intellectual property relating +# to a hardware implementation of the functionality of the software +# licensed hereunder. You may use the software subject to the license +# terms below provided that you ensure that this notice is replicated +# unmodified and in its entirety in all distributions of the software, +# modified or unmodified, in source code or in binary form. +# +# 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: Andreas Hansson + +Import('*') + +if env['TARGET_ISA'] == 'null': + Source('cpu_dummy.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/SConsopts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/SConsopts Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,42 @@ +# -*- mode:python -*- + +# Copyright (c) 2013 ARM Limited +# All rights reserved +# +# The license below extends only to copyright in the software and shall +# not be construed as granting a license to any other intellectual +# property including but not limited to intellectual property relating +# to a hardware implementation of the functionality of the software +# licensed hereunder. You may use the software subject to the license +# terms below provided that you ensure that this notice is replicated +# unmodified and in its entirety in all distributions of the software, +# modified or unmodified, in source code or in binary form. +# +# 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: Andreas Hansson + +Import('*') + +all_isa_list.append('null') diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/cpu_dummy.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/cpu_dummy.hh Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +#ifndef __ARCH_NULL_CPU_DUMMY_HH__ +#define __ARCH_NULL_CPU_DUMMY_HH__ + +#include "sim/core.hh" + +class BaseCPU +{ + public: + static int numSimulatedInsts() { return 0; } + static int numSimulatedOps() { return 0; } +}; + +#endif // __ARCH_NULL_CPU_DUMMY_HH__ diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/cpu_dummy.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/cpu_dummy.cc Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +/** + * Provide the actual storage for maxThreadsPerCPU which is declared + * extern and normally provided by src/cpu/base.cc + */ +int maxThreadsPerCPU = 1; diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/isa_traits.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/isa_traits.hh Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +#ifndef __ARCH_NULL_ISA_TRAITS_HH__ +#define __ARCH_NULL_ISA_TRAITS_HH__ + +#include "base/types.hh" + +namespace LittleEndianGuest {} + +namespace NullISA +{ + using namespace LittleEndianGuest; + + const Addr PageShift = 12; + const Addr PageBytes = ULL(1) << PageShift; + + const int LogVMPageSize = 12; // 4K bytes + const int VMPageSize = (1 << LogVMPageSize); + +} + +#endif //__ARCH_NULL_ISA_TRAITS_HH__ diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/registers.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/registers.hh Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +#ifndef __ARCH_NULL_REGISTERS_HH__ +#define __ARCH_NULL_REGISTERS_HH__ + +#include "base/types.hh" + +namespace NullISA { + +typedef uint64_t IntReg; +typedef uint32_t FloatRegBits; +typedef float FloatReg; +typedef uint64_t MiscReg; + +} + +#endif // __ARCH_NULL_REGISTERS_HH__ diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/remote_gdb.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/remote_gdb.hh Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +#ifndef __ARCH_NULL_REMOTE_GDB_HH__ +#define __ARCH_NULL_REMOTE_GDB_HH__ + +class ThreadContext; + +class BaseRemoteGDB +{ + + public: + + bool breakpoint() { return false; } + void replaceThreadContext(ThreadContext *tc) {} + + virtual ~BaseRemoteGDB() {} +}; + +#endif // __ARCH_NULL_REMOTE_GDB_H__ diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/types.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/types.hh Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +#ifndef __ARCH_NULL_TYPES_HH__ +#define __ARCH_NULL_TYPES_HH__ + +#include "arch/generic/types.hh" + +namespace NullISA +{ + typedef uint32_t MachInst; + + class PCState : public GenericISA::UPCState + { + protected: + + typedef GenericISA::UPCState Base; + }; + +} + +#endif // __ARCH_NULL_TYPES_HH__ diff -r 2f0e70823f80 -r d735ce2825ce src/arch/null/utility.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/arch/null/utility.hh Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2013 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * 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: Andreas Hansson + */ + +#ifndef __ARCH_NULL_UTILITY_HH__ +#define __ARCH_NULL_UTILITY_HH__ + +#include "base/types.hh" +#include "cpu/thread_context.hh" + +namespace NullISA { + +inline uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, + bool fp) { return 0; } + +inline void startupCPU(ThreadContext *tc, int cpuId) {} + +} + +#endif // __ARCH_NULL_UTILITY_HH__ diff -r 2f0e70823f80 -r d735ce2825ce src/base/SConscript --- a/src/base/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/base/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -52,7 +52,7 @@ Source('pollevent.cc') Source('random.cc') Source('random_mt.cc') -if env['TARGET_ISA'] != 'no': +if env['TARGET_ISA'] != 'null': Source('remote_gdb.cc') Source('socket.cc') Source('statistics.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/cpu/SConscript --- a/src/cpu/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/cpu/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -30,7 +30,9 @@ Import('*') -if env['TARGET_ISA'] == 'no': +if env['TARGET_ISA'] == 'null': + SimObject('IntrControl.py') + Source('intr_control_noisa.cc') Return() ################################################################# diff -r 2f0e70823f80 -r d735ce2825ce src/cpu/base.hh --- a/src/cpu/base.hh Mon Aug 26 11:59:09 2013 +0100 +++ b/src/cpu/base.hh Mon Aug 26 11:59:18 2013 +0100 @@ -48,11 +48,16 @@ #include +// Before we do anything else, check if this build is the NULL ISA, +// and if so stop here +#include "config/the_isa.hh" +#if THE_ISA == NULL_ISA +#include "arch/null/cpu_dummy.hh" +#else #include "arch/interrupts.hh" #include "arch/isa_traits.hh" #include "arch/microcode_rom.hh" #include "base/statistics.hh" -#include "config/the_isa.hh" #include "mem/mem_object.hh" #include "sim/eventq.hh" #include "sim/full_system.hh" @@ -476,4 +481,6 @@ Stats::Scalar numWorkItemsCompleted; }; +#endif // THE_ISA == NULL_ISA + #endif // __CPU_BASE_HH__ diff -r 2f0e70823f80 -r d735ce2825ce src/cpu/intr_control_noisa.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cpu/intr_control_noisa.cc Mon Aug 26 11:59:18 2013 +0100 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2005 The Regents of The University of Michigan + * 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: Nathan Binkert + * Ron Dreslinski + */ + +#include "cpu/intr_control.hh" + +using namespace std; + +IntrControl::IntrControl(const Params *p) + : SimObject(p), sys(p->sys) +{} + +void +IntrControl::post(int cpu_id, int int_num, int index) +{ +} + +void +IntrControl::clear(int cpu_id, int int_num, int index) +{ +} + +IntrControl * +IntrControlParams::create() +{ + return new IntrControl(this); +} diff -r 2f0e70823f80 -r d735ce2825ce src/dev/SConscript --- a/src/dev/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/dev/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -31,7 +31,7 @@ Import('*') -if env['TARGET_ISA'] == 'no': +if env['TARGET_ISA'] == 'null': Return() SimObject('BadDevice.py') diff -r 2f0e70823f80 -r d735ce2825ce src/dev/sinic.cc --- a/src/dev/sinic.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/dev/sinic.cc Mon Aug 26 11:59:18 2013 +0100 @@ -32,7 +32,9 @@ #include #include +#ifdef SINIC_VTOPHYS #include "arch/vtophys.hh" +#endif #include "base/compiler.hh" #include "base/debug.hh" #include "base/inet.hh" diff -r 2f0e70823f80 -r d735ce2825ce src/kern/SConscript --- a/src/kern/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/kern/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -30,7 +30,7 @@ Import('*') -if env['TARGET_ISA'] == 'no': +if env['TARGET_ISA'] == 'null': Return() Source('kernel_stats.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/mem/SConscript --- a/src/mem/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -36,11 +36,15 @@ SimObject('CommMonitor.py') Source('comm_monitor.cc') +SimObject('AbstractMemory.py') SimObject('AddrMapper.py') SimObject('Bridge.py') SimObject('Bus.py') SimObject('MemObject.py') +SimObject('SimpleMemory.py') +SimObject('SimpleDRAM.py') +Source('abstract_mem.cc') Source('addr_mapper.cc') Source('bridge.cc') Source('bus.cc') @@ -53,18 +57,14 @@ Source('packet_queue.cc') Source('tport.cc') Source('port_proxy.cc') -Source('fs_translating_port_proxy.cc') -Source('se_translating_port_proxy.cc') +Source('simple_mem.cc') +Source('physical.cc') +Source('simple_dram.cc') -if env['TARGET_ISA'] != 'no': - SimObject('AbstractMemory.py') - SimObject('SimpleMemory.py') - SimObject('SimpleDRAM.py') - Source('abstract_mem.cc') - Source('simple_mem.cc') +if env['TARGET_ISA'] != 'null': + Source('fs_translating_port_proxy.cc') + Source('se_translating_port_proxy.cc') Source('page_table.cc') - Source('physical.cc') - Source('simple_dram.cc') DebugFlag('BaseBus') DebugFlag('BusAddrRanges') diff -r 2f0e70823f80 -r d735ce2825ce src/mem/cache/SConscript --- a/src/mem/cache/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/cache/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -30,9 +30,6 @@ Import('*') -if env['TARGET_ISA'] == 'no': - Return() - SimObject('BaseCache.py') Source('base.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/mem/cache/base.cc --- a/src/mem/cache/base.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/cache/base.cc Mon Aug 26 11:59:18 2013 +0100 @@ -45,8 +45,6 @@ * Definition of BaseCache functions. */ -#include "cpu/base.hh" -#include "cpu/smt.hh" #include "debug/Cache.hh" #include "debug/Drain.hh" #include "mem/cache/tags/fa_lru.hh" diff -r 2f0e70823f80 -r d735ce2825ce src/mem/cache/prefetch/SConscript --- a/src/mem/cache/prefetch/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/cache/prefetch/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -30,8 +30,6 @@ Import('*') -if env['TARGET_ISA'] == 'no': - Return() SimObject('Prefetcher.py') Source('base.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/mem/cache/tags/SConscript --- a/src/mem/cache/tags/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/cache/tags/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -30,9 +30,6 @@ Import('*') -if env['TARGET_ISA'] == 'no': - Return() - SimObject('Tags.py') Source('base.cc') diff -r 2f0e70823f80 -r d735ce2825ce src/mem/cache/tags/base.cc --- a/src/mem/cache/tags/base.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/cache/tags/base.cc Mon Aug 26 11:59:18 2013 +0100 @@ -46,6 +46,7 @@ * Definitions of BaseTags. */ +#include "config/the_isa.hh" #include "cpu/smt.hh" //maxThreadsPerCPU #include "mem/cache/tags/base.hh" #include "mem/cache/base.hh" diff -r 2f0e70823f80 -r d735ce2825ce src/mem/fs_translating_port_proxy.hh --- a/src/mem/fs_translating_port_proxy.hh Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/fs_translating_port_proxy.hh Mon Aug 26 11:59:18 2013 +0100 @@ -59,9 +59,10 @@ #ifndef __MEM_FS_PORT_PROXY_HH__ #define __MEM_FS_PORT_PROXY_HH__ -#include "arch/vtophys.hh" #include "mem/port_proxy.hh" +class ThreadContext; + /** * A TranslatingPortProxy in FS mode translates a virtual address to a * physical address and then calls the read/write functions of the diff -r 2f0e70823f80 -r d735ce2825ce src/mem/fs_translating_port_proxy.cc --- a/src/mem/fs_translating_port_proxy.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/fs_translating_port_proxy.cc Mon Aug 26 11:59:18 2013 +0100 @@ -46,6 +46,7 @@ * Port object definitions. */ +#include "arch/vtophys.hh" #include "base/chunk_generator.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" diff -r 2f0e70823f80 -r d735ce2825ce src/mem/port_proxy.hh --- a/src/mem/port_proxy.hh Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/port_proxy.hh Mon Aug 26 11:59:18 2013 +0100 @@ -60,7 +60,7 @@ #define __MEM_PORT_PROXY_HH__ #include "config/the_isa.hh" -#if THE_ISA != NO_ISA +#if THE_ISA != NULL_ISA #include "arch/isa_traits.hh" #endif @@ -127,7 +127,7 @@ template void write(Addr address, T data) const; -#if THE_ISA != NO_ISA +#if THE_ISA != NULL_ISA /** * Read sizeof(T) bytes from address and return as object T. * Performs Guest to Host endianness transform. @@ -161,7 +161,7 @@ writeBlob(address, (uint8_t*)&data, sizeof(T)); } -#if THE_ISA != NO_ISA +#if THE_ISA != NULL_ISA template T PortProxy::readGtoH(Addr address) const diff -r 2f0e70823f80 -r d735ce2825ce src/mem/ruby/SConscript --- a/src/mem/ruby/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/mem/ruby/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -37,7 +37,7 @@ Import('*') -if env['TARGET_ISA'] == 'no': +if env['TARGET_ISA'] == 'null': Return() if env['PROTOCOL'] == 'None': diff -r 2f0e70823f80 -r d735ce2825ce src/python/swig/pyobject.cc --- a/src/python/swig/pyobject.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/python/swig/pyobject.cc Mon Aug 26 11:59:18 2013 +0100 @@ -34,16 +34,19 @@ #include "base/inifile.hh" #include "base/output.hh" +#include "config/the_isa.hh" +#if THE_ISA != NULL_ISA #include "dev/etherdevice.hh" #include "dev/etherobject.hh" +#endif #include "mem/mem_object.hh" -#include "mem/port.hh" #include "python/swig/pyobject.hh" #include "sim/full_system.hh" #include "sim/sim_object.hh" using namespace std; +#if THE_ISA != NULL_ISA EtherInt * lookupEthPort(SimObject *so, const std::string &name, int i) { @@ -61,6 +64,7 @@ p = ed->getEthPort(name, i); return p; } +#endif /** * Connect the described MemObject ports. Called from Python via SWIG. @@ -71,6 +75,7 @@ connectPorts(SimObject *o1, const std::string &name1, int i1, SimObject *o2, const std::string &name2, int i2) { +#if THE_ISA != NULL_ISA if (FullSystem) { EtherObject *eo1, *eo2; EtherDevice *ed1, *ed2; @@ -92,6 +97,7 @@ } } } +#endif MemObject *mo1, *mo2; mo1 = dynamic_cast(o1); mo2 = dynamic_cast(o2); diff -r 2f0e70823f80 -r d735ce2825ce src/sim/SConscript --- a/src/sim/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/sim/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -33,9 +33,9 @@ SimObject('BaseTLB.py') SimObject('ClockedObject.py') SimObject('Root.py') -SimObject('InstTracer.py') SimObject('ClockDomain.py') SimObject('VoltageDomain.py') +SimObject('System.py') Source('arguments.cc') Source('async.cc') @@ -51,19 +51,17 @@ Source('sim_object.cc') Source('simulate.cc') Source('stat_control.cc') -Source('syscall_emul.cc') Source('clock_domain.cc') Source('voltage_domain.cc') +Source('system.cc') -if env['TARGET_ISA'] != 'no': +if env['TARGET_ISA'] != 'null': + SimObject('InstTracer.py') SimObject('Process.py') - SimObject('System.py') Source('faults.cc') Source('process.cc') Source('pseudo_inst.cc') - Source('system.cc') - -if env['TARGET_ISA'] != 'no': + Source('syscall_emul.cc') Source('tlb.cc') DebugFlag('Checkpoint') diff -r 2f0e70823f80 -r d735ce2825ce src/sim/arguments.hh --- a/src/sim/arguments.hh Mon Aug 26 11:59:09 2013 +0100 +++ b/src/sim/arguments.hh Mon Aug 26 11:59:18 2013 +0100 @@ -33,7 +33,6 @@ #include -#include "arch/vtophys.hh" #include "base/refcnt.hh" #include "base/types.hh" #include "mem/fs_translating_port_proxy.hh" diff -r 2f0e70823f80 -r d735ce2825ce src/sim/stat_control.cc --- a/src/sim/stat_control.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/sim/stat_control.cc Mon Aug 26 11:59:18 2013 +0100 @@ -52,13 +52,7 @@ #include "base/hostinfo.hh" #include "base/statistics.hh" #include "base/time.hh" -#include "config/the_isa.hh" -#if THE_ISA == NO_ISA -#include "arch/noisa/cpu_dummy.hh" -#else #include "cpu/base.hh" -#endif - #include "sim/eventq_impl.hh" #include "sim/stat_control.hh" diff -r 2f0e70823f80 -r d735ce2825ce src/sim/system.hh --- a/src/sim/system.hh Mon Aug 26 11:59:09 2013 +0100 +++ b/src/sim/system.hh Mon Aug 26 11:59:18 2013 +0100 @@ -184,7 +184,9 @@ */ unsigned int cacheLineSize() const { return _cacheLineSize; } +#if THE_ISA != NULL_ISA PCEventQueue pcEventQueue; +#endif std::vector threadContexts; int _numContexts; @@ -380,11 +382,13 @@ { Addr addr = 0; // initialize only to avoid compiler warning +#if THE_ISA != NULL_ISA if (symtab->findAddress(lbl, addr)) { T *ev = new T(&pcEventQueue, desc, fixFuncEventAddr(addr), std::forward(args)...); return ev; } +#endif return NULL; } diff -r 2f0e70823f80 -r d735ce2825ce src/sim/system.cc --- a/src/sim/system.cc Mon Aug 26 11:59:09 2013 +0100 +++ b/src/sim/system.cc Mon Aug 26 11:59:18 2013 +0100 @@ -48,7 +48,6 @@ #include "arch/isa_traits.hh" #include "arch/remote_gdb.hh" #include "arch/utility.hh" -#include "arch/vtophys.hh" #include "base/loader/object_file.hh" #include "base/loader/symtab.hh" #include "base/str.hh" @@ -228,6 +227,7 @@ threadContexts[id] = tc; _numContexts++; +#if THE_ISA != NULL_ISA int port = getRemoteGDBPort(); if (port) { RemoteGDB *rgdb = new RemoteGDB(this, tc); @@ -243,6 +243,7 @@ remoteGDB[id] = rgdb; } +#endif activeCpus.push_back(false); diff -r 2f0e70823f80 -r d735ce2825ce src/unittest/SConscript --- a/src/unittest/SConscript Mon Aug 26 11:59:09 2013 +0100 +++ b/src/unittest/SConscript Mon Aug 26 11:59:18 2013 +0100 @@ -30,9 +30,6 @@ Import('*') -if env['TARGET_ISA'] == 'no': - Return() - Source('unittest.cc') UnitTest('bitvectest', 'bitvectest.cc') diff -r 2f0e70823f80 -r d735ce2825ce util/regress --- a/util/regress Mon Aug 26 11:59:09 2013 +0100 +++ b/util/regress Mon Aug 26 11:59:18 2013 +0100 @@ -45,6 +45,7 @@ 'ALPHA_MOESI_CMP_directory,' \ 'ALPHA_MOESI_CMP_token,' \ 'MIPS,' \ + 'NULL,' \ 'POWER,' \ 'SPARC,' \ 'X86,X86_MESI_CMP_directory,' \