Skip to content

Conversation

@sasdf
Copy link
Contributor

@sasdf sasdf commented Dec 18, 2025

This commit introduces a new dual-redundancy scheme for writing boot data to flash. Instead of the legacy circular writing scheme, which is now renamed to boot_data_write_old, the new boot_data_write function ensures that a valid and consistent entry is written to the first index of both boot data pages.

Key changes:

  • Renamed the legacy boot_data_write to boot_data_write_old (for compatibility testing).
  • Implemented the new boot_data_write using a dual-redundancy algorithm.
  • Added boot_data_redundancy_check to verify consistency between the two pages.
  • Updated rom_ext_start to automatically repair boot data using the redundancy check.

Size difference:

rom_ext size delta
Original 54700
New boot_data_write 54648 - 54
 + redundancy fix 54804 + 104
   + log 54840 + 140

Coverage:

Full coverage of the added code is verified manually with the following command.

./bazelisk.sh coverage --config=ot_coverage \
  //sw/device/silicon_creator/lib:boot_data_functest_fpga_cw340_rom_with_fake_keys

@sasdf sasdf force-pushed the mgTc31d8c3c branch 5 times, most recently from b61f5f3 to 7d4520f Compare December 23, 2025 04:42
This commit introduces a new dual-redundancy scheme for writing boot
data to flash. Instead of the legacy circular writing scheme, which
is now renamed to `boot_data_write_old`, the new `boot_data_write`
function ensures that a valid and consistent entry is written to
the first index of both boot data pages.

Key changes:
- Renamed the legacy `boot_data_write` to `boot_data_write_old`.
- Implemented the new `boot_data_write` using a dual-redundancy
  algorithm.
- Added `boot_data_redundancy_check` to verify consistency between
  the two pages.
- Updated `rom_ext_start` to automatically repair boot data using
  the redundancy check.

Change-Id: Ic31d8c3c778397feb8eb2991ca9e670917047633
Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant