Giacomo Travaglini has uploaded this change for review. ( 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]>
---
M configs/example/arm/baremetal.py
1 file changed, 2 insertions(+), 13 deletions(-)



diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py
index 011883b..317be8f 100644
--- a/configs/example/arm/baremetal.py
+++ b/configs/example/arm/baremetal.py
@@ -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: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to