resources: Merge branch develop into stable for v22.1

Change-Id: I900cbe92437aa0270e16e59452dd4c518172b5b6
diff --git a/README.md b/README.md
index 6b7ca1b..b78abd4 100644
--- a/README.md
+++ b/README.md
@@ -331,6 +331,14 @@
 
 To compile:
 
+**Note**: Make sure you are in gem5-resources directory (resources like square are not present in the gem5 repository)
+To clone the gem5-resources repository, run the following command:
+
+```
+git clone https://gem5.googlesource.com/public/gem5-resources
+```
+
+
 ```
 cd src/gpu/square
 docker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID gcr.io/gem5-test/gcn-gpu make gfx8-apu
diff --git a/resources.json b/resources.json
index 7064752..1135e9e 100644
--- a/resources.json
+++ b/resources.json
@@ -1,13 +1,89 @@
 
 {
-    "version" : "22.0",
-    "url_base" : "http://dist.gem5.org/dist/v22-0",
+    "version" : "develop",
+    "url_base" : "http://dist.gem5.org/dist/develop",
     "previous-versions" : {
         "develop" : "https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/develop/resources.json?format=TEXT",
         "21.2" : "http://resources.gem5.org/prev-resources-json/resources-21-2.json"
     },
     "resources": [
         {
+            "type" : "workload",
+            "name" : "x86-ubuntu-18.04-boot",
+            "documentation" : "A full boot of Ubuntu 18.04 with Linux 5.4.49 for X86. It runs an `m5 exit` command when the boot is completed unless the readfile is specified. If specified the readfile will be executed after booting.",
+            "function": "set_kernel_disk_workload",
+            "resources" : {
+                "kernel" : "x86-linux-kernel-5.4.49",
+                "disk_image":"x86-ubuntu-18.04-img"
+            },
+            "additional_params" : {}
+        },
+        {
+            "type" : "workload",
+            "name" : "riscv-ubuntu-20.04-boot",
+            "documentation" : "A full boot of Ubuntu 20.04 with Linux 5.10 for RISCV. It runs an `m5 exit` command when the boot is completed unless the readfile is specified. If specified the readfile will be executed after booting.",
+            "function": "set_kernel_disk_workload",
+            "resources" : {
+                "kernel" : "riscv-bootloader-vmlinux-5.10",
+                "disk_image":"riscv-ubuntu-20.04-img"
+            },
+            "additional_params" : {}
+        },
+        {
+            "type" : "workload",
+            "name" : "arm64-ubuntu-20.04-boot",
+            "documentation" : "A full boot of Ubuntu 20.04 with Linux 5.4.49 for ARM64. It runs an `m5 exit` command when the boot is completed unless the readfile is specified. If specified the readfile will be executed after booting.",
+            "function": "set_kernel_disk_workload",
+            "resources" : {
+                "kernel" : "arm64-linux-kernel-5.4.49",
+                "disk_image": "arm64-ubuntu-20.04-img",
+                "bootloader": "arm64-bootloader-foundation"
+            },
+            "additional_params" : {}
+        },
+        {
+            "type": "workload",
+            "name": "x86-print-this-15000-with-simpoints",
+            "documentation": "This workload is used in the 'configs/example/gem5_library/checkpoints/simpoints-se-checkpoint.py' example configuration script.",
+            "function": "set_se_simpoint_workload",
+            "resources": {
+                "binary": "x86-print-this",
+                "simpoint": "x86-print-this-1500-simpoints"
+            },
+            "additional_params" :{
+                "arguments": ["print this", 15000]
+            }
+        },
+        {
+            "type": "workload",
+            "name": "x86-print-this-15000-with-simpoints-and-checkpoint",
+            "documentation": "This workload is used in the 'configs/example/gem5_library/checkpoints/simpoints-se-restore.py' example configuration script.",
+            "function": "set_se_simpoint_workload",
+            "resources": {
+                "binary": "x86-print-this",
+                "simpoint": "x86-print-this-1500-simpoints",
+                "checkpoint": "simpoints-se-checkpoints-v22-1-v2"
+            },
+            "additional_params" :{
+                "arguments": ["print this", 15000]
+            }
+        },
+        {
+            "type": "resource",
+            "name": "x86-print-this-1500-simpoints",
+            "documentation": "Simpoints for running the 'x86-print-this' resource with the parameters `\"print this\" 15000`. This is encapsulated in the 'x86-print-this-15000-with-simpoints' workload.",
+            "architecture": "X86",
+            "is_zipped" : false,
+            "md5sum" : "3fcffe3956c8a95e3fb82e232e2b41fb",
+            "source" : null,
+            "is_tar_archive" : true,
+            "url": "{url_base}/simpoints/x86-print-this-15000-simpoints-20221013.tar",
+            "additional_metadata" : {
+                "simpoint_interval": 1000000,
+                "warmup_interval": 1000000
+            }
+        },
+        {
             "type": "resource",
             "name" : "vega-mmio",
             "documentation" : "Used with the 'x86-gpu-fs-img' disk image.",
@@ -20,7 +96,7 @@
         {
             "type": "resource",
             "name" : "riscv-hello-example-checkpoint",
-            "documentation" : "A checkpoint used in 'configs/example/gem5_library/checkpoints/riscv-hello-restore-checkpoint.py'.",
+            "documentation" : "A checkpoint used in 'configs/example/gem5_library/checkpoints/riscv-hello-restore-checkpoint.py'. This was used for the v22.0 release and should not be used for future releases.",
             "architecture": "RISCV",
             "is_zipped" : false,
             "md5sum" : "3a57c1bb1077176c4587b8a3bf4f8ace",
@@ -30,6 +106,39 @@
         },
         {
             "type": "resource",
+            "name" : "simpoints-se-checkpoints-v22-1",
+            "documentation" : "Checkpoints used in 'configs/example/gem5_library/checkpoints/simpoints-se-restore.py'. This is deprecated, 'simpoints-se-checkpits-v22-1-v2' should be used instead. This resource will be removed in future releases of gem5.",
+            "architecture": "X86",
+            "is_zipped" : true,
+            "md5sum" : "ebab7fffb11e93f2aa6ccfed9a0f692a",
+            "source" : null,
+            "is_tar_archive" : true,
+            "url": "{url_base}/checkpoints/simpoints-se-checkpoints-example-20220928.tar.gz"
+        },
+        {
+            "type": "resource",
+            "name" : "simpoints-se-checkpoints-v22-1-v2",
+            "documentation" : "Checkpoints used in 'configs/example/gem5_library/checkpoints/simpoints-se-restore.py'.",
+            "architecture": "X86",
+            "is_zipped" : true,
+            "md5sum" : "c88e51cca030720f4cc3e1d24a5cfd75",
+            "source" : null,
+            "is_tar_archive" : true,
+            "url": "{url_base}/checkpoints/simpoints-se-checkpoints-example-20221014.tar.gz"
+        },
+        {
+            "type": "resource",
+            "name" : "riscv-hello-example-checkpoint-v22-1",
+            "documentation" : "A checkpoint used in 'configs/example/gem5_library/checkpoints/riscv-hello-restore-checkpoint.py'. Used for v22.1 onwards.",
+            "architecture": "RISCV",
+            "is_zipped" : false,
+            "md5sum" : "346c7d079320ef7daead4e03914266c7",
+            "source" : null,
+            "is_tar_archive" : true,
+            "url": "{url_base}/checkpoints/riscv-hello-example-checkpoint-20220801.tar"
+        },
+        {
+            "type": "resource",
             "name" : "riscv-disk-img",
             "documentation" : "A simple RISCV disk image based on busybox.",
             "architecture": "RISCV",
@@ -67,6 +176,26 @@
         },
         {
             "type" : "resource",
+            "name" : "x86-m5-exit-repeat",
+            "documentation" : "A simple binary which will run `m5 exit` in an infinite loop. Compiled to the X86 ISA.",
+            "architecture" : "X86",
+            "is_zipped" : false,
+            "md5sum" : "0a19604f669c4b9e468cc2bedee62199",
+            "url" : "{url_base}/test-progs/m5-exit-repeat/x86-m5-exit-repeat-20220825",
+            "source" : "src/m5-exit-repeat"
+        },
+        {
+            "type" : "resource",
+            "name" : "x86-matrix-multiply",
+            "documentation" : "A simple binary which runs a matrix mutiply operation on two 100x100 matrixes. After multiplication it will return the print the of the multiplication.",
+            "architecture" : "X86",
+            "is_zipped" : false,
+            "md5sum" : "9e758bad40bafef98720085fc3c635b3",
+            "url" : "{url_base}/test-progs/matrix-multiply/x86-matrix-multiply-20220826",
+            "source" : "src/matrix-multiply"
+        },
+        {
+            "type" : "resource",
             "name" : "x86-parsec",
             "documentation" : "A disk image containing the PARSEC benchmark suite, compiled to X86, built on top of Ubuntu 18.04.",
             "architecture" : "X86",
@@ -136,8 +265,8 @@
             "documentation" : "A disk image containing Ubuntu 20.04 for RISCV which will run an `m5 readfile` instruction after booting. If no script file is specified an `m5 exit` instruction will be exected",
             "architecture" : "RISCV",
             "is_zipped" : true,
-            "md5sum" : "fece1414df7fa534a837e460095a9be8",
-            "url" : "{url_base}/images/riscv/ubuntu-20-04/riscv-ubuntu-20220318.img.gz",
+            "md5sum" : "e9ea10a3c606d26e2fa2f8ce5d1a8758",
+            "url" : "{url_base}/images/riscv/ubuntu-20-04/riscv-ubuntu-20221118.img.gz",
             "source" : "src/riscv-ubuntu",
             "additional_metadata" : {
                 "root_partition": "1"
@@ -377,16 +506,42 @@
                 {
                     "type" : "resource",
                     "name" : "riscv-lupio-linux-kernel",
-                    "documentation": "A kernel built with LupIO device (https://gitlab.com/luplab/lupio) drivers. Must be used when setting LupIO board workloads. Compataible with the 'riscv-lupio-busybox-img' disk image resource.",
+                    "documentation": "A kernel built with LupIO device (https://gitlab.com/luplab/lupio) drivers. Must be used when setting LupIO board workloads. Compatible with the 'riscv-lupio-busybox-img' disk image resource.",
                     "is_zipped" : false,
                     "architecture" : "RISCV",
-                    "md5sum" : "f94351edbbb0e7bd9617f7b381635546",
-                    "url" : "{url_base}/kernels/riscv/static/lupio-linux",
+                    "md5sum" : "1b7d6523647db85f9dd2b00d751f5f6f",
+                    "url" : "{url_base}/kernels/riscv/static/lupio-linux-20220727",
                     "source" : "src/lupv"
                 }
             ]
         },
         {
+            "type": "group",
+            "name": "print-this",
+            "contents": [
+                {
+                    "type" : "resource",
+                    "name": "riscv-print-this",
+                    "documentation": "A simple RISC-V binary that prints a string a set number of times. It takes two mandatory arguments: A string to print and an integer specifying how many times the string is to be printed.",
+                    "architecture" :"RISCV",
+                    "is_zipped" : false,
+                    "md5sum" : "ee2963ca71ce13ae2f096198b58064ad",
+                    "url" : "{url_base}/test-progs/print-this/riscv-print-this",
+                    "source" : "src/print-this"
+                },
+                {
+                    "type" : "resource",
+                    "name": "x86-print-this",
+                    "documentation": "A simple X86 binary that prints a string a set number of times. It takes two mandatory arguments: A string to print and an integer specifying how many times the string is to be printed.",
+                    "architecture" :"X86",
+                    "is_zipped" : false,
+                    "md5sum" : "eab785f7c14ab97b89e17c9af2f43002",
+                    "url" : "{url_base}/test-progs/print-this/x86-print-this",
+                    "source" : "src/print-this"
+                }
+            ]
+        },
+        {
             "type" : "group",
             "name" : "hello",
             "contents" : [
@@ -397,7 +552,7 @@
                     "architecture" : "RISCV",
                     "is_zipped" :  false,
                     "md5sum" : "6d9494d22b90d817e826b0d762fda973",
-                    "url" : "{url_base}/test-progs/hello/bin/riscv/linux/hello",
+                    "url" : "{url_base}/test-progs/hello/bin/riscv/linux/hello-20220728",
                     "source" : "src/simple"
                 },
                 {
diff --git a/src/gpu/heterosync/README.md b/src/gpu/heterosync/README.md
index 9d1d79b..30a03a7 100644
--- a/src/gpu/heterosync/README.md
+++ b/src/gpu/heterosync/README.md
@@ -28,7 +28,7 @@
 GCN3-based dGPU. There are other targets (release) that build for GPU types
 that are currently unsupported in gem5.
 
-## Running HeterSync on GCN3_X86/gem5.opt
+## Running HeteroSync on GCN3_X86/gem5.opt
 
 HeteroSync has multiple applications that can be run (see below).  For example, to run sleepMutex with 10 ld/st per thread, 16 WGs, and 4 iterations of the critical section:
 
diff --git a/src/gpu/pannotia/color/README.md b/src/gpu/pannotia/color/README.md
index bc425bf..2917986 100644
--- a/src/gpu/pannotia/color/README.md
+++ b/src/gpu/pannotia/color/README.md
@@ -4,7 +4,7 @@
     - x86
     - amdgpu
 layout: default
-permalink: resources/pannotia/bc
+permalink: resources/pannotia/color
 shortdoc: >
     Resources to build a disk image with the GCN3 Pannotia Color workload.
 ---
diff --git a/src/lupv/README.md b/src/lupv/README.md
index f34ba53..648b5b5 100644
--- a/src/lupv/README.md
+++ b/src/lupv/README.md
@@ -11,7 +11,8 @@
 author: ["Joël Porquet-Lupine"]
 ---
 
-This README will cover how to create a bootloader/kernel, and a disk image which may be used to run LupV (LupIO with RISC-V) in gem5.
+This README will cover how to create a bootloader/kernel, and a disk image which
+may be used to run LupV (LupIO with RISC-V) in gem5.
 
 An example script which uses these resources is provided here: <https://gem5.googlesource.com/public/gem5/+/refs/tags/v22.0.0.0/configs/example/lupv/>.
 
@@ -36,7 +37,7 @@
 ```terminal
 $ git clone https://gitlab.com/luplab/lupio/linux
 $ cd linux
-$ git checkout lupio
+$ git checkout lupio-dev-v5.8
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- lupv_defconfig
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j8
 ```
@@ -45,9 +46,7 @@
 - Adapt `CROSS_COMPILE` to your toolchain's prefix
 - Adapt `-j8` to the number of parallel jobs you want to run
 
-The resulting kernel image is in `arch/riscv/boot/Image`
-
-
+The resulting kernel image is in `arch/riscv/boot/Image`.
 
 ### Bootloader
 
@@ -65,7 +64,12 @@
 The resulting firmware which includes the bootloader and the kernel, and can be
 loaded as a kernel image in gem5, is in `build/bbl`.
 
+<<<<<<< HEAD
+A pre-built bootloader/kernel binary can be obtained from
+[here](http://dist.gem5.org/dist/v21-2/kernels/riscv/static/lupio-linux).
+=======
 A pre-built bootloader/kernel binary can be obtained from [here](http://dist.gem5.org/dist/v22-0/kernels/riscv/static/lupio-linux).
+>>>>>>> stable
 
 ## Root filesystem
 
@@ -76,8 +80,8 @@
 
 ### Busybox
 
-Copy `config_busybox_rv64_092021` file to your computer and compile busybox using this
-configuration.
+Copy `config_busybox_rv64_092021` file to your computer and compile busybox
+using this configuration.
 
 ```terminal
 $ git clone https://git.busybox.net/busybox/
@@ -134,4 +138,9 @@
 The resulting filesystem image, which can be loaded as a partition image in
 gem5, is `rootfs.img`.
 
+<<<<<<< HEAD
+A pre-built, gzipped, image can be obtained
+[here](http://dist.gem5.org/dist/v21-2/images/riscv/busybox/riscv-lupio-busybox.img.gz).
+=======
 A pre-built, gzipped, image can be obtained [here](http://dist.gem5.org/dist/v22-0/images/riscv/busybox/riscv-lupio-busybox.img.gz).
+>>>>>>> stable
diff --git a/src/m5-exit-repeat/Makefile b/src/m5-exit-repeat/Makefile
new file mode 100644
index 0000000..7387121
--- /dev/null
+++ b/src/m5-exit-repeat/Makefile
@@ -0,0 +1,41 @@
+# Copyright (c) 2022 The Regents of the University of California
+# All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+.DEFAULT_GOAL := m5-exit-repeat
+
+m5-exit-repeat: gem5/util/m5/build/x86/out/m5 m5-exit-repeat.c
+	gcc -o m5-exit-repeat m5-exit-repeat.c -L./gem5/util/m5/build/x86/out -lm5 -I./gem5/include --static
+
+gem5/util/m5/build/x86/out/m5: gem5
+	cd gem5/util/m5 && scons build/x86/out/m5 -j `nproc`
+
+gem5:
+	git clone https://gem5.googlesource.com/public/gem5
+	- rm gem5/build
+
+clean:
+	- rm -rf gem5
+	- rm m5-exit-repeat
diff --git a/src/m5-exit-repeat/README.md b/src/m5-exit-repeat/README.md
new file mode 100644
index 0000000..894a0bc
--- /dev/null
+++ b/src/m5-exit-repeat/README.md
@@ -0,0 +1,65 @@
+---
+title: The 'm5-exit-repeat' binary
+layout: default
+permalink: resources/m5-exit-repeat
+shortdoc: >
+    Source for 'm5-exit-repeat'. A 'm5-exit-repeat' binary runs the `m5_exit(0)` command in an infinite loop. This is useful for testing exit event handlers.
+author: ["Bobby R. Bruce"]
+---
+
+This 'm5-exit-repeat' resource runs the `m5_exit` function in an infinite loop.
+This resource is deliberately kept simple and is used primarily for testing purposes.
+
+## Building Instructions
+
+Run `make`.
+
+**Note:** This will automatically clone the gem5 repository to the `src/m5-exit-repeat` directory.
+If this is not desired, please ensure the gem5 repository is present in this directory before running make.
+
+This will only compile the binary to the X86 ISA.
+
+## Cleaning Instructions
+
+Run `make clean` in the Makefile directory.
+
+## Usage
+
+As this binary utilizes the `m5_exit` function, it should be run within a gem5 simulation.
+Its purpose is to test exit events handler and other situations where it's desirable for a simulation to continually run an `m5_exit` command.
+It should be run in SE Mode.
+
+### Example
+
+The following code snippet utilizes the standard library:
+
+```py
+
+board.set_se_workload(Resource("x86-m5-exit-repeat"))
+
+def unique_exit_event():
+    print("Handling the first exit event.")
+    yield False
+    print("Handling the second exit event.")
+    yield False
+    print("Handling the third exit event. We'll exit now.")
+    yield True
+
+simulator = Simulator(
+    board = board,
+    on_exit_event = {
+        ExitEvent.Exit : unique_exit_event(),
+    },
+)
+
+```
+
+This will handle the exit event three times.
+
+## Pre-built binaries
+
+Compiled to the X86 ISA: http://dist.gem5.org/dist/develop/test-progs/m5-exit-repeat/x86-m5-exit-repeat-20220825
+
+## License
+
+This code is covered by By the [03-Clause BSD License (BSD-3-Clause)](https://opensource.org/licenses/BSD-3-Clause).
diff --git a/src/m5-exit-repeat/m5-exit-repeat.c b/src/m5-exit-repeat/m5-exit-repeat.c
new file mode 100644
index 0000000..90a872c
--- /dev/null
+++ b/src/m5-exit-repeat/m5-exit-repeat.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2022 The Regents of the University of California
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+#include "gem5/m5ops.h"
+
+int main()
+{
+    printf("The program has started!\n");
+
+    int exit_count = 0;
+    while(1)
+    {
+        exit_count++;
+        printf(
+            "About to exit the simulation for the %d st/nd/rd/th time\n",
+            exit_count
+        );
+        m5_exit(0);
+    };
+
+    return 0;
+}
diff --git a/src/matrix-multiply/Makefile b/src/matrix-multiply/Makefile
new file mode 100644
index 0000000..ed5d45a
--- /dev/null
+++ b/src/matrix-multiply/Makefile
@@ -0,0 +1,33 @@
+# Copyright (c) 2022 The Regents of the University of California
+# All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+.DEFAULT_GOAL := matrix-multiply
+
+matrix-multiply:
+	gcc -o matrix-multiply matrix-multiply.c --static
+
+clean:
+	- rm matrix-multiply
\ No newline at end of file
diff --git a/src/matrix-multiply/README.md b/src/matrix-multiply/README.md
new file mode 100644
index 0000000..f3fd8e1
--- /dev/null
+++ b/src/matrix-multiply/README.md
@@ -0,0 +1,46 @@
+---
+title: The 'matrix-multiply' binary
+layout: default
+permalink: resources/matrix-multiply
+shortdoc: >
+    Source for 'matrix-multiply'. A matrix-multiply binary runs a multiplication on two 100x100 matrixes. The sum of the multiplied matrix is printed upon completion.
+author: ["Bobby R. Bruce"]
+---
+
+The 'matrix-multiply' resource runs a multiplication on two 100x100 matrixes.
+The sum of the multiplied matrix is printed upon completion.
+
+## Building Instructions
+
+Run `make`.
+
+This will only compile the binary to the X86 ISA.
+
+## Cleaning Instructions
+
+Run `make clean` in the Makefile directory.
+
+## Usage
+
+As this binary does not contain any special `m5` library code it can be run outside of a gem5 simulation:
+
+```sh
+./matrix-multiply
+```
+
+It can also be run in a gem5 simulation in SE mode.
+Below is a snippet which utilizes the gem5 standard library to do so:
+
+```py
+board.set_se_workload(Resource("x86-matrix-multiply"))
+
+simulator = Simulator(board = board)
+```
+
+## Pre-built binaries
+
+Compiled to the X86 ISA: http://dist.gem5.org/dist/develop/test-progs/matrix-multiply/x86-matrix-multiply-20220825
+
+## License
+
+This code is covered by By the [03-Clause BSD License (BSD-3-Clause)](https://opensource.org/licenses/BSD-3-Clause).
diff --git a/src/matrix-multiply/matrix-multiply.c b/src/matrix-multiply/matrix-multiply.c
new file mode 100644
index 0000000..39ccfdd
--- /dev/null
+++ b/src/matrix-multiply/matrix-multiply.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2022 The Regents of the University of California
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+
+int main()
+{
+    const int size = 100;
+    int first[size][size], second[size][size], multiply[size][size];
+
+    printf("Populating the first and second matrix...\n");
+    for(int x=0; x<size; x++)
+    {
+        for(int y=0; y<size; y++)
+        {
+            first[x][y] = x + y;
+            second[x][y] = (4 * x) + (7 * y);
+        }
+    }
+    printf("Done!\n");
+
+    printf("Multiplying the matrixes...\n");
+    for(int c=0; c<size; c++)
+    {
+        for(int d=0; d<size; d++)
+        {
+            int sum = 0;
+            for(int k=0; k<size; k++)
+            {
+                sum += first[c][k] * second[k][d];
+            }
+           multiply[c][d] = sum;
+        }
+    }
+    printf("Done!\n");
+
+    printf("Calculating the sum of all elements in the matrix...\n");
+    long int sum = 0;
+    for(int x=0; x<size; x++)
+        for(int y=0; y<size; y++)
+            sum += multiply[x][y];
+    printf("Done\n");
+
+    printf("The sum is %ld\n", sum);
+}
diff --git a/src/print-this/Makefile b/src/print-this/Makefile
new file mode 100644
index 0000000..3bb1445
--- /dev/null
+++ b/src/print-this/Makefile
@@ -0,0 +1,8 @@
+all: print-this
+
+print_this: print-this-src.c Makefile
+	gcc -O0 -ggdb3 -std=c99 -static print-this-src.c -o print-this
+
+
+clean:
+	rm -rf print-this
diff --git a/src/print-this/README.md b/src/print-this/README.md
new file mode 100644
index 0000000..689540e
--- /dev/null
+++ b/src/print-this/README.md
@@ -0,0 +1,53 @@
+---
+title: The 'print-this' binary
+layout: default
+permalink: resources/print-this
+shortdoc: >
+    Sources for 'print-this' binary.
+author: ["Zhantong Qiu"]
+---
+
+This 'print-this' resource is a simple binary which takes in two parameters: a string to print and an integer specifying the number of times it is to be printed.
+
+This resource is deliberately kept simple and is used primarily for testing purposes.
+
+## Building Instructions
+
+Run `make`.
+
+## Cleaning Instructions
+
+Run `make clean` on the Makefile directory.
+
+## Usage
+
+It takes two parameters, a string to print and an integer stating how many times it should be printed.
+
+### Example
+
+`./print_this "a string to print" 10`
+
+Will output:
+
+```
+1 a string to print
+2 a string to print
+3 a string to print
+4 a string to print
+5 a string to print
+6 a string to print
+7 a string to print
+8 a string to print
+9 a string to print
+10 a string to print
+```
+
+## Pre-built binaries
+
+Compiled to the RISC-V ISA: http://dist.gem5.org/dist/develop/test-progs/print-this/riscv-print-this
+
+Compiled to the X86 ISA: http://dist.gem5.org/dist/develop/test-progs/print-this/x86-print-this
+
+## License
+
+This code is covered by By the [03-Clause BSD License (BSD-3-Clause)](https://opensource.org/licenses/BSD-3-Clause).
diff --git a/src/print-this/print-this.c b/src/print-this/print-this.c
new file mode 100644
index 0000000..f717685
--- /dev/null
+++ b/src/print-this/print-this.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2022 The Regents of the University of California
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+void main(int argc, char *argv[]) {
+
+    if(argc<=2) {
+        printf("please enter a string and an number\n ex. ['print this' 9]\n");
+        exit(1);
+     }  //otherwise continue on our merry way....
+
+    int arg2 = atoi(argv[2]);
+
+    for(int i =0; i<arg2; i++){
+        printf("%i %s\n",i+1,argv[1]);
+    }
+}
diff --git a/src/riscv-ubuntu/README.md b/src/riscv-ubuntu/README.md
index 9ad0c8f..e00918d 100644
--- a/src/riscv-ubuntu/README.md
+++ b/src/riscv-ubuntu/README.md
@@ -34,9 +34,12 @@
   |      |___ shared/                          # Auxiliary files needed for disk creation
   |      |      |___ serial-getty@.service     # Auto-login script
   |      |___ riscv-ubuntu/
+<<<<<<< HEAD
   |             |___ gem5_init.sh              # The script to be appended to .bashrc on the disk image
   |             |___ post-installation.sh      # The script manipulating the disk image
   |             |___ riscv-ubuntu.json         # The Packer script
+  |             |___ exit.sh                  # A script that calls m5 exit
+>>>>>>> develop
   |
   |
   |___ README.md                               # This README file
@@ -83,7 +86,7 @@
 # unpacking/decompressing the disk image
 xz -dk ubuntu-20.04.4-preinstalled-server-riscv64+unmatched.img.xz
 # renaming the disk image
-mv ubuntu-20.04.4-preinstalled-server-riscv64+unmatched.img.xz ubuntu.img
+mv ubuntu-20.04.4-preinstalled-server-riscv64+unmatched.img ubuntu.img
 # adding 4GB to the disk
 qemu-img resize -f raw ubuntu.img +4G
 ```
@@ -96,18 +99,23 @@
 >
 >    apt install qemu-system-misc opensbi u-boot-qemu qemu-utils
 >
-> Hirsute's version of u-boot-qemu is required at the moment to boot hirsute images.
+> u-boot-qemu version 2022.01 (or newer) is required to boot in qemu.
 
-To use Hirsute's version of u-boot-qemu, we will download the package from here,
-(https://packages.ubuntu.com/hirsute/u-boot-qemu). The following command will
+To use this version of u-boot-qemu, we will download the package from here,
+(https://mirrors.edge.kernel.org/ubuntu/pool/main/u/u-boot/). The following command will
 download and install the package.
 
 ```sh
-wget http://old-releases.ubuntu.com/ubuntu/pool/main/u/u-boot/u-boot-qemu_2021.01+dfsg-3ubuntu9_all.deb
-dpkg -i u-boot-qemu_2021.01+dfsg-3ubuntu9_all.deb
+wget https://mirrors.edge.kernel.org/ubuntu/pool/main/u/u-boot/u-boot-qemu_2022.01%2Bdfsg-2ubuntu2_all.deb
+dpkg -i u-boot-qemu_2022.01+dfsg-2ubuntu2_all.deb
 apt-get install -f
 ```
 
+The correct version of u-boot-qemu is also available in the Ubuntu 22.04 or later.
+```sh
+apt install u-boot-qemu
+```
+
 The following command will install the rest of the dependencies,
 ```sh
 apt install qemu-system-misc opensbi qemu-utils
@@ -172,11 +180,34 @@
 virtual machine and manipulate the disk image.
 
 ```sh
-cd src/riscv-ubuntu/disk-image/
-wget https://releases.hashicorp.com/packer/1.8.0/packer_1.8.0_linux_amd64.zip # Downloading Packer
-unzip packer_1.8.0_linux_amd64.zip
-./packer build riscv-ubuntu/riscv-ubuntu.json
+cd riscv-ubuntu/
+scp -P 5555 gem5/util/m5/build/riscv/out/m5 ubuntu@localhost:/home/ubuntu/
+scp -P 5555 disk-image/shared/serial-getty@.service ubuntu@localhost:/home/ubuntu/
+scp -P 5555 disk-image/riscv-ubuntu/gem5_init.sh ubuntu@localhost:/home/ubuntu/
+scp -P 5555 disk-image/riscv-ubuntu/exit.sh ubuntu@localhost:/home/ubuntu/
+```
 
+Connecting to the guest,
+```sh
+ssh -p 5555 ubuntu@localhost
+```
+
+In the guest,
+```sh
+sudo -i
+# input password
+
+mv /home/ubuntu/serial-getty@.service /lib/systemd/system/
+
+mv /home/ubuntu/m5 /sbin
+ln -s /sbin/m5 /sbin/gem5
+
+mv /home/ubuntu/gem5_init.sh /root/
+chmod +x /root/gem5_init.sh
+echo "/root/gem5_init.sh" >> /root/.bashrc
+
+mv /home/ubuntu/exit.sh /root/
+chmod +x /root/exit.sh
 ```
 
 # Pre-built disk image
@@ -187,3 +218,15 @@
 This disk image is used in the following gem5 example RISCV config files, found within the gem5 repository:
 * `gem5/configs/example/gem5_library/riscv-fs.py`, which simulates a full system running with RISCV ISA.
 * `gem5/configs/example/gem5_library/riscv-ubuntu-run.py`, which simulates a full system with RISCV based Ubuntu 20.04 disk-image. Upon successful start-up, a `m5_exit instruction encountered` is encountered. The simulation ends then.
+
+Note: To use the locally built Ubuntu image in gem5, make sure to pass the `root_partition`
+parameter to `CustomResource` or `CustomDiskImageResource`. For example,
+```py
+board.set_kernel_disk_workload(
+    kernel=Resource("riscv-bootloader-vmlinux-5.10"),
+    disk_image=CustomDiskImageResource(
+        local_path="<RESOURCES_PARENT_PATH>/gem5-resources/src/riscv-ubuntu/ubuntu.img",
+        disk_root_partition="1",
+    )
+)
+```
\ No newline at end of file
diff --git a/src/riscv-ubuntu/disk-image/riscv-ubuntu/exit.sh b/src/riscv-ubuntu/disk-image/riscv-ubuntu/exit.sh
new file mode 100644
index 0000000..4b147e0
--- /dev/null
+++ b/src/riscv-ubuntu/disk-image/riscv-ubuntu/exit.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Copyright (c) 2020 The Regents of the University of California.
+# SPDX-License-Identifier: BSD 3-Clause
+
+m5 exit
diff --git a/src/x86-ubuntu/disk-image/build.sh b/src/x86-ubuntu/disk-image/build.sh
index e5e4978..935eaa6 100755
--- a/src/x86-ubuntu/disk-image/build.sh
+++ b/src/x86-ubuntu/disk-image/build.sh
@@ -6,5 +6,5 @@
     rm packer_${PACKER_VERSION}_linux_amd64.zip;
 fi
 
-./packer validate boot-exit/boot-exit.json
-./packer build boot-exit/boot-exit.json
+./packer validate x86-ubuntu/x86-ubuntu.json
+./packer build x86-ubuntu/x86-ubuntu.json