Generic heap calculation

Open
#393 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start by locating the generic machine heap calculation and the definition or uses of SBI_TLB_INFO_SIZE. Trace why the hart count is squared, then document that reasoning in the relevant code comments or documentation. Done means the memory requirement and its behavior for large hart counts are clearly explained.

Written by the indexing model from the issue text.

Description

Perhaps not an issue, but maybe just a request for documentation or comments in the code. The 'generic' machine uses the following formula for heap calculation:

  • 0x8000 + (0x1000 * hartcount) + (SBI_TLB_INFO_SIZE * hartcount * hartcount)

What is the reason for the square of the hart count? The reason I'm asking is that for large number of harts, this square factor along with SBI_TLB_INFO_SIZE can become quite large.

Thanks.

Dominant language
C
Stars
1.6k
Forks
734
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from riscv-software-src/opensbi

All issues in riscv-software-src/opensbi

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.