WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Question : Address relocation issue with fw_payload in opensbi #407

@Biancaa-R

Description

@Biancaa-R

_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=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?

Image
  • Used the base address as 90 million ,with 0x10000 offset
Image Image

But the same issue is even there when using dynamic payload

Image

So I am quite confused :/
I thought this issue wouldnt be there incase of using dynamic jump but that was not the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions