system.hh revision 7733
17585SAli.Saidi@arm.com/*
27585SAli.Saidi@arm.com * Copyright (c) 2010 ARM Limited
37585SAli.Saidi@arm.com * All rights reserved
47585SAli.Saidi@arm.com *
57585SAli.Saidi@arm.com * The license below extends only to copyright in the software and shall
67585SAli.Saidi@arm.com * not be construed as granting a license to any other intellectual
77585SAli.Saidi@arm.com * property including but not limited to intellectual property relating
87585SAli.Saidi@arm.com * to a hardware implementation of the functionality of the software
97585SAli.Saidi@arm.com * licensed hereunder.  You may use the software subject to the license
107585SAli.Saidi@arm.com * terms below provided that you ensure that this notice is replicated
117585SAli.Saidi@arm.com * unmodified and in its entirety in all distributions of the software,
127585SAli.Saidi@arm.com * modified or unmodified, in source code or in binary form.
137585SAli.Saidi@arm.com *
147585SAli.Saidi@arm.com * Copyright (c) 2002-2005 The Regents of The University of Michigan
157585SAli.Saidi@arm.com * All rights reserved.
167585SAli.Saidi@arm.com *
177585SAli.Saidi@arm.com * Redistribution and use in source and binary forms, with or without
187585SAli.Saidi@arm.com * modification, are permitted provided that the following conditions are
197585SAli.Saidi@arm.com * met: redistributions of source code must retain the above copyright
207585SAli.Saidi@arm.com * notice, this list of conditions and the following disclaimer;
217585SAli.Saidi@arm.com * redistributions in binary form must reproduce the above copyright
227585SAli.Saidi@arm.com * notice, this list of conditions and the following disclaimer in the
237585SAli.Saidi@arm.com * documentation and/or other materials provided with the distribution;
247585SAli.Saidi@arm.com * neither the name of the copyright holders nor the names of its
257585SAli.Saidi@arm.com * contributors may be used to endorse or promote products derived from
267585SAli.Saidi@arm.com * this software without specific prior written permission.
277585SAli.Saidi@arm.com *
287585SAli.Saidi@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
297585SAli.Saidi@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
307585SAli.Saidi@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
317585SAli.Saidi@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
327585SAli.Saidi@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
337585SAli.Saidi@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
347585SAli.Saidi@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
357585SAli.Saidi@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
367585SAli.Saidi@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
377585SAli.Saidi@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
387585SAli.Saidi@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
397585SAli.Saidi@arm.com *
407585SAli.Saidi@arm.com * Authors: Ali Saidi
417585SAli.Saidi@arm.com */
427585SAli.Saidi@arm.com
437585SAli.Saidi@arm.com#ifndef __ARCH_ARM_LINUX_SYSTEM_HH__
447585SAli.Saidi@arm.com#define __ARCH_ARM_LINUX_SYSTEM_HH__
457585SAli.Saidi@arm.com
467585SAli.Saidi@arm.com#include <string>
477585SAli.Saidi@arm.com#include <vector>
487585SAli.Saidi@arm.com
497585SAli.Saidi@arm.com#include "arch/arm/system.hh"
507585SAli.Saidi@arm.com#include "kern/linux/events.hh"
517585SAli.Saidi@arm.com#include "params/LinuxArmSystem.hh"
527585SAli.Saidi@arm.com
537585SAli.Saidi@arm.comclass LinuxArmSystem : public ArmSystem
547585SAli.Saidi@arm.com{
557585SAli.Saidi@arm.com  protected:
567585SAli.Saidi@arm.com    static const int ParamsList =  0x100;
577585SAli.Saidi@arm.com
587585SAli.Saidi@arm.com  public:
597585SAli.Saidi@arm.com    /** Boilerplate params code */
607585SAli.Saidi@arm.com    typedef LinuxArmSystemParams Params;
617585SAli.Saidi@arm.com    const Params *
627585SAli.Saidi@arm.com    params() const
637585SAli.Saidi@arm.com    {
647585SAli.Saidi@arm.com        return dynamic_cast<const Params *>(_params);
657585SAli.Saidi@arm.com    }
667585SAli.Saidi@arm.com
677585SAli.Saidi@arm.com    LinuxArmSystem(Params *p);
687585SAli.Saidi@arm.com    ~LinuxArmSystem();
697585SAli.Saidi@arm.com
707733SAli.Saidi@ARM.com    void initState();
717733SAli.Saidi@ARM.com
727585SAli.Saidi@arm.com  private:
737585SAli.Saidi@arm.com#ifndef NDEBUG
747585SAli.Saidi@arm.com    /** Event to halt the simulator if the kernel calls panic()  */
757585SAli.Saidi@arm.com    BreakPCEvent *kernelPanicEvent;
767585SAli.Saidi@arm.com#endif
777585SAli.Saidi@arm.com};
787585SAli.Saidi@arm.com
797585SAli.Saidi@arm.com#endif // __ARCH_ARM_LINUX_SYSTEM_HH__
807585SAli.Saidi@arm.com
81