diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2008-10-11 16:08:14 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2008-10-11 16:08:14 -0700 |
commit | 168e524b9bfc9a53465562e2901c65ef388a237b (patch) | |
tree | 2763fc45863d288fa063f991bc70c7867cabd938 /src/dev/x86/pc.cc | |
parent | a2599e4fc1272e4c1fdf5cff90da88653579b62f (diff) | |
download | gem5-168e524b9bfc9a53465562e2901c65ef388a237b.tar.xz |
X86: Create an IO APIC device.
Diffstat (limited to 'src/dev/x86/pc.cc')
-rw-r--r-- | src/dev/x86/pc.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dev/x86/pc.cc b/src/dev/x86/pc.cc index 0dc8d6cd5..4cd81dd50 100644 --- a/src/dev/x86/pc.cc +++ b/src/dev/x86/pc.cc @@ -39,6 +39,7 @@ #include "arch/x86/x86_traits.hh" #include "cpu/intr_control.hh" #include "dev/terminal.hh" +#include "dev/x86/i82094aa.hh" #include "dev/x86/i8254.hh" #include "dev/x86/pc.hh" #include "dev/x86/south_bridge.hh" @@ -59,6 +60,10 @@ void Pc::init() { assert(southBridge); + + /* + * Initialize the timer. + */ I8254 & timer = *southBridge->pit; //Timer 0, mode 2, no bcd, 16 bit count timer.writeControl(0x34); @@ -67,6 +72,16 @@ Pc::init() //Write a 16 bit count of 0 timer.writeCounter(0, 0); timer.writeCounter(0, 0); + + /* + * Initialize the I/O APIC. + */ + I82094AA & ioApic = *southBridge->ioApic; + I82094AA::RedirTableEntry entry = 0; + entry.deliveryMode = 0x7; + entry.vector = 0x20; + ioApic.writeReg(0x10, entry.bottomDW); + ioApic.writeReg(0x11, entry.topDW); } Tick |