dev-arm: Add new VExpress_GEM5_V1_Base Platform
authorRohit Kurup <rohit.kurup@arm.com>
Fri, 23 Mar 2018 11:35:33 +0000 (11:35 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 14 Jun 2018 12:58:17 +0000 (12:58 +0000)
Add a new VExpress_GEM5_V1_Base Platform which configures basic on
chip devices. The original VExpress_GEM5_V1 will inherit the Base and
add more on chip devices (currently only the HDLCD). This change will
make it possible to create variations of the base platform with
different devices.

Change-Id: I21f9bf4f6217d87e811ff777f630122593eef013
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10807
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
src/dev/arm/RealView.py

index 104c87736b9741b6e13ba6aaadfc5f2a65b48dc3..a28720bdb86dc75cae23ddad4033dabe26a8c5a7 100644 (file)
@@ -1005,7 +1005,7 @@ class VExpress_EMM64(VExpress_EMM):
         cur_sys.atags_addr = 0x8000000
         cur_sys.load_offset = 0x80000000
 
-class VExpress_GEM5_V1(RealView):
+class VExpress_GEM5_V1_Base(RealView):
     """
 The VExpress gem5 memory map is loosely based on a modified
 Versatile Express RS1 memory map.
@@ -1130,13 +1130,9 @@ Interrupts:
     generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30,
                                  int_virt=27, int_hyp=26)
 
-    hdlcd  = HDLcd(pxl_clk=dcc.osc_pxl,
-                   pio_addr=0x2b000000, int_num=95)
-
     def _on_chip_devices(self):
         return [
             self.gic, self.vgic, self.gicv2m,
-            self.hdlcd,
             self.generic_timer,
         ]
 
@@ -1201,7 +1197,7 @@ Interrupts:
 
     def generateDeviceTree(self, state):
         # Generate using standard RealView function
-        dt = list(super(VExpress_GEM5_V1, self).generateDeviceTree(state))
+        dt = list(super(VExpress_GEM5_V1_Base, self).generateDeviceTree(state))
         if len(dt) > 1:
             raise Exception("System returned too many DT nodes")
         node = dt[0]
@@ -1212,3 +1208,13 @@ Interrupts:
         node.append(FdtPropertyWords("arm,vexpress,site", [0xf]))
 
         yield node
+
+
+class VExpress_GEM5_V1(VExpress_GEM5_V1_Base):
+    hdlcd  = HDLcd(pxl_clk=VExpress_GEM5_V1_Base.dcc.osc_pxl,
+                   pio_addr=0x2b000000, int_num=95)
+
+    def _on_chip_devices(self):
+        return super(VExpress_GEM5_V1,self)._on_chip_devices() + [
+                self.hdlcd,
+            ]