resources: Merge branch stable into develop

Change-Id: I6ad0717bd7fefc73862bbfcfd09ec81f6fc8ddee
diff --git a/CNAME b/CNAME
new file mode 100644
index 0000000..8c456d9
--- /dev/null
+++ b/CNAME
@@ -0,0 +1 @@
+resources.gem5.org
diff --git a/README.md b/README.md
index 3f38070..b507bc1 100644
--- a/README.md
+++ b/README.md
@@ -321,7 +321,6 @@
 
 <http://dist.gem5.org/dist/develop/test-progs/pthreads/sparc64/test_std_condition_variable>
 
-
 ## Resource: Square
 
 ### Square Compilation
diff --git a/_config.yml b/_config.yml
index bba92d6..1190dc1 100644
--- a/_config.yml
+++ b/_config.yml
@@ -18,3 +18,4 @@
   sass_dir: web/_sass
 
 layouts_dir: web/_layouts
+includes_dir: web/_includes
diff --git a/index.md b/index.md
index 101c5fc..bd10c0b 100644
--- a/index.md
+++ b/index.md
@@ -32,6 +32,16 @@
 
 ```
 
+## List of current resources
+
+<ul>
+{% for page in site.pages %}
+{% if page.path contains 'src' %}
+{% include resource-brief.html page=page %}
+{% endif %}
+{% endfor %}
+</ul>
+
 ## UNDER CONSTRUCTION
 
 This website is under construction.
diff --git a/src/DNNMark/README.md b/src/DNNMark/README.md
index c19a2c5..6fe17f0 100644
--- a/src/DNNMark/README.md
+++ b/src/DNNMark/README.md
@@ -1,3 +1,14 @@
+---
+title: DNN Mark
+tags:
+    - gpu
+    - x86
+layout: default
+permalink: resources/dnn-mark
+author: ["Kyle Roarty"]
+license: MIT License
+---
+
 # Announcement
 DNNMark is now supporting MIOpen. Right now DNNMark can run on both AMD and Nvidia platform.
 HCC, HIP, MIOpen and miopengemm are required in order to build MIOpen version of DNNMark.
diff --git a/src/asmtest/README.md b/src/asmtest/README.md
index ce76ef8..08c9cab 100644
--- a/src/asmtest/README.md
+++ b/src/asmtest/README.md
@@ -1,5 +1,12 @@
-asmtest: gem5 Specifc RISC-V tests
-==================================
+---
+title: gem5 Specifc RISC-V tests
+tags:
+    - testing
+    - riscv
+layout: default
+permalink: resources/asmtests
+license: BSD-3-Clause
+---
 
 About
 -----
diff --git a/src/boot-exit/README.md b/src/boot-exit/README.md
index 87cfdd7..9a54bed 100644
--- a/src/boot-exit/README.md
+++ b/src/boot-exit/README.md
@@ -1,7 +1,13 @@
 ---
 title: Linux boot-exit image
+tags:
+    - x86
+    - fullsystem
 layout: default
 permalink: resources/boot-exit
+shortdoc: >
+    Resources to build a disk image and run "boot-exit" test.
+author: ["Ayaz Akram"]
 ---
 
 This document provides instructions to create the "boot-exit" image, the Linux kernel binaries, and also points to the gem5 configuration files needed to run the boot.
diff --git a/src/gapbs/README.md b/src/gapbs/README.md
index aaab6f2..a877aa6 100644
--- a/src/gapbs/README.md
+++ b/src/gapbs/README.md
@@ -1,4 +1,14 @@
-# GAP Benchmark Suite (GAPBS) tests
+---
+title: GAP Benchmark Suite (GAPBS) tests
+tags:
+    - x86
+    - fullsystem
+permalink: resources/gapbs
+shortdoc: >
+    This resource implementes the [GAP benchmark suite](http://gap.cs.berkeley.edu/benchmark.html).
+author: ["Marjan Fariborz"]
+license: BSD-3-Clause
+---
 
 This document provides instructions to create a GAP Benchmark Suite (GAPBS) disk image, which, along with provided configuration scripts, may be used to run GAPBS within gem5 simulations.
 
diff --git a/src/gapbs/configs/run_gapbs.py b/src/gapbs/configs/run_gapbs.py
index 230e40b..2e9848c 100644
--- a/src/gapbs/configs/run_gapbs.py
+++ b/src/gapbs/configs/run_gapbs.py
@@ -134,7 +134,9 @@
 
     print("Running the simulation")
     exit_event = m5.simulate()
+
     if exit_event.getCause() == "work started count reach":
+        print("Done booting Linux")
         m5.stats.reset()
         start_tick = m5.curTick()
         start_insts = system.totalInsts()
diff --git a/src/hack-back/README.md b/src/hack-back/README.md
index e2c2b1e..0e8aaed 100644
--- a/src/hack-back/README.md
+++ b/src/hack-back/README.md
@@ -1,4 +1,14 @@
-# Hack Back Checkpointing Disk Image
+---
+title: Hack Back Checkpointing Disk Image
+tags:
+    - x86
+    - fullsystem
+permalink: resources/hack-back
+shortdoc: >
+  This resource creates a disk image for which you can create a checkpoint after linux boot
+  and then restore using a different scriptfile.
+author: ["Ayaz Akram"]
+---
 
 This document provides instructions to create a disk image with `hack_back_ckpt.rcS` script (located in `gem5/configs/boot/`) installed.
 This script creates a checkpoint once the Linux system boots up.
diff --git a/src/linux-kernel/README.md b/src/linux-kernel/README.md
index 2cfc2fe..445051a 100644
--- a/src/linux-kernel/README.md
+++ b/src/linux-kernel/README.md
@@ -1,3 +1,13 @@
+---

+title: Linux kernel configs for x86

+tags:

+    - x86

+    - fullsystem

+permalink: resources/linux-kernel

+shortdoc: >

+    Linux kernel config files that have been tested with gem5.

+---

+

 # Creating Linux Kernel Binary

 

 This document provides instructions to create a Linux kernel binary. The kernel binary can be used during a gem5 Full System simulation.

diff --git a/src/npb/README.md b/src/npb/README.md
index f9cec64..e8c8f0f 100644
--- a/src/npb/README.md
+++ b/src/npb/README.md
@@ -1,4 +1,14 @@
-# NAS Parallel Benchmarks (NPB) Tests
+---
+title: NAS Parallel Benchmarks (NPB) Tests
+tags:
+    - x86
+    - fullsystem
+permalink: resources/npb
+shortdoc: >
+    Disk images and gem5 configurations to run the [NAS parallel benchmarks](https://www.nas.nasa.gov/).
+author: ["Ayaz Akram"]
+license: BSD-3-Clause
+---
 
 This document provides instructions to create a disk image needed to run the NPB tests with gem5 and points to the gem5 configuration files needed to run these tests.
 The NAS parallel benchmarks ([NPB](https://www.nas.nasa.gov/)) are high performance computing (HPC) workloads consisting of different kernels and pseudo applications:
@@ -73,7 +83,6 @@
 Once this process succeeds, the created disk image can be found on `npb/npb-image/npb`.
 A disk image already created following the above instructions can be found, gzipped, [here](http://dist.gem5.org/dist/develop/images/x86/ubuntu-18-04/npb.img.gz).
 
-
 ## gem5 Run Scripts
 
 The gem5 scripts which configure the system and run simulation are available in configs-npb-tests/.
diff --git a/src/npb/configs/run_npb.py b/src/npb/configs/run_npb.py
index 2bbe838..12b43de 100755
--- a/src/npb/configs/run_npb.py
+++ b/src/npb/configs/run_npb.py
@@ -115,6 +115,7 @@
     exit_event = m5.simulate()
 
     if exit_event.getCause() == "workbegin":
+        print("Done booting Linux")
         # Reached the start of ROI
         # start of ROI is marked by an
         # m5_work_begin() call
diff --git a/src/parsec/README.md b/src/parsec/README.md
index e500f54..336e8ef 100644
--- a/src/parsec/README.md
+++ b/src/parsec/README.md
@@ -1,4 +1,15 @@
-# PARSEC
+---
+title: PARSEC
+tags:
+    - x86
+    - fullsystem
+layout: default
+permalink: resources/parsec
+shortdoc: >
+    Resources to build a disk image with the [parsec workloads](https://parsec.cs.princeton.edu/).
+author: ["Mahyar Samani"]
+license: BSD-3-Clause
+---
 
 This document includes instructions on how to create an Ubuntu 18.04 disk-image with PARSEC benchmark installed. The disk-image will be compatible with the gem5 simulator.
 
diff --git a/src/parsec/configs-mesi-two-level/run_parsec_mesi_two_level.py b/src/parsec/configs-mesi-two-level/run_parsec_mesi_two_level.py
index ebee1b0..e95c8e1 100755
--- a/src/parsec/configs-mesi-two-level/run_parsec_mesi_two_level.py
+++ b/src/parsec/configs-mesi-two-level/run_parsec_mesi_two_level.py
@@ -117,6 +117,7 @@
     exit_event = m5.simulate()
 
     if exit_event.getCause() == "workbegin":
+        print("Done booting Linux")
         # Reached the start of ROI
         # start of ROI is marked by an
         # m5_work_begin() call
diff --git a/src/parsec/configs/run_parsec.py b/src/parsec/configs/run_parsec.py
index 65ccb63..bab584e 100644
--- a/src/parsec/configs/run_parsec.py
+++ b/src/parsec/configs/run_parsec.py
@@ -115,6 +115,7 @@
     exit_event = m5.simulate()
 
     if exit_event.getCause() == "workbegin":
+        print("Done booting Linux")
         # Reached the start of ROI
         # start of ROI is marked by an
         # m5_work_begin() call
diff --git a/src/riscv-fs/README.md b/src/riscv-fs/README.md
index 507e45a..08b386e 100644
--- a/src/riscv-fs/README.md
+++ b/src/riscv-fs/README.md
@@ -1,3 +1,15 @@
+---
+title: RISC-V full system
+tags:
+    - fullsystem
+    - riscv
+layout: default
+permalink: resources/riscv-fs
+shortdoc: >
+    Resources to build a riscv disk image, a riscv boot loader and points to the gem5 scripts to run riscv Linux FS simulations.
+author: ["Ayaz Akram"]
+---
+
 # RISCV Full System
 
 This document provides instructions to create a riscv disk image, a riscv boot loader (`berkeley bootloader (bbl)`) and also points to the associated gem5 scripts to run riscv Linux full system simulations.
diff --git a/src/riscv-tests/README.md b/src/riscv-tests/README.md
index 850878a..570e4e4 100644
--- a/src/riscv-tests/README.md
+++ b/src/riscv-tests/README.md
@@ -1,8 +1,11 @@
-riscv-tests
-================
-
-About
------------
+---
+title: RISC-V Tests
+tags:
+    - riscv
+layout: default
+permalink: resources/riscv-tests
+license: BSD-3-Clause
+---
 
 This repository hosts unit tests for RISC-V processors.
 
diff --git a/src/spec-2006/README.md b/src/spec-2006/README.md
index 56a978b..15706be 100644
--- a/src/spec-2006/README.md
+++ b/src/spec-2006/README.md
@@ -1,4 +1,15 @@
-# SPEC 2006
+---
+title: SPEC 2006
+tags:
+    - x86
+    - fullsystem
+layout: default
+permalink: resources/spec-2006
+shortdoc: >
+    Resources to build a disk image with the [SPEC 2006 workloads](https://www.spec.org/cpu2006/).
+license: Proprietary SPEC License
+---
+
 This document aims to provide instructions to create a gem5-compatible disk
 image containing the SPEC 2006 benchmark suite and also to provide necessary
 configuration files.
diff --git a/src/spec-2006/configs/run_spec.py b/src/spec-2006/configs/run_spec.py
index 0a54e44..461e956 100644
--- a/src/spec-2006/configs/run_spec.py
+++ b/src/spec-2006/configs/run_spec.py
@@ -185,7 +185,7 @@
     if not success:
         print("Error while booting linux: {}".format(exit_cause))
         exit(1)
-    print("Booting done")
+    print("Done booting Linux")
     return success, exit_cause
 
 def run_spec_benchmark():
diff --git a/src/spec-2017/README.md b/src/spec-2017/README.md
index a28a3c9..a51ba89 100644
--- a/src/spec-2017/README.md
+++ b/src/spec-2017/README.md
@@ -1,4 +1,15 @@
-# SPEC 2017
+---
+title: SPEC 2017
+tags:
+    - x86
+    - fullsystem
+layout: default
+permalink: resources/spec-2017
+shortdoc: >
+    Resources to build a disk image with the [SPEC 2017 workloads](https://www.spec.org/cpu2017/).
+license: Proprietary SPEC License
+---
+
 This document aims to provide instructions to create a gem5-compatible disk
 image containing the SPEC 2017 benchmark suite and also to provide necessary
 configuration files.
diff --git a/src/spec-2017/configs/run_spec.py b/src/spec-2017/configs/run_spec.py
index 742614a..f00913c 100644
--- a/src/spec-2017/configs/run_spec.py
+++ b/src/spec-2017/configs/run_spec.py
@@ -185,7 +185,7 @@
     if not success:
         print("Error while booting linux: {}".format(exit_cause))
         exit(1)
-    print("Booting done")
+    print("Done booting Linux")
     return success, exit_cause
 
 def run_spec_benchmark():
diff --git a/src/spec-2017/configs/system/caches.py b/src/spec-2017/configs/system/caches.py
index f15b741..9932ecf 100644
--- a/src/spec-2017/configs/system/caches.py
+++ b/src/spec-2017/configs/system/caches.py
@@ -119,8 +119,8 @@
         """
         self.mmubus = L2XBar()
         self.cpu_side = self.mmubus.mem_side_ports
-        for tlb in [cpu.itb, cpu.dtb]:
-            self.mmubus.cpu_side_ports = tlb.walker.port
+        cpu.mmu.connectWalkerPorts(
+            self.mmubus.cpu_side_ports, self.mmubus.cpu_side_ports)
 
     def connectBus(self, bus):
         """Connect this cache to a memory-side bus"""
diff --git a/src/spec-2017/disk-image/spec-2017/install-spec2017.sh b/src/spec-2017/disk-image/spec-2017/install-spec2017.sh
index 2d6a87d..28f4b6a 100644
--- a/src/spec-2017/disk-image/spec-2017/install-spec2017.sh
+++ b/src/spec-2017/disk-image/spec-2017/install-spec2017.sh
@@ -17,9 +17,6 @@
 # use the example config as the template
 cp /home/gem5/spec2017/config/Example-gcc-linux-x86.cfg /home/gem5/spec2017/config/myconfig.x86.cfg
 
-# use sed command to replace the default gcc_dir
-sed -i "s/\/opt\/rh\/devtoolset-7\/root\/usr/\/usr/g" /home/gem5/spec2017/config/myconfig.x86.cfg
-
 # use sed command to remove the march=native flag when compiling
 # this is necessary as the packer script runs in kvm mode, so the details of the CPU will be that of the host CPU
 # the -march=native flag is removed to avoid compiling instructions that gem5 does not support
@@ -33,7 +30,9 @@
 sed -i "s/command_add_redirect = 1/sysinfo_program =\ncommand_add_redirect = 1/g" /home/gem5/spec2017/config/myconfig.x86.cfg
 
 # build all SPEC workloads
-runcpu --config=myconfig.x86.cfg --define build_ncpus=$(nproc) --action=build all
+# build_ncpus: number of cpus to build the workloads
+# gcc_dir: where to find the compilers (gcc, g++, gfortran)
+runcpu --config=myconfig.x86.cfg --define build_ncpus=$(nproc) --define gcc_dir="/usr" --action=build all
 
 # the above building process will produce a large log file
 # this command removes the log files to avoid copying out large files unnecessarily
diff --git a/src/square/README.md b/src/square/README.md
index d3040d1..9d366e1 100644
--- a/src/square/README.md
+++ b/src/square/README.md
@@ -1,4 +1,13 @@
-# GCN3 Square Test
+---
+title: GCN3 Square Test
+tags:
+    - x86
+    - amdgpu
+layout: default
+permalink: resources/square
+shortdoc: >
+    Resources to build a disk image with the GCN3 Square workload.
+---
 
 The square test is used to test the GCN3-GPU model.
 
@@ -15,7 +24,6 @@
 
 A pre-built binary can be found at <http://dist.gem5.org/dist/develop/test-progs/square/square.o>.
 
-
 ## Compiling GN3_X86/gem5.opt
 
 The test is run with the GCN3_X86 gem5 variant, compiled using the gcn-gpu docker image:
diff --git a/web/_includes/resource-brief.html b/web/_includes/resource-brief.html
new file mode 100644
index 0000000..f3e0386
--- /dev/null
+++ b/web/_includes/resource-brief.html
@@ -0,0 +1,21 @@
+
+<li>
+    <a href="{{page.url | relative_url}}">{{page.title}}</a> 
+
+    {% for tag in page.tags %}
+    {{tag}}
+    {% endfor %}
+
+    {% if page.license %}
+    (License {{page.license}})
+    {% else %}
+    (License unknown. See <a href="{{page.url | relative_url}}">README</a> or <a href="https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/{{page.path}}">source</a>)
+    {% endif %}
+
+    <p>
+    {{page.shortdoc | markdownify}}
+    </p>
+    <p>
+    <a href="https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/{{page.path}}">Source for resource</a>
+    </p>
+</li>
\ No newline at end of file