Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/39995 )
Change subject: configs: Use MmioVirtIO for disk image in baremetal.py
......................................................................
configs: Use MmioVirtIO for disk image in baremetal.py
The baremetal platform is the platform we use for running
user supplied binaries on baremetal hardware.
(simply put, it runs provided binaries without adding
a gem5 bootloader)
Some layers of this software stack might not have a pci driver.
This might be the case for firmware images like edkII
which needs to use a block device to extract the bootloader
and/or the kernel image. Those can use the memory mapped
(in host domain) virtio block device which is already
part of the VExpress_GEM5 platforms
Change-Id: I9c6ba7e1b4566a3999fd9ba20a2bebe191dc3ef8
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39995
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-by: Richard Cooper <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
Tested-by: kokoro <[email protected]>
---
M configs/example/arm/baremetal.py
1 file changed, 3 insertions(+), 14 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
Richard Cooper: Looks good to me, but someone else must approve
kokoro: Regressions pass
diff --git a/configs/example/arm/baremetal.py
b/configs/example/arm/baremetal.py
index 011883b..29e9b48 100644
--- a/configs/example/arm/baremetal.py
+++ b/configs/example/arm/baremetal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017,2019-2020 ARM Limited
+# Copyright (c) 2016-2017,2019-2021 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -113,24 +113,13 @@
cmd_line = " ".join([ object_file ] + args.args)
)
- # 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.
- 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.
- 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 pci_devices:
- system.attach_pci(dev)
+ system.realview.vio[0].vio = VirtIOBlock(
+ image=create_cow_image(args.disk_image))
# Wire up the system's memory system
system.connect()
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39995
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: I9c6ba7e1b4566a3999fd9ba20a2bebe191dc3ef8
Gerrit-Change-Number: 39995
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Richard Cooper <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s