sencha/bancha: fix gdb server support to track upstream changes

Note this only enables the renode service to run; gdb functionality is
still missing for CHERIoT.

Change-Id: I17e4183a62d7c78afc1a7c931bcde924b134f6ee
diff --git a/bancha.resc b/bancha.resc
index 09e14ad..6a106a0 100644
--- a/bancha.resc
+++ b/bancha.resc
@@ -90,7 +90,7 @@
 $vector_core_mips ?= 1000
 sysbus.cpu2 PerformanceInMips $vector_core_mips
 
-# TOOD: enable for soundstream until model is properly packaged
+# NB: model is normally loaded from SPI
 #$kelvin_bin?=@out/cheriot/sim/kelvin.bin
 #sysbus LoadBinary $kelvin_bin 0x5A000000
 
@@ -99,7 +99,7 @@
 # cpu2 does not support GDB. Please follow docs/KelvinIssDebugging.md to debug
 # Kelvin programs.
 $gdb_port?=3333
-#machine StartGdbServer $gdb_port false cpu0
+machine StartGdbServer $gdb_port false cpu0
 
 cpu0 IsHalted true
 cpu2 IsHalted true
diff --git a/sencha.resc b/sencha.resc
index 15fc07f..b3ed67c 100644
--- a/sencha.resc
+++ b/sencha.resc
@@ -104,7 +104,7 @@
 $gdb_port?=3333
 machine StartGdbServer $gdb_port false cpu0
 # TODO(sleffler) temp disable due to breakage
-#machine StartGdbServer $gdb_port false cpu1
+machine StartGdbServer $gdb_port false cpu1
 
 cpu0 IsHalted true
 cpu1 IsHalted true
diff --git a/shodan_infrastructure/MpactCheriotCPU.cs b/shodan_infrastructure/MpactCheriotCPU.cs
index 8abf5cc..fd4f858 100644
--- a/shodan_infrastructure/MpactCheriotCPU.cs
+++ b/shodan_infrastructure/MpactCheriotCPU.cs
@@ -51,7 +51,8 @@
 // The MpactCheriotCPU class. This class derives from BaseCPU, which implements
 // a CPU in ReNode. It is the interface between ReNode and the mpact_cheriot
 // simulator library.
-public class MpactCheriotCPU : MpactBaseCPU, ICpuSupportingGdb {
+public class MpactCheriotCPU : MpactBaseCPU, ICluster<MpactCheriotCPU>,
+                               ICpuSupportingGdb {
 
     public MpactCheriotCPU(uint id, UInt64 memoryBase, UInt64 memorySize,
                            UInt64 revocationMemoryBase, string cpuType,
@@ -60,6 +61,7 @@
         : base(id, memoryBase, memorySize, cpuType, machine, endianness,
                bitness) {
         revocationMemBase = revocationMemoryBase;
+	Clustered = new MpactCheriotCPU[] { this };
     }
 
     ~MpactCheriotCPU() {
@@ -133,6 +135,9 @@
     public void RemoveHooksAt(ulong addr) { /* empty */ }
     public void RemoveAllHooks() { /* empty */ }
 
+    // ICluster methods.
+    public new IEnumerable<ICluster<MpactCheriotCPU>> Clusters {get; } = new List<ICluster<MpactCheriotCPU>>(0);
+    public new IEnumerable<MpactCheriotCPU> Clustered {get; }
     // ICPUSupportingGdb methods.
 
     public void EnterSingleStepModeSafely(HaltArguments args) {