qspi: use FPGA hashing for host-flash programming

オープン
#2,789 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

Start in the humility qspi -D path that currently reads sectors through the FPGA, hashes them in firmware, and reports over hiffy, then compare it with the FPGA hash block driver and the host-side check in humility. The caveats to resolve first are FPGA hash-block arbitration with the host, swapping the -D digest to SHA3-256 via the off-the-shelf crate, and keeping gimlet/cosmo boards on the old path. Done means qspi -D uses FPGA hashing where available and still produces identical skip decisions on boards without it. Note the author already has a PoC.

索引モデルが issue の本文から書いたものです。

説明

Today's humility qspi -D avoids erasing + writing sectors that don't need to change by hashing the contents in firmware, and checking it against the values calculated by humility.

This involves reading through the FPGA, hashing in firmware, and reporting that over hiffy.

We could instead ask the FPGA to just directly hash the chunks for us, because it is much faster! We could even use this hashing to check if entire ranges are already erased.

There are some caveats to this:

  1. There is only one FPGA hash block available, and we share it with the host. We'd need to make sure the host is in A2, or otherwise ensure we're not competing for the resource.
  2. The FPGA hash is a different algorithm than we currently use for the -D hashing. There is an "off the shelf" rust crate that implements the SHA3-256 that we can use.
  3. Humility would need to stay compatible with existing gimlet/cosmo boards that can't/don't use the FPGA for hashing.

I have a PoC that does this, and it stands to save us 20s-ish out of a 2m15s humility qspi -D call. For now, it didn't seem like a good tradeoff, but it is potentially an option to reconsider in the future.

主要言語
Rust
スター
3.7k
フォーク
246
平均マージ
2日 11分
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/hubris のほかの issue

oxidecomputer/hubris の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。