SConscript revision 10859
19651SAndreas.Sandberg@ARM.com# -*- mode:python -*-
29651SAndreas.Sandberg@ARM.com
39651SAndreas.Sandberg@ARM.com# Copyright (c) 2012 ARM Limited
49651SAndreas.Sandberg@ARM.com# All rights reserved.
59651SAndreas.Sandberg@ARM.com#
69651SAndreas.Sandberg@ARM.com# The license below extends only to copyright in the software and shall
79651SAndreas.Sandberg@ARM.com# not be construed as granting a license to any other intellectual
89651SAndreas.Sandberg@ARM.com# property including but not limited to intellectual property relating
99651SAndreas.Sandberg@ARM.com# to a hardware implementation of the functionality of the software
109651SAndreas.Sandberg@ARM.com# licensed hereunder.  You may use the software subject to the license
119651SAndreas.Sandberg@ARM.com# terms below provided that you ensure that this notice is replicated
129651SAndreas.Sandberg@ARM.com# unmodified and in its entirety in all distributions of the software,
139651SAndreas.Sandberg@ARM.com# modified or unmodified, in source code or in binary form.
149651SAndreas.Sandberg@ARM.com#
159651SAndreas.Sandberg@ARM.com# Redistribution and use in source and binary forms, with or without
169651SAndreas.Sandberg@ARM.com# modification, are permitted provided that the following conditions are
179651SAndreas.Sandberg@ARM.com# met: redistributions of source code must retain the above copyright
189651SAndreas.Sandberg@ARM.com# notice, this list of conditions and the following disclaimer;
199651SAndreas.Sandberg@ARM.com# redistributions in binary form must reproduce the above copyright
209651SAndreas.Sandberg@ARM.com# notice, this list of conditions and the following disclaimer in the
219651SAndreas.Sandberg@ARM.com# documentation and/or other materials provided with the distribution;
229651SAndreas.Sandberg@ARM.com# neither the name of the copyright holders nor the names of its
239651SAndreas.Sandberg@ARM.com# contributors may be used to endorse or promote products derived from
249651SAndreas.Sandberg@ARM.com# this software without specific prior written permission.
259651SAndreas.Sandberg@ARM.com#
269651SAndreas.Sandberg@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
279651SAndreas.Sandberg@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
289651SAndreas.Sandberg@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
299651SAndreas.Sandberg@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
309651SAndreas.Sandberg@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
319651SAndreas.Sandberg@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
329651SAndreas.Sandberg@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
339651SAndreas.Sandberg@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
349651SAndreas.Sandberg@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
359651SAndreas.Sandberg@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
369651SAndreas.Sandberg@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
379651SAndreas.Sandberg@ARM.com#
389651SAndreas.Sandberg@ARM.com# Authors: Andreas Sandberg
399651SAndreas.Sandberg@ARM.com
409651SAndreas.Sandberg@ARM.comImport('*')
419651SAndreas.Sandberg@ARM.com
429651SAndreas.Sandberg@ARM.comif env['USE_KVM']:
439651SAndreas.Sandberg@ARM.com    SimObject('KvmVM.py')
449651SAndreas.Sandberg@ARM.com    SimObject('BaseKvmCPU.py')
459651SAndreas.Sandberg@ARM.com
469651SAndreas.Sandberg@ARM.com    Source('base.cc')
4710859Sandreas.sandberg@arm.com    Source('device.cc')
489651SAndreas.Sandberg@ARM.com    Source('vm.cc')
499651SAndreas.Sandberg@ARM.com    Source('perfevent.cc')
509651SAndreas.Sandberg@ARM.com    Source('timer.cc')
519651SAndreas.Sandberg@ARM.com
5210857Sandreas.sandberg@arm.com    if env['TARGET_ISA'] == 'x86':
539883Sandreas@sandberg.pp.se        SimObject('X86KvmCPU.py')
549883Sandreas@sandberg.pp.se        Source('x86_cpu.cc')
559657Sandreas.sandberg@arm.com
569651SAndreas.Sandberg@ARM.com    DebugFlag('Kvm', 'Basic KVM Functionality')
579651SAndreas.Sandberg@ARM.com    DebugFlag('KvmContext', 'KVM/gem5 context synchronization')
589651SAndreas.Sandberg@ARM.com    DebugFlag('KvmIO', 'KVM MMIO diagnostics')
599651SAndreas.Sandberg@ARM.com    DebugFlag('KvmInt', 'KVM Interrupt handling')
609651SAndreas.Sandberg@ARM.com    DebugFlag('KvmRun', 'KvmRun entry/exit diagnostics')
619651SAndreas.Sandberg@ARM.com    DebugFlag('KvmTimer', 'KVM timing')
629651SAndreas.Sandberg@ARM.com
639651SAndreas.Sandberg@ARM.com    CompoundFlag('KvmAll', [ 'Kvm', 'KvmContext', 'KvmRun',
649651SAndreas.Sandberg@ARM.com                             'KvmIO', 'KvmInt', 'KvmTimer' ],
659651SAndreas.Sandberg@ARM.com                 'All KVM debug flags')
66