amba_fake.hh revision 9806
16876Ssteve.reinhardt@amd.com/*
210089Sandreas.hansson@arm.com * Copyright (c) 2010 ARM Limited
38922Swilliam.wang@arm.com * All rights reserved
48922Swilliam.wang@arm.com *
58922Swilliam.wang@arm.com * The license below extends only to copyright in the software and shall
68922Swilliam.wang@arm.com * not be construed as granting a license to any other intellectual
78922Swilliam.wang@arm.com * property including but not limited to intellectual property relating
88922Swilliam.wang@arm.com * to a hardware implementation of the functionality of the software
98922Swilliam.wang@arm.com * licensed hereunder.  You may use the software subject to the license
108922Swilliam.wang@arm.com * terms below provided that you ensure that this notice is replicated
118922Swilliam.wang@arm.com * unmodified and in its entirety in all distributions of the software,
128922Swilliam.wang@arm.com * modified or unmodified, in source code or in binary form.
138922Swilliam.wang@arm.com *
146876Ssteve.reinhardt@amd.com * Copyright (c) 2005 The Regents of The University of Michigan
158717Snilay@cs.wisc.edu * All rights reserved.
166876Ssteve.reinhardt@amd.com *
176876Ssteve.reinhardt@amd.com * Redistribution and use in source and binary forms, with or without
186876Ssteve.reinhardt@amd.com * modification, are permitted provided that the following conditions are
196876Ssteve.reinhardt@amd.com * met: redistributions of source code must retain the above copyright
206876Ssteve.reinhardt@amd.com * notice, this list of conditions and the following disclaimer;
216876Ssteve.reinhardt@amd.com * redistributions in binary form must reproduce the above copyright
226876Ssteve.reinhardt@amd.com * notice, this list of conditions and the following disclaimer in the
236876Ssteve.reinhardt@amd.com * documentation and/or other materials provided with the distribution;
246876Ssteve.reinhardt@amd.com * neither the name of the copyright holders nor the names of its
256876Ssteve.reinhardt@amd.com * contributors may be used to endorse or promote products derived from
266876Ssteve.reinhardt@amd.com * this software without specific prior written permission.
276876Ssteve.reinhardt@amd.com *
286876Ssteve.reinhardt@amd.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
296876Ssteve.reinhardt@amd.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
306876Ssteve.reinhardt@amd.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
316876Ssteve.reinhardt@amd.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
326876Ssteve.reinhardt@amd.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
336876Ssteve.reinhardt@amd.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
346876Ssteve.reinhardt@amd.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
356876Ssteve.reinhardt@amd.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
366876Ssteve.reinhardt@amd.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
376876Ssteve.reinhardt@amd.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
386876Ssteve.reinhardt@amd.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
396876Ssteve.reinhardt@amd.com *
406876Ssteve.reinhardt@amd.com * Authors: Ali Saidi
416876Ssteve.reinhardt@amd.com */
427632SBrad.Beckmann@amd.com
438688Snilay@cs.wisc.edu
449152Satgutier@umich.edu/** @file
458232Snate@binkert.org * This device sits in memory and reponds appropriately so the linux kernel
468436SBrad.Beckmann@amd.com * ignores the device it is trying to talk to. It is used so the kernel doesn't
477039Snate@binkert.org * need to be modified and devices that we are not interested in will simply be
486285Snate@binkert.org * skipped.
4910117Snilay@cs.wisc.edu */
508923Sandreas.hansson@arm.com
516285Snate@binkert.org#ifndef __DEV_ARM_AMBA_FAKE_H__
526876Ssteve.reinhardt@amd.com#define __DEV_ARM_AMBA_FAKE_H__
538922Swilliam.wang@arm.com
5410090Snilay@cs.wisc.edu#include "dev/arm/amba_device.hh"
5510090Snilay@cs.wisc.edu#include "params/AmbaFake.hh"
5610090Snilay@cs.wisc.edu
5710090Snilay@cs.wisc.educlass AmbaFake : public AmbaPioDevice
5810090Snilay@cs.wisc.edu{
5910090Snilay@cs.wisc.edu  public:
6010090Snilay@cs.wisc.edu   typedef AmbaFakeParams Params;
6110115Snilay@cs.wisc.edu   const Params *
626876Ssteve.reinhardt@amd.com    params() const
636876Ssteve.reinhardt@amd.com    {
646876Ssteve.reinhardt@amd.com        return dynamic_cast<const Params *>(_params);
658922Swilliam.wang@arm.com    }
668922Swilliam.wang@arm.com    AmbaFake(const Params *p);
6710090Snilay@cs.wisc.edu
6810115Snilay@cs.wisc.edu    virtual Tick read(PacketPtr pkt);
698922Swilliam.wang@arm.com    virtual Tick write(PacketPtr pkt);
707039Snate@binkert.org
718922Swilliam.wang@arm.com};
728922Swilliam.wang@arm.com
7310090Snilay@cs.wisc.edu#endif //__DEV_ARM_AMBA_FAKE_H__
7410090Snilay@cs.wisc.edu