Skip to content

Conversation

@liulog
Copy link
Contributor

@liulog liulog commented Jul 18, 2025

This PR is to fix #179.

Mv clear_bss function before println, because println uses PRINT_LOCK which is in bss segment.

I use cpu0 to clear_bss, it could see cleared bss segment sure.

In order to let other cores could see cleared bss, I use fence rw, rw to ensure other cores run into rust_main after seeing cleared bss segment.

@github-actions github-actions bot added riscv64 bug Something isn't working labels Jul 18, 2025
@liulog
Copy link
Contributor Author

liulog commented Jul 18, 2025

@CHonghaohao Please review it.

Now it is needed for eic7700x soc.

@liulog
Copy link
Contributor Author

liulog commented Jul 18, 2025

Before, I want use cpu0 to clear bss segment, but I forget the first entry cpu could not be cpu0.
So I later modify assembly code, using the first entry cpu to clear bss segment.

Copy link
Contributor

@CHonghaohao CHonghaohao left a comment

Choose a reason for hiding this comment

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

Great job! It has fixed the occasional issue of no output when booting on the BSP.

Copy link
Contributor

@Inquisitor-201 Inquisitor-201 left a comment

Choose a reason for hiding this comment

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

LGTM

@Inquisitor-201 Inquisitor-201 merged commit b4eaabc into syswonder:dev Jul 19, 2025
19 checks passed
@liulog liulog deleted the fix-deadlock branch July 21, 2025 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working riscv64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants