changeset 1fbc4a0427f0 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=1fbc4a0427f0
description:
        arm: Fix a GIC mask register bug

        This resulted in a kernel printk that said,
        "GIC CPU mask not found - kernel will fail to boot."

diffstat:

 src/dev/arm/gic_pl390.cc |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 2efeed2cef09 -r 1fbc4a0427f0 src/dev/arm/gic_pl390.cc
--- a/src/dev/arm/gic_pl390.cc  Thu Oct 17 10:20:45 2013 -0500
+++ b/src/dev/arm/gic_pl390.cc  Thu Oct 17 10:20:45 2013 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 ARM Limited
+ * Copyright (c) 2010, 2013 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -232,7 +232,12 @@
             }
         } else {
             assert(ctx_id < sys->numRunningContexts());
-            pkt->set<uint32_t>(ctx_id);
+            // convert the CPU id number into a bit mask
+            uint32_t ctx_mask = power(2, ctx_id);
+            // replicate the 8-bit mask 4 times in a 32-bit word
+            ctx_mask |= ctx_mask << 8;
+            ctx_mask |= ctx_mask << 16;
+            pkt->set<uint32_t>(ctx_mask);
         }
         goto done;
     }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to