13630SN/A/* 210356SAli.Saidi@ARM.com * Copyright (c) 2009, 2014 ARM Limited 37090SN/A * All rights reserved 47090SN/A * 57090SN/A * The license below extends only to copyright in the software and shall 67090SN/A * not be construed as granting a license to any other intellectual 77090SN/A * property including but not limited to intellectual property relating 87090SN/A * to a hardware implementation of the functionality of the software 97090SN/A * licensed hereunder. You may use the software subject to the license 107090SN/A * terms below provided that you ensure that this notice is replicated 117090SN/A * unmodified and in its entirety in all distributions of the software, 127090SN/A * modified or unmodified, in source code or in binary form. 137090SN/A * 143630SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan 153630SN/A * All rights reserved. 163630SN/A * 173630SN/A * Redistribution and use in source and binary forms, with or without 183630SN/A * modification, are permitted provided that the following conditions are 193630SN/A * met: redistributions of source code must retain the above copyright 203630SN/A * notice, this list of conditions and the following disclaimer; 213630SN/A * redistributions in binary form must reproduce the above copyright 223630SN/A * notice, this list of conditions and the following disclaimer in the 233630SN/A * documentation and/or other materials provided with the distribution; 243630SN/A * neither the name of the copyright holders nor the names of its 253630SN/A * contributors may be used to endorse or promote products derived from 263630SN/A * this software without specific prior written permission. 273630SN/A * 283630SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 293630SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 303630SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 313630SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 323630SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 333630SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 343630SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 353630SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 363630SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 373630SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 383630SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 393630SN/A * 403630SN/A * Authors: Ali Saidi 413630SN/A */ 423630SN/A 433630SN/A/** @file 447584SAli.Saidi@arm.com * Implementation of RealView platform. 453630SN/A */ 463630SN/A 4711793Sbrandon.potter@amd.com#include "dev/arm/realview.hh" 4811793Sbrandon.potter@amd.com 493630SN/A#include <deque> 503630SN/A#include <string> 513630SN/A#include <vector> 523630SN/A 536658SN/A#include "config/the_isa.hh" 543630SN/A#include "cpu/intr_control.hh" 559525SAndreas.Sandberg@ARM.com#include "dev/arm/base_gic.hh" 563630SN/A#include "sim/system.hh" 573630SN/A 583630SN/Ausing namespace std; 593630SN/Ausing namespace TheISA; 603630SN/A 6111244Sandreas.sandberg@arm.com 627584SAli.Saidi@arm.comRealView::RealView(const Params *p) 6310537Sandreas.hansson@arm.com : Platform(p), system(p->system), gic(nullptr) 648741Sgblack@eecs.umich.edu{} 653630SN/A 663630SN/Avoid 677584SAli.Saidi@arm.comRealView::postConsoleInt() 683630SN/A{ 693832SN/A warn_once("Don't know what interrupt to post for console.\n"); 703832SN/A //panic("Need implementation\n"); 713630SN/A} 723630SN/A 733630SN/Avoid 747584SAli.Saidi@arm.comRealView::clearConsoleInt() 753630SN/A{ 763832SN/A warn_once("Don't know what interrupt to clear for console.\n"); 773832SN/A //panic("Need implementation\n"); 783630SN/A} 793630SN/A 803630SN/Avoid 817584SAli.Saidi@arm.comRealView::postPciInt(int line) 823630SN/A{ 838525SAli.Saidi@ARM.com gic->sendInt(line); 843630SN/A} 853630SN/A 863630SN/Avoid 877584SAli.Saidi@arm.comRealView::clearPciInt(int line) 883630SN/A{ 898525SAli.Saidi@ARM.com gic->clearInt(line); 903630SN/A} 913630SN/A 927584SAli.Saidi@arm.comRealView * 937584SAli.Saidi@arm.comRealViewParams::create() 943630SN/A{ 957584SAli.Saidi@arm.com return new RealView(this); 963630SN/A} 97