Skip to content

jh7100: fix hang during os boot by not to choose hart0 #2

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 1 commit into
base: Fedora
Choose a base branch
from

Conversation

mcd500
Copy link

@mcd500 mcd500 commented May 31, 2021

The jh7100 SoC have e24(rv32) in hart0 and u73(rv64) in
hart1 and hart2. Prevent opensbi to choose hart0 for the
booting core for the os since e24 is not compatible with u73.

Signed-off-by: Akira Tsukamoto [email protected]

The jh7100 SoC have e24(rv32) in hart0 and u73(rv64) in
hart1 and hart2. Prevent opensbi to choose hart0 for the
booting core for the os since e24 is not compatible with u73.

Signed-off-by: Akira Tsukamoto <[email protected]>
@mcd500
Copy link
Author

mcd500 commented May 31, 2021

I reopened it of the PR #1

@avpatel
Copy link

avpatel commented May 31, 2021

The hart_index2id[] approach used by this PR is not correct.

OpenSBI firmwares are built for either RV32 or RV64 but not both. This means the RV32 core on JH7100 is getting stuck somewhere in OpenSBI and does not cleanly enter a WFI based hang loop.

I suggest to have add assembly code at start of _start() in fw_base.S which will compare firmware compile time XLEN with runtime XLEN and if there is a mismatch then jump to _start_hang() (which is a WFI loop)

Regards,
Anup

@mcd500
Copy link
Author

mcd500 commented Jun 1, 2021

@avpatel Thank you for your valuable comment. I will add the code in _start() in fw_base.S.

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.

3 participants