oxidecomputer / oxidecomputer/humility

`humility qspi --read` will error if you try to read more than 256B, when it could just loop

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

presently, if one attempts humility qspi --read with a -n argument of greater than 256B, it will error Fault(AccessOutOfBounds). this is a bit weird, since if the amount read is, say, 1024B, that address is within bounds of the flash. it turns out that what it's actually out of bounds of is a buffer in hiffy into which the bytes are read. it seems like Humility could probably paper over this by just reading the requested amount in multiple 256B chunks, instead.

Contributor guide

No contributing guide indexed for this repository

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 the implementation of the humility qspi --read command and trace how the requested bytes are passed into the Hiffy buffer. Reproduce a read larger than 256B, then verify that the requested length is read in 256B chunks without AccessOutOfBounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.