wolfBoot/tools
Daniele Lacamera febf29ad61 pkcs11 store: batch sector commits to Store_Close
Every wolfPKCS11 field write flushed the payload sector and the header
sector to flash (2 erases + 2 programs of a full sector each), and the
token store re-serializes all objects per C_CreateObject/C_DestroyObject,
so those calls cost hundreds of sector erases and tens of seconds on
flash with slow erase times.

Cache modified sectors in RAM and commit them together when the store
window closes:

- sector cache sized to the worst-case span of one object plus the
  header sector (WOLFBOOT_PKCS11_STORE_CACHE_SECTORS), LRU eviction
  when exceeded
- header sector commits last, so a committed header is the atomic
  commit point of the batch: power failure during a flush leaves the
  flash in either the pre-batch or the post-batch state
- per-commit backup sector write preserved, keeping recovery of the
  sector in flight at failure time
- delete_object commits on return (durability contract, unit-tested)
- nodes table, bitmap, payload ids and the live object size
  (handle->size) are read from the cache when the sector is dirty

Measured on an STM32H5 with 8KB sectors, wolfPKCS11 in the secure
world: C_CreateObject 1.5s -> 0.15s, C_DestroyObject 1.3s -> 0.12s,
456 -> 40 sector erases per create, and the count no longer scales
with the number of objects in the token.

PKCS11_STORE_STATS (off by default) adds flash-activity counters and a
test-app bench to quantify store traffic: make PKCS11_STORE_STATS=1.
2026-09-10 09:40:02 +02:00
..
armclang Remove obvious/redundant comments 2026-07-31 16:00:14 +02:00
bin-assemble renesas-rx: fix build for GCC RX 8.3/14.2 2026-07-30 15:32:31 +02:00
check_config
ci ci: add pic32cz stub build 2026-08-28 13:11:26 +02:00
delta
efi efi: sign the x86_64_efi reference kernel with an authenticated HDR_CMDLINE 2026-08-10 21:03:50 +02:00
elf-parser
fdt-parser fdt: rewrite device tree parser with capacity bound and full validation 2026-09-02 10:48:52 +02:00
fs-test update_disk: load signed image from a file when a filesystem is present 2026-09-02 10:47:33 +02:00
keytools fdt: rewrite device tree parser with capacity bound and full validation 2026-09-02 10:48:52 +02:00
lms
openocd Support for MAX32666 2026-07-31 14:33:56 +02:00
renode
sbom sbom: re-vendor wolfGlass at b44ae8d 2026-08-20 15:22:16 +02:00
scripts update_disk: load signed image from a file when a filesystem is present 2026-09-02 10:47:33 +02:00
squashelf add O_BINARY flag for msys2/windows builds 2026-08-11 08:35:12 -06:00
test-expect-version
test-update-server
tpm
uart-flash-server
unit-tests pkcs11 store: batch sector commits to Store_Close 2026-09-10 09:40:02 +02:00
xmss
config.mk
test-delta.mk
test-enc.mk
test-renode.mk
test.mk lib/wolfssl: bump to ti_c25 merge (e71b086fc) for CHAR_BIT!=8 wide-byte support 2026-08-25 00:01:33 +02:00
wolfboot-rpi-devicetree.diff