ARM: Add support for some more registers in the real view controller.
authorAli Saidi <Ali.Saidi@ARM.com>
Thu, 5 May 2011 01:38:27 +0000 (20:38 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Thu, 5 May 2011 01:38:27 +0000 (20:38 -0500)
src/dev/arm/rv_ctrl.cc
src/dev/arm/rv_ctrl.hh

index f9cdbe8a150eaba392a9a8ec7f1f63077eb0493e..e24fea737987b856225a82fb14c69062a0ec15a4 100644 (file)
@@ -43,7 +43,7 @@
 #include "mem/packet_access.hh"
 
 RealViewCtrl::RealViewCtrl(Params *p)
-    : BasicPioDevice(p)
+    : BasicPioDevice(p), flags(0)
 {
     pioSize = 0xD4;
 }
@@ -94,6 +94,9 @@ RealViewCtrl::read(PacketPtr pkt)
       case Lock:
         pkt->set<uint32_t>(sysLock);
         break;
+      case Flags:
+        pkt->set<uint32_t>(flags);
+        break;
       default:
         panic("Tried to read RealView I/O at offset %#x that doesn't exist\n", daddr);
         break;
@@ -121,6 +124,9 @@ RealViewCtrl::write(PacketPtr pkt)
       case Lock:
         sysLock.lockVal = pkt->get<uint16_t>();
         break;
+      case Flags:
+        flags = pkt->get<uint32_t>();
+        break;
       default:
         panic("Tried to write RVIO at offset %#x that doesn't exist\n", daddr);
         break;
@@ -132,11 +138,13 @@ RealViewCtrl::write(PacketPtr pkt)
 void
 RealViewCtrl::serialize(std::ostream &os)
 {
+    SERIALIZE_SCALAR(flags);
 }
 
 void
 RealViewCtrl::unserialize(Checkpoint *cp, const std::string &section)
 {
+    UNSERIALIZE_SCALAR(flags);
 }
 
 RealViewCtrl *
index ceed5ef2f437560b7f4ea1d0f4af77454f94b686..255b21c0f445d15729c9f987a7366ffd3bc29844 100644 (file)
@@ -95,6 +95,13 @@ class RealViewCtrl : public BasicPioDevice
 
     SysLockReg sysLock;
 
+    /** This register is used for smp booting.
+     * The primary cpu writes the secondary start address here before
+     * sends it a soft interrupt. The secondary cpu reads this register and if
+     * it's non-zero it jumps to the address
+     */
+    uint32_t flags;
+
   public:
     typedef RealViewCtrlParams Params;
     const Params *