Skip to content

Commit

Permalink
config, dev-arm: Fix UART handling baremetal mode
Browse files Browse the repository at this point in the history
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 <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/12473
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
  • Loading branch information
cirosantilli2 committed Sep 12, 2018
1 parent 1379e30 commit 3c3ca64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/common/FSConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,

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])
Expand Down
6 changes: 4 additions & 2 deletions src/dev/arm/RealView.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,9 @@ def _on_chip_devices(self):
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())
Expand All @@ -1166,7 +1168,7 @@ def _on_chip_devices(self):
def _off_chip_devices(self):
return [
self.realview_io,
self.uart0,
self.uart[0],
self.kmi0,
self.kmi1,
self.rtc,
Expand Down

0 comments on commit 3c3ca64

Please sign in to comment.