Skip to content

fix: making rustsbi-qemu completely runnable again. #66

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Kingcxp
Copy link

@Kingcxp Kingcxp commented May 16, 2025

After rust-lang/rust#128651 merged in nightly toolchain, asm! macro is not allowed in naked functions.

Also, I discovered unhandled lint error including creating a mutable reference to mutable static and creating a shared reference to mutable static, which is making the program completely not runnable.

What's more, I discovered more asm!s in other dependencies, I upgraded version but nothing helped.

Therefore, this pull request aims to update rustsbi-qemu to adapt to current rust versions.

I also forked and made some changes in other dependency repositories, you need to accept them and update their versions in cargo.toml in order to successfully run the project.

Changes:

  • Bump fast-trap version to 0.1.0
  • Bump aclint version to 0.1.0
  • Reorder date for CHANGELOG.md
  • Replace #[naked] with #[unsafe(naked)] across all relevant functions.
  • Remove #![feature(naked_functions, asm_const)] as they are no longer needed.
  • Switche to the naked_asm! macro to comply with new naked function requirements.
  • Remove options(noreturn), which is not allowed in naked_asm!.
  • Fix warning creating a mutable/shared reference to mutable static in multiple files.

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.

1 participant