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

IMAGE_START_ADDR vs actual start address on RISC-V #148

Open
Ivan-Velickovic opened this issue Jun 29, 2022 · 1 comment
Open

IMAGE_START_ADDR vs actual start address on RISC-V #148

Ivan-Velickovic opened this issue Jun 29, 2022 · 1 comment
Assignees
Labels

Comments

@Ivan-Velickovic
Copy link
Contributor

I am trying to understand some of the code for the ELF loader on RISC-V. I've come across an autogenerated define called IMAGE_START_ADDR. On the Spike platform for example (looking at the build for sel4test), this becomes 0x80a0c000. This define is then used in the linker script as the address of the _text section. However, since seL4 uses OpenSBI with FW_PAYLOAD, my understanding is that it will start the payload (in this case the ELF loader) at 0x8020000. This is confirmed by the following output using sel4test:

ELF-loader started on (HART 0) (NODES 1)
    paddr=[8020000...806a4037]

So if the IMAGE_START_ADDR is different to the actual address the image is started at, why are there no issues with the ELF loader? I'm sure I'm just misunderstanding something, so if anyone could point it out that would be great.

Thanks.

@axel-h
Copy link
Member

axel-h commented Jul 1, 2022

There are some pending branches (#135) that try to remove all these RISC-V hacks/quirks, I just did not find enough time recently to review/sync/upstream all this. We might be just lucky that this works due to relative branches in the code?

@axel-h axel-h added the bug label Jul 1, 2022
@axel-h axel-h self-assigned this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants