system.hh revision 7914
14202Sbinkertn@umich.edu/*
24202Sbinkertn@umich.edu * Copyright (c) 2010 ARM Limited
34202Sbinkertn@umich.edu * All rights reserved
44202Sbinkertn@umich.edu *
54202Sbinkertn@umich.edu * The license below extends only to copyright in the software and shall
64202Sbinkertn@umich.edu * not be construed as granting a license to any other intellectual
74202Sbinkertn@umich.edu * property including but not limited to intellectual property relating
84202Sbinkertn@umich.edu * to a hardware implementation of the functionality of the software
94202Sbinkertn@umich.edu * licensed hereunder.  You may use the software subject to the license
104202Sbinkertn@umich.edu * terms below provided that you ensure that this notice is replicated
114202Sbinkertn@umich.edu * unmodified and in its entirety in all distributions of the software,
124202Sbinkertn@umich.edu * modified or unmodified, in source code or in binary form.
134202Sbinkertn@umich.edu *
144202Sbinkertn@umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan
154202Sbinkertn@umich.edu * All rights reserved.
164202Sbinkertn@umich.edu *
174202Sbinkertn@umich.edu * Redistribution and use in source and binary forms, with or without
184202Sbinkertn@umich.edu * modification, are permitted provided that the following conditions are
194202Sbinkertn@umich.edu * met: redistributions of source code must retain the above copyright
204202Sbinkertn@umich.edu * notice, this list of conditions and the following disclaimer;
214202Sbinkertn@umich.edu * redistributions in binary form must reproduce the above copyright
224202Sbinkertn@umich.edu * notice, this list of conditions and the following disclaimer in the
234202Sbinkertn@umich.edu * documentation and/or other materials provided with the distribution;
244202Sbinkertn@umich.edu * neither the name of the copyright holders nor the names of its
254202Sbinkertn@umich.edu * contributors may be used to endorse or promote products derived from
264202Sbinkertn@umich.edu * this software without specific prior written permission.
274202Sbinkertn@umich.edu *
284202Sbinkertn@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
294202Sbinkertn@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
304202Sbinkertn@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
314202Sbinkertn@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
324202Sbinkertn@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
334486Sbinkertn@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
344486Sbinkertn@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
354486Sbinkertn@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
364486Sbinkertn@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
374486Sbinkertn@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
384202Sbinkertn@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
394202Sbinkertn@umich.edu *
404202Sbinkertn@umich.edu * Authors: Ali Saidi
414202Sbinkertn@umich.edu */
424202Sbinkertn@umich.edu
434202Sbinkertn@umich.edu#ifndef __ARCH_ARM_SYSTEM_HH__
444202Sbinkertn@umich.edu#define __ARCH_ARM_SYSTEM_HH__
454202Sbinkertn@umich.edu
465650Sgblack@eecs.umich.edu#include <string>
474202Sbinkertn@umich.edu#include <vector>
484202Sbinkertn@umich.edu
494202Sbinkertn@umich.edu#include "params/ArmSystem.hh"
504202Sbinkertn@umich.edu#include "sim/sim_object.hh"
514202Sbinkertn@umich.edu#include "sim/system.hh"
524202Sbinkertn@umich.edu#include "kern/linux/events.hh"
535192Ssaidi@eecs.umich.edu
545192Ssaidi@eecs.umich.educlass ArmSystem : public System
555192Ssaidi@eecs.umich.edu{
565192Ssaidi@eecs.umich.edu  private:
575192Ssaidi@eecs.umich.edu    /**
585192Ssaidi@eecs.umich.edu     * PC based event to skip the dprink() call and emulate its
595192Ssaidi@eecs.umich.edu     * functionality
60     */
61    Linux::DebugPrintkEvent *debugPrintkEvent;
62
63  public:
64    typedef ArmSystemParams Params;
65    ArmSystem(Params *p);
66    ~ArmSystem();
67
68    virtual Addr fixFuncEventAddr(Addr addr)
69    {
70        // Remove the low bit that thumb symbols have set
71        // but that aren't actually odd aligned
72        if (addr & 0x1)
73            return addr & ~1;
74        return addr;
75    }
76};
77
78#endif
79
80