ARM: Add a memory_barrier function to the "comm page".
authorGabe Black <gblack@eecs.umich.edu>
Wed, 10 Jun 2009 06:41:35 +0000 (23:41 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 10 Jun 2009 06:41:35 +0000 (23:41 -0700)
This function doesn't actually provide a memory barrier (I don't think they're
implemented) and instead just returns.

src/arch/arm/linux/process.cc

index bc6388b73250f70a05862f1d4d1602101754a263..a36d1fd8fecaa622585636e580d29e858ef7b16b 100644 (file)
@@ -482,6 +482,14 @@ ArmLinuxProcess::startup()
                                     swiNeg1, sizeof(swiNeg1));
     }
 
+    // We don't have barriers, so just return.
+    uint8_t memory_barrier[] =
+    {
+        0x0e, 0xf0, 0xa0, 0xe1  //usr_ret lr
+    };
+    tc->getMemPort()->writeBlob(commPage + 0x0fa0, memory_barrier,
+                                sizeof(memory_barrier));
+
     // This -should- be atomic, but I don't think all the support that we'd
     // need is implemented. There should also be memory barriers around it.
     uint8_t cmpxchg[] =