ABI | Description | Triggers
---------|--------------|----------
- aarch64 | 64 bit ARM | instruction, adddress, semihosting
+ arm64 | 64 bit ARM | instruction, adddress, semihosting
arm | 32 bit ARM | instruction
thumb | ARM thumb | instruction
sparc | 64 bit SPARC | instruction
ABI | QEMU_ARCH | CROSS_COMPILE
---------|-----------|---------------------
- aarch64 | aarch64 | aarch64-linux-gnu-
+ arm64 | aarch64 | aarch64-linux-gnu-
arm | arm | arm-linux-gnueabihf-
thumb | arm | arm-linux-gnueabihf-
sparc | sparc64 | sparc64-linux-gnu-
### SCons command line flags
--debug-build: Compile with the -g option, and -O0.
+--run-tests: Allow the test result XML files to be build targets.
+--verbose: Show build command lines and full command output.
## External dependency detection
running these tests under gem5, set the RUNNING_IN_GEM5 environment variable
which will tell the test to expect the trigger mechanism to actually work.
+A junit test exists for the Java jar, in a file named 'OpsTest.java'. That test
+can be run on its own through its own main function, or through the junit
+framework.
+
# Command line utility
ABI | Default call type
---------|-------------------
- aarch64 | instruction
+ arm64 | instruction
arm | instruction
thumb | instruction
sparc | instruction
# Java jar
-To use the gem5 java jar, you will need to load the corresponding .so.
+In your java source, import the gem5Op class.
-```shell
-System.loadLibrary("gem5OpJni");
+```java
+import gem5.Ops
```
-In your java source, import the gem5Op class which will have methods for
-calling each of the gem5 operations.
+This class provides a static map named callTypes which map from each of the
+call type names ("addr", "inst", or "semi") to an Ops instance. That instance
+will provide a set of methods which trigger each of the gem5 operations using
+the requested trigger mechanism. The call type "default" maps to whatever the
+default call type is for the current ABI.
```shell
-import jni.gem5Op
+gem5.Ops gem5_ops = gem5.Ops.callTypes.get("default");
+long sum = gem5_ops.sum(1, 2, 3, 4, 5, 6);
```
-These methods will all use the magic instruction based trigger mechanism.
+To configure the address based trigger mechanism, you can use these static
+methods.
+
+void setAddr(long addr);
+Set the address for the "magic" address region.
+
+void mapMem();
+Map the "magic" physical address region into the process' address space, likely
+by mmapping the "/dev/mem" device file.
+
+void unmapMem();
+Unmap the "magic" physical address region that was previously mapped.