-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python,stdlib: Support added for multiple disk boards #925
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct in thinking this is still a WIP/Draft? I'm wondering how much feedback you want here for now.
I'm in strong support of this endevour. In general I think there's a lot we can do to improve the KernelDiskWorkload
class. Notably how the device path is determined (I really have no good answers for this, it's a mess right now).
5130311
to
7235abe
Compare
This board changes are fully supported in riscv. We are already using this changes locally, but I was not sure if you wanted to modify any existing board to use it. Although, I have added the changes in the riscv_matched board as an example. Let me know if I should proceed in a different way. |
I've made some suggested changes on the PR via my review.I think it'd be good to split this change up into 1 commit which makes the necessary changes to the the I would ask for some tests to be included to verify the multiple disk image feature for the boards you submit actually work. I can help you with that: you'd need to provide me with a config script which utilizes multiple disk images on a board and some way to verify that the images have been loaded. This can wait a bit until all the changes have been implemented but should be thought about. |
3118739
to
f248b36
Compare
I've prepared the following script, have in mind that the rootfs.img and the benchmarks.img should have your own route. import argparse
from gem5.isas import ISA
from gem5.prebuilt.riscvmatched.riscvmatched_board import RISCVMatchedBoard
from gem5.resources.resource import (
obtain_resource,
DiskImageResource,
)
from gem5.simulate.simulator import Simulator
from gem5.utils.requires import requires
requires(isa_required=ISA.RISCV)
parser = argparse.ArgumentParser(
description="A script which uses the RISCVMatchedBoard in FS mode."
)
parser.add_argument(
"-i",
"--to-init",
action="store_true",
help="Exit the simulation after the Linux Kernel boot.",
)
args = parser.parse_args()
# instantiate the riscv matched board with default parameters
board = RISCVMatchedBoard(
clk_freq="1.2GHz",
l2_size="2MB",
is_fs=True,
)
additional_disk_images = ["rootfs.img",
"benchmarks.img"
]
disk_array = []
for i in range(len(additional_disk_images)):
if i == 0:
disk_array.append(
DiskImageResource(
local_path=additional_disk_images[i], root_partition="1"
)
)
else:
disk_array.append(
DiskImageResource(
local_path=additional_disk_images[i],
)
)
kernel=obtain_resource("riscv-bootloader-vmlinux-5.10")
board.set_kernel_disk_workload(
kernel=kernel,
disk_image=disk_array[0],
additional_disk_images=disk_array[1:],
)
simulator = Simulator(board=board)
simulator.run() |
80f6cbf
to
afd628b
Compare
@amatabsc : I've added two commits to this PR. The first is just minor formatting changes (nothing functional). The other adds a test for booting multiple disks on the RISCVMatched board. This test is simple. The same disk image is mounted twice and when the system is finished booting, I'm going to rerun this test to double-check this works (RISCVMatched takes a long time to boot, so bare with me...)/ |
afd628b
to
c38d6b1
Compare
Merges the develop branch into PR gem5#925. Change-Id: I8a9b928550f72d6c2d1a89ccee5592bc41c51719
Change-Id: I21d30660bb4dc126ce418f3252f0feb65b41ee0c
Change-Id: I1f3a65fd27d0c349d98c6dbc653912c07548b874
Change-Id: I5504e3b7dc6b23512e05aeb1f5b618882be78297
Adds tests to verify the Multidisk features is working for the RISCVMatched board. Change-Id: I1d3851644b33de68565bd79282a7454855b02852
Change-Id: Idf7740be62aaf063a25da34700bd5013a690018d
5a9c7ae
to
be04517
Compare
This reverts commit 6c637a7. Change-Id: I1a0cd67c95ad16284a3c9df1e7ddaf991d3ca959
I've found getting test to verify this features is harder than I expected. I'm going to play around a bit with this configuration manually just to confirm this works but I may have to submit this without a test for now. |
This commit introduces the initial support for using multiple disks on different gem5 boards. Currently, only the necessary infrastructure has been added to support multiple disks on the board without implementing full functionality.
Procedure for adding additional functionality:
cc: @aarmejach
Change-Id: I21d30660bb4dc126ce418f3252f0feb65b41ee0c