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

Warm reset fix #84

Merged
merged 3 commits into from Mar 7, 2019
Merged

Conversation

atishp04
Copy link
Collaborator

@atishp04 atishp04 commented Mar 6, 2019

This PR contains the 2nd part of warm reset fix. It also includes the changes in previous PR (#83 ).

This reverts commit 05602e2.

Introducing a fence causes warm reset issue to reappear. Revert it
for the time being.
@@ -116,6 +116,9 @@ _fdt_reloc_done:
_wait_for_boot_hart:
la a4, _boot_hart_done
REG_L a5, (a4)
nop
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please add a comment inline to describe why this is required?

Also, why can't this be a fence? That seems like a bug somewhere else if a fence doesn't work

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can you please add a comment inline to describe why this is required?

Done.

Also, why can't this be a fence? That seems like a bug somewhere else if a fence doesn't work

One possible explanation is non-boot cpu cache may have some stale corrupt DTB data which gets written. But this is a just theory and no way to prove it.

That's why commit text says that it's being reverted just for the time being until we figure out the actual reason.

All the non-boot harts run in a tight loop which may cause a heavy load
on the memory bus. This may delay the boot hart to complete the cold boot
process.

Introduce few nop that will ease up the traffic.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
A warm reset using reset button may put icache and registers
in non-coherent state.

Flush the icache and reset all registers for every hart.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
@avpatel avpatel merged commit 007a6b2 into riscv-software-src:master Mar 7, 2019
@atishp04 atishp04 deleted the warm_reset_fix branch August 13, 2019 17:56
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.

None yet

3 participants