riscv-software-src / riscv-software-src/opensbi
Question : Address relocation issue with fw_payload in opensbi
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 712
- PR merge metrics
- No merged PRs in 30d
Description
_reset_regs relocation error .This is not about the FDT or payload path, it’s purely an address/relocation problem. as I checked them.
Key points:
-
trying to build fw_payload without dynamic support (FW_DYNAMIC=n).
-
OpenSBI’s _reset_regs code uses a PC-relative jump to payload_bin.
-
R_RISCV_PCREL_HI20 has a limited range (~±1 MiB).
-
FW_PAYLOAD_OFFSET=0x10000 which is 0x80010000 is already 0x10000 away, which should fit in theory—but still I get issues during linking is there any way to solve this issue?
- Used the base address as 90 million ,with 0x10000 offset
But the same issue is even there when using dynamic payload
So I am quite confused :/
I thought this issue wouldnt be there incase of using dynamic jump but that was not the case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the _reset_regs entry point and the linker diagnostic involving payload_bin, then reproduce the builds with FW_DYNAMIC=n, FW_PAYLOAD_OFFSET=0x10000, and dynamic payload settings. Done means identifying why the relocation remains out of range and documenting a confirmed configuration or build resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100