summaryrefslogtreecommitdiff
path: root/src/dev/x86/south_bridge/south_bridge.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/x86/south_bridge/south_bridge.cc')
-rw-r--r--src/dev/x86/south_bridge/south_bridge.cc44
1 files changed, 5 insertions, 39 deletions
diff --git a/src/dev/x86/south_bridge/south_bridge.cc b/src/dev/x86/south_bridge/south_bridge.cc
index 0e9a63a74..12f4657b0 100644
--- a/src/dev/x86/south_bridge/south_bridge.cc
+++ b/src/dev/x86/south_bridge/south_bridge.cc
@@ -28,51 +28,17 @@
* Authors: Gabe Black
*/
-#include "arch/x86/x86_traits.hh"
-#include "base/range.hh"
+#include <assert.h>
+
#include "dev/x86/pc.hh"
#include "dev/x86/south_bridge/south_bridge.hh"
using namespace X86ISA;
-void
-SouthBridge::addDevice(X86ISA::SubDevice & sub)
-{
- rangeList.push_back(sub.addrRange);
- rangeMap.insert(sub.addrRange, &sub);
-}
-
-void
-SouthBridge::addressRanges(AddrRangeList &range_list)
-{
- range_list = rangeList;
-}
-
-Tick
-SouthBridge::read(PacketPtr pkt)
+SouthBridge::SouthBridge(const Params *p) : SimObject(p),
+ platform(p->platform), pit(p->pit), pic1(p->pic1), pic2(p->pic2),
+ cmos(p->cmos), speaker(p->speaker)
{
- RangeMapIt sub =
- rangeMap.find(RangeSize(pkt->getAddr(), 1));
- assert(sub != rangeMap.end());
- return sub->second->read(pkt);
-}
-
-Tick
-SouthBridge::write(PacketPtr pkt)
-{
- RangeMapIt sub =
- rangeMap.find(RangeSize(pkt->getAddr(), 1));
- assert(sub != rangeMap.end());
- return sub->second->write(pkt);
-}
-
-SouthBridge::SouthBridge(const Params *p) : PioDevice(p),
- pit(this, p->name + ".pit", 0x40, 4, p->pio_latency),
- speaker(&pit, 0x61, 1, p->pio_latency)
-{
- addDevice(pit);
- addDevice(speaker);
-
// Let the platform know where we are
PC * pc = dynamic_cast<PC *>(platform);
assert(pc);