util, arm: Support mmapped m5ops on aarch64
authorAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 2 Dec 2016 16:51:18 +0000 (16:51 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 9 May 2017 10:09:58 +0000 (10:09 +0000)
Add support for memory-mapped m5ops in the aarch64 version of the m5
utility. To enable support for memory-mapped m5ops, compile the tool
with the define M5OP_ADDR set to the base of the m5op PA range.

Change-Id: I13e21e48536b9849bf4081411b66b2f350f7a8ac
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2966

util/m5/m5op_arm_A64.S

index b69530db354cb537124fdf264bc82f7f0842f7ad..f17c803d0ada1ea7f509243ede8be8ec117376dc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2013, 2016 ARM Limited
+ * Copyright (c) 2010-2013, 2016-2017 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
 
 #include "m5ops.h"
 
+#ifdef M5OP_ADDR
+.macro m5op_func, name, func, subfunc
+        .globl \name
+        \name:
+        ldr x9, m5_mem
+        movz x10, #((\func << 8) | \subfunc)
+        ldr x0, [ x9, x10 ]
+        ret
+.endm
+#else
 .macro m5op_func, name, func, subfunc
         .globl \name
         \name:
         .long 0xff000110 | (\func << 16) | (\subfunc << 12)
         ret
 .endm
+#endif
 
 .text
 #define M5OP(name, func, subfunc) m5op_func name, func, subfunc