1892SN/A/*
21762SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan
3892SN/A * All rights reserved.
4892SN/A *
5892SN/A * Redistribution and use in source and binary forms, with or without
6892SN/A * modification, are permitted provided that the following conditions are
7892SN/A * met: redistributions of source code must retain the above copyright
8892SN/A * notice, this list of conditions and the following disclaimer;
9892SN/A * redistributions in binary form must reproduce the above copyright
10892SN/A * notice, this list of conditions and the following disclaimer in the
11892SN/A * documentation and/or other materials provided with the distribution;
12892SN/A * neither the name of the copyright holders nor the names of its
13892SN/A * contributors may be used to endorse or promote products derived from
14892SN/A * this software without specific prior written permission.
15892SN/A *
16892SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17892SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18892SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19892SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20892SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21892SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22892SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23892SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24892SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25892SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26892SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Ali Saidi
29892SN/A */
30802SN/A
311722SN/A/** @file
32802SN/A * BadDevice implemenation
33802SN/A */
34802SN/A
3511793Sbrandon.potter@amd.com#include "dev/baddev.hh"
3611793Sbrandon.potter@amd.com
37802SN/A#include <string>
38802SN/A
39802SN/A#include "base/trace.hh"
404762Snate@binkert.org#include "params/BadDevice.hh"
41802SN/A#include "sim/system.hh"
42802SN/A
43802SN/Ausing namespace std;
44802SN/A
452539SN/ABadDevice::BadDevice(Params *p)
469808Sstever@gmail.com    : BasicPioDevice(p, 0x10), devname(p->devicename)
47802SN/A{
48802SN/A}
49802SN/A
50909SN/ATick
513349Sbinkertn@umich.eduBadDevice::read(PacketPtr pkt)
52909SN/A{
532539SN/A    panic("Device %s not imlpmented\n", devname);
543918Ssaidi@eecs.umich.edu    M5_DUMMY_RETURN
552539SN/A}
562539SN/A
572539SN/ATick
583349Sbinkertn@umich.eduBadDevice::write(PacketPtr pkt)
592539SN/A{
602539SN/A    panic("Device %s not imlpmented\n", devname);
613918Ssaidi@eecs.umich.edu    M5_DUMMY_RETURN
62909SN/A}
63802SN/A
644762Snate@binkert.orgBadDevice *
654762Snate@binkert.orgBadDeviceParams::create()
66802SN/A{
674762Snate@binkert.org    return new BadDevice(this);
68802SN/A}
69