Switch the boot argument registers to the unused s3 and s4. This ensures
the values will not be clobbered by SBI or function calls; they are
consumed late in the assembly routine.
Details
Details
- Reviewers
br jrtc27 jhb - Group Reviewers
riscv - Commits
- rGc7fa232e9b70: locore.S: stash boot arguments in saved registers
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 60424 Build 57308: arc lint + arc unit
Event Timeline
Comment Actions
As with D47458, C code should not be run prior to enabling translation so we're running at the right address, so IMO this patch is a sign of going down the wrong road. Yes, Linux does horrendously fragile things like this, but that doesn't mean we should do the same.
Comment Actions
Reduce the change, just switch to using s3/s4 registers, still needed to
preserve the values across SBI calls.