From 212a71e99e113b0b8ddf2d92516fae362a2c7489 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 2 Dec 2016 16:51:18 +0000 Subject: [PATCH] util, arm: Support mmapped m5ops on aarch64 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 Reviewed-by: Curtis Dunham Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/2966 --- util/m5/m5op_arm_A64.S | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/util/m5/m5op_arm_A64.S b/util/m5/m5op_arm_A64.S index b69530db3..f17c803d0 100644 --- a/util/m5/m5op_arm_A64.S +++ b/util/m5/m5op_arm_A64.S @@ -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 @@ -45,12 +45,23 @@ #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 -- 2.30.2