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

loader: riscv: Initial support #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

endeneer
Copy link
Contributor

@endeneer endeneer commented Sep 28, 2023

Initial porting to support loading Linux PE Image and dtb on RISC-V platform.

Summary of the PR

Hi @roypat, as mentioned in rust-vmm/kvm-bindings#92 (comment), here is the commit porting linux-loader to RISC-V.

Test result

running 20 tests
test cmdline::tests::test_error_try_from ... ok$<2>
test cmdline::tests::test_add_virtio_mmio_device ... ok$<2>
test cmdline::tests::test_as_cstring ... ok$<2>
test cmdline::tests::test_insert_emoji ... ok$<2>
test cmdline::tests::test_insert_equals ... ok$<2>
test cmdline::tests::test_insert_hello_world ... ok$<2>
test cmdline::tests::test_insert_multi ... ok$<2>
test cmdline::tests::test_insert_space ... ok$<2>
test cmdline::tests::test_insert_string ... ok$<2>
test cmdline::tests::test_insert_kv ... ok$<2>
test cmdline::tests::test_partial_eq ... ok$<2>
test cmdline::tests::test_try_from_cmdline_for_vec ... ok$<2>
test cmdline::tests::test_try_from ... ok$<2>
test cmdline::tests::test_insert_too_large ... ok$<2>
test configurator::tests::test_error_messages ... ok$<2>
test configurator::tests::test_bootparam_list_addition ... ok$<2>
test configurator::tests::test_bootparams ... ok$<2>
test loader::tests::test_cmdline_overflow ... ok$<2>
test loader::riscv::pe::tests::load_image ... ok$<2>
test loader::tests::test_cmdline_write_end_regresion ... ok$<2>

test result: ok$<2>. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • [N/A] All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

Copy link
Collaborator

@rbradford rbradford left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this!

src/loader/mod.rs Outdated Show resolved Hide resolved
src/loader/riscv/pe/mod.rs Outdated Show resolved Hide resolved
@endeneer endeneer force-pushed the patch-riscv branch 2 times, most recently from da47fa0 to 44cffa1 Compare September 29, 2023 14:33
src/loader/riscv/pe/mod.rs Outdated Show resolved Hide resolved
src/loader/riscv/pe/mod.rs Outdated Show resolved Hide resolved
src/loader/riscv/pe/mod.rs Outdated Show resolved Hide resolved
Initial porting to support loading Linux PE Image on RISC-V platform.

Signed-off-by: Tan En De <ende.tan@starfivetech.com>
@endeneer
Copy link
Contributor Author

Update:

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.

2 participants