Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/fido2: improve & simplify flash handling #21110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ollrogge
Copy link
Member

Contribution description

This PR tries to improve the flash handling done by the FIDO2 implementation. Specifically this entails:

  • Usage of mtd_aux device to reserve flash memory for the FIDO2 data
  • No more usage of functionality that requires flash to be memory-mapped (e.g. _flash_is_erased function)
  • Coherent usage of the mtd_flashpage api

Since the AUX slot approach is integrated into the mtd API, which is the recommended method for working with flash, I wonder if the periph_flashpage_in_address_space feature I added to reserve flash memory for FIDO2 can now be deprecated ?

@benpicco, with the mtd_aux approach, how can two different applications reserve flash memory without risking corruption of each other's data? Is it possible to divide the AUX slot into multiple smaller slots, that can be allocated for use by different applications?

Testing procedure

  • /tests/sys/fido2_ctap with both native and nrf52840dk as target
  • /tests/sys/fido2_ctap_hid

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Dec 25, 2024
@Ollrogge Ollrogge force-pushed the fido2_flash_handling_improvements branch from 771229a to 8fdb7a6 Compare December 26, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: tests Area: tests and testing framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant