Ciro Santilli has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/12473 )

Change subject: config, dev-arm: Fix UART handling baremetal mode
......................................................................

config, dev-arm: Fix UART handling baremetal mode

fs.py in baremetal mode currently fails for the VExpress_GEM5_V1 platform
due to inconsistent UART naming with error message:

AttributeError: object 'VExpress_GEM5_V1' has no attribute 'uart'

Consistently name keep all UARTs in the Arm platforms in a vector named
'uart' or as a single device named 'uart'. Update the configuration
scripts to reflect the fact that 'uart' can be a vector.

Change-Id: I20b8dbac794d6a9be19b6ce8c335a097872132fb
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/12473
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M configs/common/FSConfig.py
M src/dev/arm/RealView.py
2 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved



diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 17498c4..aa00efe 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -304,7 +304,7 @@

     if bare_metal:
         # EOT character on UART will end the simulation
-        self.realview.uart.end_on_eot = True
+        self.realview.uart[0].end_on_eot = True
     else:
         if machine_type in default_kernels:
             self.kernel = binary(default_kernels[machine_type])
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 1537e76..7690141 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -1141,7 +1141,9 @@
     clock24MHz = SrcClockDomain(clock="24MHz",
         voltage_domain=VoltageDomain(voltage="3.3V"))

-    uart0 = Pl011(pio_addr=0x1c090000, int_num=37)
+    uart = [
+        Pl011(pio_addr=0x1c090000, int_num=37),
+    ]

     kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
     kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit())
@@ -1166,7 +1168,7 @@
     def _off_chip_devices(self):
         return [
             self.realview_io,
-            self.uart0,
+            self.uart[0],
             self.kmi0,
             self.kmi1,
             self.rtc,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12473
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I20b8dbac794d6a9be19b6ce8c335a097872132fb
Gerrit-Change-Number: 12473
Gerrit-PatchSet: 3
Gerrit-Owner: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to