Skip to content
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

Allow loading more than one ELF binary #274

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

arichardson
Copy link
Collaborator

This makes it easier to use a separate M-mode bootloader and kernel payload (e.g. OpenSBI fw_jump). It also makes it easier to test booting systems such as FreeBSD without bundling the kernel with the bootloader.

@github-actions
Copy link

github-actions bot commented Jun 16, 2023

Unit Test Results

712 tests  ±0   712 ✔️ ±0   0s ⏱️ ±0s
    6 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit f6b8ef8. ± Comparison against base commit 58cac61.

♻️ This comment has been updated with latest results.

@arichardson
Copy link
Collaborator Author

ping?

@billmcspadden-riscv billmcspadden-riscv added the tgmm-agenda Tagged for the next Golden Model meeting agenda. label Jul 11, 2023
Copy link
Collaborator

@billmcspadden-riscv billmcspadden-riscv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The print_usage() function needs to be written so that it shows that multiple .elf files can be loaded. Perhaps: "Usage %s [options] <elf_file> [<elf_file> ...]"
  2. How was this tested? Is there a test we can add into the test directory that checks out this functionality?
  3. Does this adversely affect the processing of the RVFI arguments? I'm not quite sure how the RVFI options are to be used.

@arichardson
Copy link
Collaborator Author

  1. Good point, will update the help message
  2. I tested this booting FreeBSD (and CheriBSD) using risc-pk bbl as the first elf and the FreeBSD kernel as the second. The boot takes an extremely long time so I'm not sure this can be added to tests (especially since it doesn't shut down after boot but rather waits for login).
  3. It will not have any effect on those arguments.

@jrtc27
Copy link
Collaborator

jrtc27 commented Jul 21, 2023

https://github.com/SRI-CSL/l3riscv hasn't been updated since 2019, it'll have no way of using riscv-software-src/riscv-isa-sim#390. Though to be honest the whole thing should probably be cut in favour of some other tandem verification approach; we have RVFI and we have the various official RISC-V testing frameworks. We don't need some ad-hoc one that's specifically for Sail-vs-Spike and nothing else.

Copy link
Collaborator

@ptomsich ptomsich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the requested style changes, I am happy with this.

c_emulator/riscv_sim.c Outdated Show resolved Hide resolved
c_emulator/riscv_sim.c Outdated Show resolved Hide resolved
This makes it possible for a follow-up commit to add logic that allows
loading more than one ELF file (e.g. M-mode firmware and S-mode kernel).
@arichardson
Copy link
Collaborator Author

I believe I've addressed all outstanding feedback.

c_emulator/riscv_sim.c Show resolved Hide resolved
c_emulator/riscv_sim.c Outdated Show resolved Hide resolved
c_emulator/riscv_sim.c Outdated Show resolved Hide resolved
@arichardson arichardson force-pushed the multiple-elf-files branch 2 times, most recently from d4e1425 to 25ec35d Compare August 3, 2023 17:53
@arichardson arichardson requested a review from jrtc27 August 3, 2023 17:54
This makes it easier to use a separate M-mode bootloader and kernel
payload (e.g. OpenSBI fw_jump). It also makes it easier to test booting
systems such as FreeBSD without bundling the kernel with the bootloader.
@arichardson
Copy link
Collaborator Author

ping?

@arichardson
Copy link
Collaborator Author

monthly ping.

@jrtc27
Copy link
Collaborator

jrtc27 commented Sep 20, 2023

This is absurd. This should have been merged months ago.

@billmcspadden-riscv billmcspadden-riscv merged commit 24e3e68 into riscv:master Sep 20, 2023
2 checks passed
@arichardson arichardson deleted the multiple-elf-files branch September 20, 2023 18:50
@billmcspadden-riscv billmcspadden-riscv removed the tgmm-agenda Tagged for the next Golden Model meeting agenda. label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants