south_bridge.cc revision 11793
12810SN/A/*
211893Snikos.nikoleris@arm.com * Copyright (c) 2008 The Regents of The University of Michigan
39796Sprakash.ramrakhyani@arm.com * All rights reserved.
49796Sprakash.ramrakhyani@arm.com *
59796Sprakash.ramrakhyani@arm.com * Redistribution and use in source and binary forms, with or without
69796Sprakash.ramrakhyani@arm.com * modification, are permitted provided that the following conditions are
79796Sprakash.ramrakhyani@arm.com * met: redistributions of source code must retain the above copyright
89796Sprakash.ramrakhyani@arm.com * notice, this list of conditions and the following disclaimer;
99796Sprakash.ramrakhyani@arm.com * redistributions in binary form must reproduce the above copyright
109796Sprakash.ramrakhyani@arm.com * notice, this list of conditions and the following disclaimer in the
119796Sprakash.ramrakhyani@arm.com * documentation and/or other materials provided with the distribution;
129796Sprakash.ramrakhyani@arm.com * neither the name of the copyright holders nor the names of its
139796Sprakash.ramrakhyani@arm.com * contributors may be used to endorse or promote products derived from
142810SN/A * this software without specific prior written permission.
152810SN/A *
162810SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172810SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182810SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192810SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202810SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212810SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222810SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232810SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242810SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252810SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262810SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272810SN/A *
282810SN/A * Authors: Gabe Black
292810SN/A */
302810SN/A
312810SN/A#include "dev/x86/south_bridge.hh"
322810SN/A
332810SN/A#include <cassert>
342810SN/A
352810SN/A#include "dev/x86/pc.hh"
362810SN/A
372810SN/Ausing namespace X86ISA;
382810SN/A
392810SN/ASouthBridge::SouthBridge(const Params *p) : SimObject(p),
402810SN/A    platform(p->platform), pit(p->pit), pic1(p->pic1), pic2(p->pic2),
412810SN/A    cmos(p->cmos), speaker(p->speaker), ioApic(p->io_apic)
422810SN/A{
432810SN/A    // Let the platform know where we are
442810SN/A    Pc * pc = dynamic_cast<Pc *>(platform);
452810SN/A    assert(pc);
462810SN/A    pc->southBridge = this;
472810SN/A}
482810SN/A
4911486Snikos.nikoleris@arm.comSouthBridge *
5011486Snikos.nikoleris@arm.comSouthBridgeParams::create()
515338Sstever@gmail.com{
522810SN/A    return new SouthBridge(this);
532810SN/A}
549796Sprakash.ramrakhyani@arm.com