cpu: Add recursion for DTB entry generation inside BaseCPU
authorPierre Ayoub <pierre.ayoub.pro@tutanota.com>
Sat, 3 Oct 2020 14:42:22 +0000 (16:42 +0200)
committerPierre Ayoub <pierre.ayoub.pro@tutanota.com>
Tue, 6 Oct 2020 13:56:08 +0000 (13:56 +0000)
Change-Id: Ice93b67ee44a1228120f8a63ad5b9d952f813c70
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35556
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/BaseCPU.py

index ad91f3a5335198dad47737f0bc7ee2f6b11096f0..edd1e3316086883ae86895258a953fe3c3c866f6 100644 (file)
@@ -301,6 +301,12 @@ class BaseCPU(ClockedObject):
 
         yield cpus_node
 
+        # Generate nodes from the BaseCPU children (hence under the root node,
+        # and don't add them as subnode). Please note: this is mainly needed
+        # for the ISA class, to generate the PMU entry in the DTB.
+        for child_node in self.recurseDeviceTree(state):
+            yield child_node
+
     def __init__(self, **kwargs):
         super(BaseCPU, self).__init__(**kwargs)
         self.power_state.possible_states=['ON', 'CLK_GATED', 'OFF']