riscv-software-src / riscv-software-src/opensbi

fw_start and fw_rw_offset not aligned

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
712
PR merge metrics
No merged PRs in 30d

Description

I pulled the recent master of OpenSBI and I now get the following error:
fw_start and fw_rw_offset not aligned

I checked and the error comes from here:
https://github.com/riscv-software-src/opensbi/blob/322b59847534cbbf484190b0957fb32bee36e2ec/lib/sbi/sbi_domain.c#L752

My values are as follows:
scratch->fw_start: 0x80020000
scratch->fw_rw_offset: 0x40000

The alignment is I guess checked in order to make a NAPOT PMP region out of it. But I think that is something that should be checked in build time rather then runtime.
So I guess my only option is to put OpenSBI at either address 0x80000000 or 0x80040000 (text segment). Or is there another solution?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/sbi/sbi_domain.c around line 752 and inspect how fw_start and fw_rw_offset are validated. Reproduce the reported values, then determine whether the alignment requirement should be diagnosed at build time or handled differently at runtime. Done means a confirmed resolution or a clearly documented supported placement/configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.