Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/26992 )
Change subject: configs: Make --disk-image optional in baremetal.py
..
configs: Make --disk-image optional in baremetal.py
Since the script could be used to run baremetal applications, we don't
have to enforce the presence of a disk image
Change-Id: I511515361cfd7a2e06ede0df3ddcc595de15f38b
Signed-off-by: Giacomo Travaglini
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26992
Tested-by: Gem5 Cloud Project GCB service account
<345032938...@cloudbuild.gserviceaccount.com>
Tested-by: kokoro
Reviewed-by: Jason Lowe-Power
Reviewed-by: Ciro Santilli
Maintainer: Jason Lowe-Power
---
M configs/example/arm/baremetal.py
1 file changed, 7 insertions(+), 6 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
Ciro Santilli: Looks good to me, approved
kokoro: Regressions pass
Gem5 Cloud Project GCB service account: Regressions pass
diff --git a/configs/example/arm/baremetal.py
b/configs/example/arm/baremetal.py
index c162893..c691a7d 100644
--- a/configs/example/arm/baremetal.py
+++ b/configs/example/arm/baremetal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017,2019 ARM Limited
+# Copyright (c) 2016-2017,2019-2020 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -104,22 +104,23 @@
MemConfig.config_mem(args, system)
-
# Add the PCI devices we need for this system. The base system
# doesn't have any PCI devices by default since they are assumed
# to be added by the configurastion scripts needin them.
-system.pci_devices = [
+pci_devices = []
+if args.disk_image:
# Create a VirtIO block device for the system's boot
# disk. Attach the disk image using gem5's Copy-on-Write
# functionality to avoid writing changes to the stored copy of
# the disk image.
-
PciVirtIO(vio=VirtIOBlock(image=create_cow_image(args.disk_image))),
-]
+system.disk = PciVirtIO(vio=VirtIOBlock(
+image=create_cow_image(args.disk_image)))
+pci_devices.append(system.disk)
# Attach the PCI devices to the system. The helper method in the
# system assigns a unique PCI bus ID to each of the devices and
# connects them to the IO bus.
-for dev in system.pci_devices:
+for dev in pci_devices:
system.attach_pci(dev)
# Wire up the system's memory system
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/26992
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I511515361cfd7a2e06ede0df3ddcc595de15f38b
Gerrit-Change-Number: 26992
Gerrit-PatchSet: 6
Gerrit-Owner: Giacomo Travaglini
Gerrit-Reviewer: Ciro Santilli
Gerrit-Reviewer: Gem5 Cloud Project GCB service account
<345032938...@cloudbuild.gserviceaccount.com>
Gerrit-Reviewer: Giacomo Travaglini
Gerrit-Reviewer: Jason Lowe-Power
Gerrit-Reviewer: kokoro
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev